MentOS
0.8.0
The Mentoring Operating System
|
Proc file system public functions and structures. More...
Go to the source code of this file.
Classes | |
struct | proc_dir_entry_t |
Stores information about a procfs directory entry. More... | |
Typedefs | |
typedef struct proc_dir_entry_t | proc_dir_entry_t |
Stores information about a procfs directory entry. | |
Functions | |
int | procfs_module_init (void) |
Initialize the procfs filesystem. More... | |
int | procfs_cleanup_module (void) |
Clean up the procfs filesystem. More... | |
proc_dir_entry_t * | proc_dir_entry_get (const char *name, proc_dir_entry_t *parent) |
Finds the direntry inside /proc or under the given parent . More... | |
proc_dir_entry_t * | proc_mkdir (const char *name, proc_dir_entry_t *parent) |
Creates a new directory inside the procfs filesystem. More... | |
int | proc_rmdir (const char *name, proc_dir_entry_t *parent) |
Removes a directory from the procfs filesystem. More... | |
proc_dir_entry_t * | proc_create_entry (const char *name, proc_dir_entry_t *parent) |
Creates a new entry inside the procfs filesystem. More... | |
int | proc_destroy_entry (const char *name, proc_dir_entry_t *parent) |
Removes an entry from the procfs filesystem. More... | |
int | proc_entry_set_mask (proc_dir_entry_t *entry, mode_t mask) |
Sets the mask of a given procfs entry. More... | |
int | procr_create_entry_pid (task_struct *entry) |
Create the entire procfs entry tree for the give process. More... | |
int | procr_destroy_entry_pid (task_struct *entry) |
Destroy the entire procfs entry tree for the give process. More... | |
Proc file system public functions and structures.
proc_dir_entry_t* proc_create_entry | ( | const char * | name, |
proc_dir_entry_t * | parent | ||
) |
Creates a new entry inside the procfs filesystem.
name | The name of the entry we are creating. |
parent | The parent (optional). |
int proc_destroy_entry | ( | const char * | name, |
proc_dir_entry_t * | parent | ||
) |
Removes an entry from the procfs filesystem.
name | The name of the entry we are removing. |
parent | The parent (optional). |
proc_dir_entry_t* proc_dir_entry_get | ( | const char * | name, |
proc_dir_entry_t * | parent | ||
) |
Finds the direntry inside /proc
or under the given parent
.
name | The name of the entry we are searching. |
parent | The parent (optional). |
int proc_entry_set_mask | ( | proc_dir_entry_t * | entry, |
mode_t | mask | ||
) |
Sets the mask of a given procfs entry.
entry | Pointer to the entry. |
mask | The mask to set. |
proc_dir_entry_t* proc_mkdir | ( | const char * | name, |
proc_dir_entry_t * | parent | ||
) |
Creates a new directory inside the procfs filesystem.
name | The name of the entry we are creating. |
parent | The parent (optional). |
int proc_rmdir | ( | const char * | name, |
proc_dir_entry_t * | parent | ||
) |
Removes a directory from the procfs filesystem.
name | The name of the entry we are removing. |
parent | The parent (optional). |
int procfs_cleanup_module | ( | void | ) |
Clean up the procfs filesystem.
int procfs_module_init | ( | void | ) |
Initialize the procfs filesystem.
int procr_create_entry_pid | ( | task_struct * | entry | ) |
Create the entire procfs entry tree for the give process.
entry | Pointer to the task_struct of the process. |
int procr_destroy_entry_pid | ( | task_struct * | entry | ) |
Destroy the entire procfs entry tree for the give process.
entry | Pointer to the task_struct of the process. |