libexplain
1.4.D001
|
#include <libexplain/ac/dirent.h>
#include <libexplain/ac/limits.h>
#include <libexplain/ac/sys/param.h>
#include <libexplain/buffer/device_name.h>
#include <libexplain/buffer/pointer.h>
#include <libexplain/is_efault.h>
Go to the source code of this file.
Functions | |
static int | dev_stat_rec (explain_string_buffer_t *dev_path, dev_t dev, struct stat *st, explain_string_buffer_t *shortest_dev_path) |
int | explain_buffer_device_name (explain_string_buffer_t *sb, dev_t dev, struct stat *st) |
static int dev_stat_rec | ( | explain_string_buffer_t * | dev_path, |
dev_t | dev, | ||
struct stat * | st, | ||
explain_string_buffer_t * | shortest_dev_path | ||
) | [static] |
The dev_stat_rec function is used to walk the /dev directory tree, looking for a specific device.
dev_path | The is the path recursively constructed as we descend down the directory tree looking for devices. |
dev | The device beeing searched for. |
st | The details of the device found (output). |
shortest_dev_path | The path of the device found. If nore than one is found, the shortest device_path is remembered. |
Definition at line 47 of file device_name.c.
int explain_buffer_device_name | ( | explain_string_buffer_t * | sb, |
dev_t | dev, | ||
struct stat * | st | ||
) |
The explain_buffer_device_name function may be used locate a device's name an print it into the supplied buffer.
sb | The string buffer to print into. |
dev | The device to look for. |
st | The file info that provoked the request. |
Definition at line 130 of file device_name.c.