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

Go to the source code of this file.

Functions

void explain_buffer_eacces (explain_string_buffer_t *sb, const char *pathname, const char *caption, const struct explain_final_t *final_component)
void explain_buffer_eacces_syscall (explain_string_buffer_t *sb, const char *syscall_name)
int explain_buffer_eacces_shmat (explain_string_buffer_t *sb, const struct ipc_perm *perm, int read_only)
void explain_buffer_eacces_shmat_vague (explain_string_buffer_t *sb)

Function Documentation

void explain_buffer_eacces ( explain_string_buffer_t sb,
const char *  pathname,
const char *  caption,
const struct explain_final_t final_component 
)

The explain_buffer_eacces function may be used to

Parameters:
sbThe string buffer to print into.
pathnameThe problematic pathname
captionThe name of the offending system call argument.
final_componentThe desired properties of the final component
int explain_buffer_eacces_shmat ( explain_string_buffer_t sb,
const struct ipc_perm *  perm,
int  read_only 
)

The explain_buffer_eacces_shmat function is use dto explain EACCES error returned by shmat (and friends?).

Parameters:
sbThe string buffer to print into.
permThe access permission attached to the shared memory segment.
read_onlyWhether or no read only access was requested (if false, read-write access is requested).
Returns:
0 if it printed nothing, 1 if it printed an explanation

Definition at line 503 of file shm.c.

The explain_buffer_eacces_shmat_vague function is use dto explain EACCES error returned by shmat, when no specific error can be determined.

Parameters:
sbThe string buffer to print into.

Definition at line 518 of file shm.c.

void explain_buffer_eacces_syscall ( explain_string_buffer_t sb,
const char *  syscall_name 
)

The explain_buffer_eacces_syscall function may be used to explan an EACCES error returned from a given system call.

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

Definition at line 23 of file syscall.c.