diff options
author | Jeremie Koenig <jk@jk.fr.eu.org> | 2010-08-16 13:36:52 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-18 01:38:02 +0200 |
commit | 1b55547480eff13851f2d53ff96afbace11c6004 (patch) | |
tree | 59384a928d637d77987dd77bce465ba3b246c913 /procfs_nonpid_files.c | |
parent | 5af547e7fc9ddc0b472b99c6bdb7341f6204e43f (diff) | |
download | hurd-1b55547480eff13851f2d53ff96afbace11c6004.tar.gz hurd-1b55547480eff13851f2d53ff96afbace11c6004.tar.bz2 hurd-1b55547480eff13851f2d53ff96afbace11c6004.zip |
Implement /proc/mounts as a symlink to /etc/mtab
* procfs_nonpid_files.c (procfs_create_mounts): New function.
* procfs_dir.c (procfs_fill_root_dir): Call procfs_create_mounts.
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Diffstat (limited to 'procfs_nonpid_files.c')
-rw-r--r-- | procfs_nonpid_files.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/procfs_nonpid_files.c b/procfs_nonpid_files.c index 2c1209ee..f1300666 100644 --- a/procfs_nonpid_files.c +++ b/procfs_nonpid_files.c @@ -166,6 +166,19 @@ error_t procfs_create_loadavg (struct procfs_dir *dir, return err; } +error_t procfs_create_mounts (struct procfs_dir *dir, + struct node **node, + time_t timestamp) +{ + struct procfs_dir_entry *dir_entry; + int err; + + dir_entry = update_pid_entries (dir, "mounts", timestamp, "/etc/mtab"); + err = procfs_create_node (dir_entry, "mounts", node); + + return err; +} + error_t get_uptime (struct timeval *uptime) { struct timeval boot_time, now; |