diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-02-04 16:40:04 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-02-04 16:40:04 +0000 |
commit | 8c71dc5878ef96ba4c81652777d12fc53a5f403a (patch) | |
tree | b2a20165af395591e77a19b433a9fa865f8c5c23 /winsup/cygwin/fhandler_proc.cc | |
parent | 29e22d07d6f0146bd59b65418cd248a19f1e477a (diff) | |
download | cygnal-8c71dc5878ef96ba4c81652777d12fc53a5f403a.tar.gz cygnal-8c71dc5878ef96ba4c81652777d12fc53a5f403a.tar.bz2 cygnal-8c71dc5878ef96ba4c81652777d12fc53a5f403a.zip |
* fhandler_proc.cc (proc_tab): Add entry for mounts symlink.
(format_proc_mounts): New function to implement mounts symlink.
* fhandler_process.cc (process_tab): Add entry for mounts file.
(format_process_mounts): New function to implement mounts file.
Diffstat (limited to 'winsup/cygwin/fhandler_proc.cc')
-rw-r--r-- | winsup/cygwin/fhandler_proc.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index eba39a349..4e516e58e 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -40,6 +40,7 @@ static _off64_t format_proc_uptime (void *, char *&); static _off64_t format_proc_cpuinfo (void *, char *&); static _off64_t format_proc_partitions (void *, char *&); static _off64_t format_proc_self (void *, char *&); +static _off64_t format_proc_mounts (void *, char *&); /* names of objects in /proc */ static const virt_tab_t proc_tab[] = { @@ -54,6 +55,7 @@ static const virt_tab_t proc_tab[] = { { "cpuinfo", FH_PROC, virt_file, format_proc_cpuinfo }, { "partitions", FH_PROC, virt_file, format_proc_partitions }, { "self", FH_PROC, virt_symlink, format_proc_self }, + { "mounts", FH_PROC, virt_symlink, format_proc_mounts }, { "registry32", FH_REGISTRY, virt_directory, NULL }, { "registry64", FH_REGISTRY, virt_directory, NULL }, { "net", FH_PROCNET, virt_directory, NULL }, @@ -1127,4 +1129,11 @@ format_proc_self (void *, char *&destbuf) return __small_sprintf (destbuf, "%d", getpid ()); } +static _off64_t +format_proc_mounts (void *, char *&destbuf) +{ + destbuf = (char *) crealloc_abort (destbuf, sizeof ("self/mounts")); + return __small_sprintf (destbuf, "self/mounts"); +} + #undef print |