diff options
author | Madhusudan.C.S <madhusudancs@gmail.com> | 2008-08-18 20:26:00 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-01 01:31:30 +0200 |
commit | b0c18505223662500cd54a0b901efcd69a761077 (patch) | |
tree | 6ba55e330cc1756437eae6d52cc0dae4fae8168a | |
parent | ac38ed88929c70c4ede56816c053bf170c9c2efd (diff) |
2008-08-18 Madhusudan.C.S <madhusudancs@gmail.com>
* procfs_nonpid_files.c:
(procfs_write_nonpid_stat): Changed to
procfs_read_nonpid_stat.
(procfs_write_nonpid_meminfo): Changed to
procfs_read_nonpid_meminfo.
(procfs_write_nonpid_loadavg): Changed to
procfs_read_nonpid_loadavg.
(procfs_write_nonpid_uptime): Changed to
procfs_read_nonpid_uptime.
(procfs_write_nonpid_version):Changed to
procfs_read_nonpid_version.
* procfs_pid_files.c:
(procfs_write_stat_file): Changed to
procfs_read_stat_file.
Changed the comment correspondingly from
Write to Read.
(procfs_write_cmdline_file ): Changed to
procfs_read_cmdline_file.
Changed the comment correspondingly from
Write to Read.
(procfs_write_status_file): Changed to
procfs_read_status_file.
Changed the comment correspondingly from
Write to Read.
(procfs_write_statm_file): Changed to
procfs_read_statm_file.
Changed the comment correspondingly from
Write to Read.
(procfs_write_files_contents): Changed to
procfs_read_files_contents.
Changed the comment correspondingly from
Write to Read.
Changed the call to procfs_write_nonpid_stat
to procfs_read_nonpid_stat.
Changed the call to procfs_write_stat_file
to procfs_read_stat_file.
Changed the call to procfs_write_cmdline_file
to procfs_read_cmdline_file.
Changed the call to procfs_write_status_file
to procfs_read_status_file.
Changed the call to procfs_write_statm_file
to procfs_read_statm_file.
Changed the call to procfs_write_nonpid_meminfo
to procfs_read_nonpid_meminfo.
Changed the call to procfs_write_nonpid_loadavg
to procfs_read_nonpid_loadavg.
Changed the call to procfs_write_nonpid_uptime
to procfs_read_nonpid_uptime.
Changed the call to procfs_write_nonpid_version
to procfs_read_nonpid_version.
netfs.c: (netfs_attempt_read): Changed
the call from procfs_write_files_contents
to procfs_read_files_contents.
-rw-r--r-- | netfs.c | 2 | ||||
-rw-r--r-- | procfs_nonpid_files.c | 10 | ||||
-rw-r--r-- | procfs_pid_files.c | 46 |
3 files changed, 29 insertions, 29 deletions
@@ -435,7 +435,7 @@ error_t netfs_attempt_read (struct iouser *cred, struct node *node, if (! err) { if (*len > 0) - procfs_write_files_contents (node, offset, + procfs_read_files_contents (node, offset, len, data); if (*len > 0) if (offset >= *len) diff --git a/procfs_nonpid_files.c b/procfs_nonpid_files.c index 9cb0c57a..15c09190 100644 --- a/procfs_nonpid_files.c +++ b/procfs_nonpid_files.c @@ -263,7 +263,7 @@ error_t get_total_times (struct timeval *total_user_time, return err; } -error_t procfs_write_nonpid_stat (struct dir_entry *dir_entry, +error_t procfs_read_nonpid_stat (struct dir_entry *dir_entry, off_t offset, size_t *len, void *data) { char *stat_data; @@ -387,7 +387,7 @@ SWAP_FIELD (get_swap_page_size, def_pager_info.dpi_page_size) SWAP_FIELD (get_swap_active, (def_pager_info.dpi_total_space - def_pager_info.dpi_free_space)) -error_t procfs_write_nonpid_meminfo (struct dir_entry *dir_entry, +error_t procfs_read_nonpid_meminfo (struct dir_entry *dir_entry, off_t offset, size_t *len, void *data) { char *meminfo_data; @@ -427,7 +427,7 @@ error_t procfs_write_nonpid_meminfo (struct dir_entry *dir_entry, return err; } -error_t procfs_write_nonpid_loadavg (struct dir_entry *dir_entry, +error_t procfs_read_nonpid_loadavg (struct dir_entry *dir_entry, off_t offset, size_t *len, void *data) { char *loadavg_data; @@ -455,7 +455,7 @@ error_t procfs_write_nonpid_loadavg (struct dir_entry *dir_entry, return err; } -error_t procfs_write_nonpid_uptime (struct dir_entry *dir_entry, +error_t procfs_read_nonpid_uptime (struct dir_entry *dir_entry, off_t offset, size_t *len, void *data) { char *uptime_data; @@ -497,7 +497,7 @@ error_t procfs_write_nonpid_uptime (struct dir_entry *dir_entry, return err; } -error_t procfs_write_nonpid_version (struct dir_entry *dir_entry, +error_t procfs_read_nonpid_version (struct dir_entry *dir_entry, off_t offset, size_t *len, void *data) { char *version_data; diff --git a/procfs_pid_files.c b/procfs_pid_files.c index 3ad77340..ed3a3bdc 100644 --- a/procfs_pid_files.c +++ b/procfs_pid_files.c @@ -367,12 +367,12 @@ error_t get_stat_data (pid_t pid, return err; } -/* Writes required process information to stat file +/* Reads required process information from stat file within the directory represented by pid. Return the data in DATA and actual length to be written in LEN. */ error_t -procfs_write_stat_file (struct procfs_dir_entry *dir_entry, +procfs_read_stat_file (struct procfs_dir_entry *dir_entry, off_t offset, size_t *len, void *data) { error_t err; @@ -417,12 +417,12 @@ procfs_write_stat_file (struct procfs_dir_entry *dir_entry, return err; } -/* Writes required process's command line information - to cmline file within the directory represented by - pid. Return the data in DATA and actual length to - be written in LEN. */ +/* Reads required process's command line information + from cmline file within the directory represented + by pid. Return the data in DATA and actual length + to be written in LEN. */ error_t -procfs_write_cmdline_file (struct procfs_dir_entry *dir_entry, +procfs_read_cmdline_file (struct procfs_dir_entry *dir_entry, off_t offset, size_t *len, void *data) { char *cmdline_data; @@ -445,12 +445,12 @@ procfs_write_cmdline_file (struct procfs_dir_entry *dir_entry, return err; } -/* Writes required process's information that is represented by - stat and statm in a human readable format to status file +/* Reads required process's information that is represented by + stat and statm in a human readable format from status file within the directory represented by pid. Return the data in DATA and actual length to be written in LEN. */ error_t -procfs_write_status_file (struct procfs_dir_entry *dir_entry, +procfs_read_status_file (struct procfs_dir_entry *dir_entry, off_t offset, size_t *len, void *data) { char *status_data; @@ -478,12 +478,12 @@ procfs_write_status_file (struct procfs_dir_entry *dir_entry, return err; } -/* Writes required process information to statm file +/* Reads required process information from statm file within the directory represented by pid. Return the data in DATA and actual length to be written in LEN. */ error_t -procfs_write_statm_file (struct procfs_dir_entry *dir_entry, +procfs_read_statm_file (struct procfs_dir_entry *dir_entry, off_t offset, size_t *len, void *data) { char *statm_data; @@ -514,60 +514,60 @@ procfs_write_statm_file (struct procfs_dir_entry *dir_entry, return err; } -/* Writes required process information to each of files +/* Reads required process information from each of files within directory represented by pid, for files specified by NODE. Return the data in DATA and actual length of data in LEN. */ error_t -procfs_write_files_contents (struct node *node, +procfs_read_files_contents (struct node *node, off_t offset, size_t *len, void *data) { error_t err; if (! strcmp (node->nn->dir_entry->name, "stat")) if (! strcmp (node->nn->dir_entry->dir->fs_path, "")) - err = procfs_write_nonpid_stat (node->nn->dir_entry, + err = procfs_read_nonpid_stat (node->nn->dir_entry, offset, len, data); else - err = procfs_write_stat_file (node->nn->dir_entry, + err = procfs_read_stat_file (node->nn->dir_entry, offset, len, data); if (! strcmp (node->nn->dir_entry->name, "cmdline")) - err = procfs_write_cmdline_file (node->nn->dir_entry, + err = procfs_read_cmdline_file (node->nn->dir_entry, offset, len, data); if (! strcmp (node->nn->dir_entry->name, "status")) - err = procfs_write_status_file (node->nn->dir_entry, + err = procfs_read_status_file (node->nn->dir_entry, offset, len, data); if (! strcmp (node->nn->dir_entry->name, "statm")) - err = procfs_write_statm_file (node->nn->dir_entry, + err = procfs_read_statm_file (node->nn->dir_entry, offset, len, data); if (! strcmp (node->nn->dir_entry->name, "meminfo")) if (! strcmp (node->nn->dir_entry->dir->fs_path, "")) - err = procfs_write_nonpid_meminfo (node->nn->dir_entry, + err = procfs_read_nonpid_meminfo (node->nn->dir_entry, offset, len, data); else err = ENOENT; if (! strcmp (node->nn->dir_entry->name, "loadavg")) if (! strcmp (node->nn->dir_entry->dir->fs_path, "")) - err = procfs_write_nonpid_loadavg (node->nn->dir_entry, + err = procfs_read_nonpid_loadavg (node->nn->dir_entry, offset, len, data); else err = ENOENT; if (! strcmp (node->nn->dir_entry->name, "uptime")) if (! strcmp (node->nn->dir_entry->dir->fs_path, "")) - err = procfs_write_nonpid_uptime (node->nn->dir_entry, + err = procfs_read_nonpid_uptime (node->nn->dir_entry, offset, len, data); else err = ENOENT; if (! strcmp (node->nn->dir_entry->name, "version")) if (! strcmp (node->nn->dir_entry->dir->fs_path, "")) - err = procfs_write_nonpid_version (node->nn->dir_entry, + err = procfs_read_nonpid_version (node->nn->dir_entry, offset, len, data); else err = ENOENT; |