libexplain
1.4.D001
|
#include <libexplain/ac/sys/stat.h>
#include <libexplain/buffer/permission_mode.h>
#include <libexplain/option.h>
#include <libexplain/parse_bits.h>
#include <libexplain/sizeof.h>
#include <libexplain/string_buffer.h>
Go to the source code of this file.
Functions | |
void | explain_buffer_permission_mode (explain_string_buffer_t *sb, mode_t mode) |
mode_t | explain_permission_mode_parse_or_die (const char *text, const char *caption) |
Variables | |
static const explain_parse_bits_table_t | short_table [] |
static const explain_parse_bits_table_t | long_table [] |
void explain_buffer_permission_mode | ( | explain_string_buffer_t * | sb, |
mode_t | mode | ||
) |
The explain_buffer_permission_mode function may be used to decode a set of permission mode bits into human readable text, something like the programmer would have written.
sb | The string buffer to write the mode into. This makes the function thread safe if the buffer is suitable. |
mode | the permission mode bits to be decoded |
Definition at line 58 of file permission_mode.c.
mode_t explain_permission_mode_parse_or_die | ( | const char * | text, |
const char * | caption | ||
) |
The explain_permission_mode_parse_or_die function may be used to parse a strings containing a symbolic representation of a permission mode, turning it into a permission mode value.
text | The text to be parsed to extract a permission mode value. |
caption | additional text to add to the start of the error message |
Definition at line 100 of file permission_mode.c.
const explain_parse_bits_table_t long_table[] [static] |
{ { "S_ISUID", S_ISUID }, { "S_ISGID", S_ISGID }, { "S_ISVTX", S_ISVTX }, { "S_IRWXU", S_IRWXU }, { "S_IRUSR", S_IRUSR }, { "S_IWUSR", S_IWUSR }, { "S_IXUSR", S_IXUSR }, { "S_IRWXG", S_IRWXG }, { "S_IRGRP", S_IRGRP }, { "S_IWGRP", S_IWGRP }, { "S_IXGRP", S_IXGRP }, { "S_IRWXO", S_IRWXO }, { "S_IROTH", S_IROTH }, { "S_IWOTH", S_IWOTH }, { "S_IXOTH", S_IXOTH }, }
Definition at line 37 of file permission_mode.c.
const explain_parse_bits_table_t short_table[] [static] |
{ { "S_ISUID", S_ISUID }, { "S_ISGID", S_ISGID }, { "S_ISVTX", S_ISVTX }, }
Definition at line 29 of file permission_mode.c.