libexplain  1.4.D001
Functions
libexplain/buffer/ebadf/not_open_for_reading.c File Reference
#include <libexplain/buffer/ebadf.h>
#include <libexplain/buffer/open_flags.h>

Go to the source code of this file.

Functions

void explain_buffer_ebadf_not_open_for_reading (explain_string_buffer_t *sb, const char *caption, int flags)

Function Documentation

void explain_buffer_ebadf_not_open_for_reading ( explain_string_buffer_t sb,
const char *  caption,
int  flags 
)

The explain_buffer_ebafd_not_open_for_reading function is used to print an EBADF or EINVAL explanation into the string buffer, in the case where a file descriptor (or I/O stream) needs to be open for reading, but it is not.

Parameters:
sbThe string buffer to print into
captionThe name of the offending argument.
flagsThe file's open flags, as returned by fcntl(fildes, F_GETFL); or -1 when unknown.

Definition at line 24 of file not_open_for_reading.c.