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

Go to the source code of this file.

Functions

void explain_buffer_enametoolong (explain_string_buffer_t *sb, const char *pathname, const char *pathname_caption, const struct explain_final_t *pathname_final_component)
void explain_buffer_enametoolong2 (explain_string_buffer_t *sb, const char *oldpath, const char *oldpath_caption, const struct explain_final_t *oldpath_final_component, const char *newpath, const char *newpath_caption, const struct explain_final_t *newpath_final_component)
void explain_buffer_enametoolong_gethostname (explain_string_buffer_t *sb, int actual_length, const char *caption)

Function Documentation

void explain_buffer_enametoolong ( explain_string_buffer_t sb,
const char *  pathname,
const char *  pathname_caption,
const struct explain_final_t pathname_final_component 
)

The explain_buffer_enametoolong function may be used to explan an ENAMETOOLONG error, in a manner consisten across all system calls.

Parameters:
sbThe string buffer to print into.
pathnameThe pathname to be explained
pathname_captionThe argument name of the pathname to be explained
pathname_final_componentThe desired properties of the final component of the pathname
void explain_buffer_enametoolong2 ( explain_string_buffer_t sb,
const char *  oldpath,
const char *  oldpath_caption,
const struct explain_final_t oldpath_final_component,
const char *  newpath,
const char *  newpath_caption,
const struct explain_final_t newpath_final_component 
)

The explain_buffer_enametoolong2 function may be used to explan an ENAMETOOLONG error, in a manner consistent across all system calls that require two path arguments.

Parameters:
sbThe string buffer to print into.
oldpathThe first pathname to be explained
oldpath_captionThe argument name of the first pathname to be explained
oldpath_final_componentThe desired properties of the final component of the oldpath
newpathThe second pathname to be explained
newpath_captionThe argument name of the second pathname to be explained
newpath_final_componentThe desired properties of the final component of the newpath
void explain_buffer_enametoolong_gethostname ( explain_string_buffer_t sb,
int  actual_length,
const char *  caption 
)

The explain_buffer_enametoolong_gethostname function is sued to print an explaination for an ENAMETOOLONG error reported by the gethostname, getdomainname (etc) functions.

Parameters:
sbThe string buffer to print into.
actual_lengthThe actual length of the host/domain name, this will be larger than the value passed.
captionThe name of the offending system call argument

Definition at line 24 of file gethostname.c.