libexplain  1.4.D001
Functions
libexplain/buffer/einval.h File Reference
#include <libexplain/string_buffer.h>

Go to the source code of this file.

Functions

void explain_buffer_einval_bits (explain_string_buffer_t *sb, const char *caption)
void explain_buffer_einval_too_small (explain_string_buffer_t *sb, const char *caption, long data)
void explain_buffer_einval_too_large (explain_string_buffer_t *sb, const char *caption)
void explain_buffer_einval_too_large2 (explain_string_buffer_t *sb, const char *caption, long max)
void explain_buffer_einval_vague (explain_string_buffer_t *sb, const char *caption)
void explain_buffer_einval_value (explain_string_buffer_t *sb, const char *caption, long value)
void explain_buffer_einval_not_a_number (explain_string_buffer_t *sb, const char *caption)
void explain_buffer_einval_not_listening (explain_string_buffer_t *sb)
void explain_buffer_einval_out_of_range (explain_string_buffer_t *sb, const char *caption, long lo, long hi)
void explain_buffer_einval_signalfd (explain_string_buffer_t *sb, const char *caption)
void explain_buffer_einval_multiple (explain_string_buffer_t *sb, const char *caption, int multiple)
void explain_buffer_einval_mknod (explain_string_buffer_t *sb, int mode, const char *mode_caption, const char *syscall_name)
void explain_buffer_einval_mkstemp (explain_string_buffer_t *sb, const char *templat, const char *templat_caption)
void explain_buffer_einval_setenv (explain_string_buffer_t *sb, const char *name, const char *name_caption)
void explain_buffer_einval_sock_fprog (explain_string_buffer_t *sb, const struct sock_fprog *data)
void explain_buffer_einval_ungetc (explain_string_buffer_t *sb, const char *syscall_name)
void explain_buffer_einval_format_string (explain_string_buffer_t *sb, const char *argument_name, const char *argument_value, size_t errpos)
void explain_buffer_einval_format_string_hole (explain_string_buffer_t *sb, const char *argument_name, int hole_index)
void explain_buffer_einval_no_vid_std (explain_string_buffer_t *sb)

Function Documentation

void explain_buffer_einval_bits ( explain_string_buffer_t sb,
const char *  caption 
)

The explain_buffer_einval_bits function may be used to explain a bit-field containing undefined bits.

Parameters:
sbThe string buffer to print into.
captionThe name of the offending system call argument.

Definition at line 23 of file einval.c.

void explain_buffer_einval_format_string ( explain_string_buffer_t sb,
const char *  argument_name,
const char *  argument_value,
size_t  errpos 
)

The explain_buffer_einval_format_string function is used to report problems concerning invalid format strings.

Parameters:
sbThe buffer to print into.
argument_nameThe name of the offending system call argument.
argument_valueThe value of the offending system call argument (format string).
errposThe position within the string that the error was discovered.

Definition at line 27 of file format_string.c.

void explain_buffer_einval_format_string_hole ( explain_string_buffer_t sb,
const char *  argument_name,
int  hole_index 
)

The explain_buffer_einval_format_string_hole function is used to report problems concerning invalid format strings, in the case where n$ does not appear in the format string when it should.

Parameters:
sbThe buffer to print into.
argument_nameThe name of the offending system call argument.
hole_indexThe n$ argument that has not been used.

Definition at line 110 of file format_string.c.

void explain_buffer_einval_mknod ( explain_string_buffer_t sb,
int  mode,
const char *  mode_caption,
const char *  syscall_name 
)

The explain_buffer_einval_multiple function is use to print an explanation of an EINVAL error, when reported by mknod.

Parameters:
sbThe buffer to print into.
modeThe kind of node the syscall was trying to create.
mode_captionThe name of the offending system call argument.
syscall_nameThe name of the offending system call.

Definition at line 28 of file mknod.c.

void explain_buffer_einval_mkstemp ( explain_string_buffer_t sb,
const char *  templat,
const char *  templat_caption 
)

The explain_buffer_einval_mkstemp function is use to print an explanation of an EINVAL error, when reported by mknod.

Parameters:
sbThe buffer to print into.
templatThe offending file name template.
templat_captionThe offending syscall argument.

Definition at line 26 of file mkstemp.c.

void explain_buffer_einval_multiple ( explain_string_buffer_t sb,
const char *  caption,
int  multiple 
)

The explain_buffer_einval_multiple function is use to print an explanation of an EINVAL error, in the case where an argument is meant to be a multiple of a number (e.g. block sizes).

Parameters:
sbThe buffer to print into.
captionThe name of the offending system call argument.
multipleThe number it must be a multiple of.

Definition at line 23 of file multiple.c.

The explain_buffer_einval_no_vid_std function is used to report problems with a V4L2 ioctl, in the case where no output video standards are supported.

Parameters:
sbThe buffer to print into.

Definition at line 24 of file no_vid_std.c.

void explain_buffer_einval_not_a_number ( explain_string_buffer_t sb,
const char *  caption 
)

The explain_buffer_einval_not_a_number function may be used to explain that a system call argument is invalid, when it is supposed to be a string containing a number.

Parameters:
sbThe string buffer to print into.
captionThe name of the offending system call argument.

Definition at line 113 of file einval.c.

Definition at line 24 of file not_listening.c.

void explain_buffer_einval_out_of_range ( explain_string_buffer_t sb,
const char *  caption,
long  lo,
long  hi 
)

The explain_buffer_einval_out_of_range functions is used to print an explanation for an EINVAL error, in the case where an argument's value is outside the valid range.

Parameters:
sbThe buffer to print into.
captionThe name of the offending system call argument.
loThe lower bound of the valid range.
hiThe upper bound of the valid range.

Definition at line 24 of file out_of_range.c.

void explain_buffer_einval_setenv ( explain_string_buffer_t sb,
const char *  name,
const char *  name_caption 
)

The explain_buffer_einval_setenv function is use to print an explanation of an EINVAL error, when reported by setenv.

Parameters:
sbThe buffer to print into.
nameThe environment variable name.
name_captionThe name of the syscall argument containing the environment variable name.

Definition at line 24 of file setenv.c.

void explain_buffer_einval_signalfd ( explain_string_buffer_t sb,
const char *  caption 
)

The explain_buffer_einval_signalfd function is use to print an explanation of an EINVAL error reported by the signalfd system call reposrt an EINVAL error, in the case where the file descriptor is actually open, but does not refer to a valid signalfd file descriptor.

Parameters:
sbThe buffer to print into.
captionThe name of the offending system call argument.

Definition at line 23 of file signalfd.c.

void explain_buffer_einval_sock_fprog ( explain_string_buffer_t sb,
const struct sock_fprog *  data 
)

The explain_buffer_einval_sock_fprog function is use to print an explanation of an EINVAL error, when reported by PPP ioctls.

Parameters:
sbThe buffer to print into.
dataThe filter with the problem.

Definition at line 137 of file ppp_filter.c.

void explain_buffer_einval_too_large ( explain_string_buffer_t sb,
const char *  caption 
)

The explain_buffer_einval_too_large function may be used to explain that a system call argument is too large (out of range).

Parameters:
sbThe string buffer to print into.
captionThe name of the offending system call argument.

Definition at line 24 of file too_large.c.

void explain_buffer_einval_too_large2 ( explain_string_buffer_t sb,
const char *  caption,
long  max 
)

The explain_buffer_einval_too_large2 function may be used to explain that a system call argument is too large (out of range).

Parameters:
sbThe string buffer to print into.
captionThe name of the offending system call argument.
maxThe actual upper limit.

Definition at line 25 of file too_large2.c.

void explain_buffer_einval_too_small ( explain_string_buffer_t sb,
const char *  caption,
long  data 
)

The explain_buffer_einval_too_small function may be used to explain that a system call argument is too small (out of range).

Parameters:
sbThe string buffer to print into.
captionThe name of the offending system call argument.
dataThe value of the offending system call argument.

Definition at line 44 of file einval.c.

void explain_buffer_einval_ungetc ( explain_string_buffer_t sb,
const char *  syscall_name 
)

The explain_buffer_einval_ungetc function is used to report problems trying to push back EOF onto streams.

Parameters:
sbThe buffer to print into.
syscall_nameThe name of the offended system call.

Definition at line 23 of file ungetc.c.

void explain_buffer_einval_vague ( explain_string_buffer_t sb,
const char *  caption 
)

The explain_buffer_einval_vague function may be used to explain that a system call argument is invalid, but not why (use this one sparingly).

Parameters:
sbThe string buffer to print into.
captionThe name of the offending system call argument.

Definition at line 85 of file einval.c.

void explain_buffer_einval_value ( explain_string_buffer_t sb,
const char *  caption,
long  value 
)

The explain_buffer_einval_value function may be used to explain that a system call argument is invalid, but not why.

Parameters:
sbThe string buffer to print into.
captionThe name of the offending system call argument.
valueThe value of the offending system call argument.

Definition at line 104 of file einval.c.