libexplain
1.4.D001
|
#include <libexplain/ac/dirent.h>
#include <libexplain/ac/limits.h>
#include <libexplain/ac/stdio.h>
#include <libexplain/ac/stdlib.h>
#include <libexplain/ac/sys/param.h>
#include <libexplain/ac/sys/stat.h>
#include <libexplain/ac/unistd.h>
#include <libexplain/buffer/path_to_pid.h>
#include <libexplain/is_same_inode.h>
#include <libexplain/lsof.h>
#include <libexplain/string_buffer.h>
Go to the source code of this file.
Data Structures | |
struct | adapter |
Typedefs | |
typedef struct adapter | adapter |
Functions | |
static void | n_callback (explain_lsof_t *context, const char *name) |
static int | stat_to_pid (explain_string_buffer_t *sb, const struct stat *st) |
int | explain_buffer_path_to_pid (explain_string_buffer_t *sb, const char *path) |
int | explain_buffer_fildes_to_pid (explain_string_buffer_t *sb, int fildes) |
int | explain_buffer_path_users (explain_string_buffer_t *sb, const char *path, const char *caption) |
Definition at line 143 of file path_to_pid.c.
int explain_buffer_fildes_to_pid | ( | struct explain_string_buffer_t * | sb, |
int | fildes | ||
) |
The explain_buffer_fildes_to_pid function may be used to inject the PIDs of processes that have the given file open.
sb | The string buffer to write the PIDs into |
fildes | open file descrptor of file of interest |
Definition at line 249 of file path_to_pid.c.
int explain_buffer_path_to_pid | ( | struct explain_string_buffer_t * | sb, |
const char * | path | ||
) |
The explain_buffer_path_to_pid function may be used to inject the PIDs of processes that have the given file open.
sb | The string buffer to write the PIDs into |
path | The path of the file of interest |
Definition at line 238 of file path_to_pid.c.
int explain_buffer_path_users | ( | struct explain_string_buffer_t * | sb, |
const char * | path, | ||
const char * | caption | ||
) |
The explain_buffer_path_users function may be used to inject the PIDs of processes that have the given file open. The caption is inserted, too.
sb | The string buffer to write the PIDs into |
path | The path of the file of interest |
caption | The name of the argument being checked, "oldpath", "newpath", "pathname" or similar. |
Definition at line 260 of file path_to_pid.c.
static void n_callback | ( | explain_lsof_t * | context, |
const char * | name | ||
) | [static] |
Definition at line 155 of file path_to_pid.c.
static int stat_to_pid | ( | explain_string_buffer_t * | sb, |
const struct stat * | st | ||
) | [static] |
Definition at line 184 of file path_to_pid.c.