libexplain  1.4.D001
Functions
libexplain/buffer/mount_point.h File Reference
#include <libexplain/ac/sys/stat.h>
#include <libexplain/string_buffer.h>

Go to the source code of this file.

Functions

int explain_buffer_mount_point (explain_string_buffer_t *sb, const char *path)
int explain_buffer_mount_point_dirname (explain_string_buffer_t *sb, const char *path)
int explain_buffer_mount_point_fd (explain_string_buffer_t *sb, int fildes)
int explain_buffer_mount_point_stat (explain_string_buffer_t *sb, const struct stat *st)
int explain_buffer_mount_point_dev (explain_string_buffer_t *sb, dev_t dev)
int explain_mount_point_noexec (const char *pathname)
int explain_mount_point_nosuid (const char *pathname)
int explain_mount_point_nodev (const struct stat *pathname)

Function Documentation

int explain_buffer_mount_point ( explain_string_buffer_t sb,
const char *  path 
)

The explain_buffer_mount_point function may be used to insert the mount point of the file system the path is within.

Parameters:
sbThe string buffer to write to.
pathThe path of the file in the file system we care about.
Returns:
0 on success, -1 if no mount point inserted

Definition at line 127 of file mount_point.c.

The explain_buffer_mount_point_dev function may be used to insert the mount point of the file system, identified by the mounted device.

Parameters:
sbThe string buffer to write to.
devThe the mounted device to look for.
Returns:
0 on success, -1 if no mount point inserted

Definition at line 32 of file mount_point.c.

int explain_buffer_mount_point_dirname ( explain_string_buffer_t sb,
const char *  path 
)

The explain_buffer_mount_point function may be used to insert the mount point of the file system the dirname(path) is within.

Parameters:
sbThe string buffer to write to.
pathThe path of the file in the file system we care about.
Returns:
0 on success, -1 if no mount point inserted

Definition at line 138 of file mount_point.c.

The explain_buffer_mount_point_fd function may be used to insert the mount point of the file system the file descriptor is within.

Parameters:
sbThe string buffer to write to.
fildesThe file descriptor of the file we care about.
Returns:
0 on success, -1 if no mount point inserted

Definition at line 116 of file mount_point.c.

int explain_buffer_mount_point_stat ( explain_string_buffer_t sb,
const struct stat *  st 
)

The explain_buffer_mount_point_stat function may be used to insert the mount point of the file system, as described by the stat struct.

Parameters:
sbThe string buffer to write to.
stThe stat struct describing the file we care about.
Returns:
0 on success, -1 if no mount point inserted

Definition at line 108 of file mount_point.c.

int explain_mount_point_nodev ( const struct stat *  pathname)

The explain_mount_point_nodev function may be used to test whether or not a file system has been mounted with the "nodev" option.

Parameters:
pathnameThe pathname of the file of interest
Returns:
int; zon-zero (true) if the "nodev" mount option is used, zero (false) if not.

Definition at line 238 of file mount_point.c.

int explain_mount_point_noexec ( const char *  pathname)

The explain_mount_point_noexec function may be used to test whether or not a file system has been mounted with the "noexec" option.

Parameters:
pathnameThe pathname of the file of interest
Returns:
int; zon-zero (true) if the "noexec" mount option is used, zero (false) if not.

Definition at line 224 of file mount_point.c.

int explain_mount_point_nosuid ( const char *  pathname)

The explain_mount_point_nosuid function may be used to test whether or not a file system has been mounted with the "nosuid" option.

Parameters:
pathnameThe pathname of the file of interest
Returns:
int; zon-zero (true) if the "nosuid" mount option is used, zero (false) if not.

Definition at line 231 of file mount_point.c.