This patch implements the "filesystems" file for the linux procfs. Few programs use this file but some exceptions as "procinfo" and other system information utilities. Fix: The attached patch implements the mentioned file. It was tested against 8.0-RELEASE-p1. Patch attached with submission follows:
Responsible Changed From-To: freebsd-bugs->freebsd-emulation Over to maintainer(s).
committed by jhb@ in HEAD with r205541. please mark patched and assign to him. -- Alexander Best
State Changed From-To: open->patched Fixed in head in r205541.
Responsible Changed From-To: freebsd-emulation->jhb Over to jhb@ for MFC consideration
State Changed From-To: patched->closed Merged to 8.
Author: jhb Date: Mon Mar 4 18:28:24 2013 New Revision: 247808 URL: http://svnweb.freebsd.org/changeset/base/247808 Log: MFC 205541,205592: Implement /proc/filesystems. PR: kern/142595 Modified: stable/8/sys/compat/linprocfs/linprocfs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/compat/ (props changed) Modified: stable/8/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/8/sys/compat/linprocfs/linprocfs.c Mon Mar 4 18:07:28 2013 (r247807) +++ stable/8/sys/compat/linprocfs/linprocfs.c Mon Mar 4 18:28:24 2013 (r247808) @@ -1427,6 +1427,24 @@ linprocfs_docmdline(PFS_FILL_ARGS) return (0); } +/* + * Filler function for proc/filesystems + */ +static int +linprocfs_dofilesystems(PFS_FILL_ARGS) +{ + struct vfsconf *vfsp; + + mtx_lock(&Giant); + 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); + } + mtx_unlock(&Giant); + return(0); +} + #if 0 /* * Filler function for proc/modules @@ -1462,6 +1480,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, _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"