diff options
author | jhb <jhb@FreeBSD.org> | 2010-03-23 21:49:33 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2010-03-23 21:49:33 +0000 |
commit | 878de09a93e08cb18bd6536eea31295915a0314c (patch) | |
tree | e06358823a63a5c81ed77bb13fbdc4032500149a /sys/compat/linprocfs | |
parent | 399c01844ad297de82f83cc99f989358723baf51 (diff) | |
download | FreeBSD-src-878de09a93e08cb18bd6536eea31295915a0314c.zip FreeBSD-src-878de09a93e08cb18bd6536eea31295915a0314c.tar.gz |
Implement /proc/filesystems.
Submitted by: Fernando Apesteguia fernando.apesteguia (gmail)
Diffstat (limited to 'sys/compat/linprocfs')
-rw-r--r-- | sys/compat/linprocfs/linprocfs.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index ba08fd2..416efcf 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -1227,6 +1227,22 @@ linprocfs_docmdline(PFS_FILL_ARGS) return (0); } +/* + * Filler function for proc/filesystems + */ +static int +linprocfs_dofilesystems(PFS_FILL_ARGS) +{ + struct vfsconf *vfsp; + + TAILQ_FOREACH(vfsp, &vfsconf, vfc_list) { + if (vfsp->vfc_flags & VFCF_SYNTHETIC) + sbuf_printf(sb, "nodev"); + sbuf_printf(sb, "\t%s\n", vfsp->vfc_name); + } + return(0); +} + #if 0 /* * Filler function for proc/modules @@ -1276,6 +1292,8 @@ linprocfs_init(PFS_INIT_ARGS) NULL, NULL, NULL, PFS_RD); pfs_create_file(root, "devices", &linprocfs_dodevices, NULL, NULL, NULL, PFS_RD); + pfs_create_file(root, "filesystems", &linprocfs_dofilesystems, + NULL, NULL, NULL, PFS_RD); pfs_create_file(root, "loadavg", &linprocfs_doloadavg, NULL, NULL, NULL, PFS_RD); pfs_create_file(root, "meminfo", &linprocfs_domeminfo, |