Bug 142595 - Implementation of "filesystems" file in linprocfs(5)
Summary: Implementation of "filesystems" file in linprocfs(5)
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 8.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: John Baldwin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-10 21:20 UTC by Fernando Apesteguía
Modified: 2013-03-04 18:30 UTC (History)
0 users

See Also:


Attachments
file.diff (1.06 KB, patch)
2010-01-10 21:20 UTC, Fernando Apesteguía
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Apesteguía freebsd_committer freebsd_triage 2010-01-10 21:20:01 UTC
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:
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2010-01-10 21:22:57 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-emulation

Over to maintainer(s).
Comment 2 Alexander Best 2010-03-24 16:41:26 UTC
committed by jhb@ in HEAD with r205541. please mark patched and assign to him.

-- 
Alexander Best
Comment 3 Gavin Atkinson freebsd_committer freebsd_triage 2010-03-24 17:17:54 UTC
State Changed
From-To: open->patched

Fixed in head in r205541. 


Comment 4 Gavin Atkinson freebsd_committer freebsd_triage 2010-03-24 17:17:54 UTC
Responsible Changed
From-To: freebsd-emulation->jhb

Over to jhb@ for MFC consideration
Comment 5 John Baldwin freebsd_committer freebsd_triage 2013-03-04 18:28:28 UTC
State Changed
From-To: patched->closed

Merged to 8.
Comment 6 dfilter service freebsd_committer freebsd_triage 2013-03-04 18:28:31 UTC
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"