From rmh@khazad.dyndns.org  Sat Mar  5 20:44:50 2005
Return-Path: <rmh@khazad.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6961616A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  5 Mar 2005 20:44:50 +0000 (GMT)
Received: from khazad.dyndns.org (137.red-62-57-138.user.auna.net [62.57.138.137])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E8BA243D49
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  5 Mar 2005 20:44:49 +0000 (GMT)
	(envelope-from rmh@khazad.dyndns.org)
Received: from rmh by khazad.dyndns.org with local (Exim 4.34)
	id 1D7eOx-000660-CL
	for FreeBSD-gnats-submit@freebsd.org; Sat, 05 Mar 2005 19:53:23 +0100
Message-Id: <E1D7eOx-000660-CL@khazad.dyndns.org>
Date: Sat, 05 Mar 2005 19:53:23 +0100
From: Robert Millan <rmh@debian.org>
Reply-To: Robert Millan <rmh@debian.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Rename /proc/mtab to /proc/mounts
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         78464
>Category:       kern
>Synopsis:       [linprocfs] Implement /proc/mounts
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ambrisko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 05 20:50:17 GMT 2005
>Closed-Date:    Sat Feb 09 13:12:10 UTC 2008
>Last-Modified:  Sat Feb 09 13:12:10 UTC 2008
>Originator:     Robert Millan
>Release:        GNU/kFreeBSD 5.3-3 i686
>Organization:
Debian
>Environment:
System: GNU/kFreeBSD aragorn 5.3-3 #0: Thu Feb 10 15:39:57 CET 2005 i686 GNU/KFreeBSD

>Description:
Linux procfs implements /proc/mounts, which outputs suitable information to construct /etc/mtab.

In FreeBSD's linprocfs, /proc/mtab exists instead, which does exactly the same.  This simple patch
renames the device so that it matches with the one provided by Linux.

>How-To-Repeat:
	
>Fix:

--- src.old/sys/compat/linprocfs/linprocfs.c	2005-03-03 12:44:21.000000000 +0100
+++ src/sys/compat/linprocfs/linprocfs.c	2005-03-05 19:47:40.000000000 +0100
@@ -345,13 +345,11 @@
 #endif /* __i386__ || __amd64__ */
 
 /*
- * Filler function for proc/mtab
+ * Filler function for proc/mounts
  *
- * This file doesn't exist in Linux' procfs, but is included here so
- * users can symlink /compat/linux/etc/mtab to /proc/mtab
  */
 static int
-linprocfs_domtab(PFS_FILL_ARGS)
+linprocfs_domounts(PFS_FILL_ARGS)
 {
 	struct nameidata nd;
 	struct mount *mp;
@@ -402,7 +400,7 @@
 		ADD_OPTION(MNT_NOSYMFOLLOW,	"nosymfollow");
 		ADD_OPTION(MNT_NOATIME,		"noatime");
 #undef ADD_OPTION
-		/* a real Linux mtab will also show NFS options */
+		/* a real Linux mounts will also show NFS options */
 		sbuf_printf(sb, " 0 0\n");
 	}
 	mtx_unlock(&mountlist_mtx);
@@ -1031,7 +1029,7 @@
 	pfs_create_file(root, "modules", &linprocfs_domodules,
 	    NULL, NULL, PFS_RD);
 #endif
-	pfs_create_file(root, "mtab", &linprocfs_domtab,
+	pfs_create_file(root, "mounts", &linprocfs_domounts,
 	    NULL, NULL, PFS_RD);
 	pfs_create_link(root, "self", &procfs_docurproc,
 	    NULL, NULL, 0);
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->des 
Responsible-Changed-By: arved 
Responsible-Changed-When: Mon Jun 6 16:48:29 GMT 2005 
Responsible-Changed-Why:  
des maintains linprocfs 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78464 

From: Robert Millan <rmh@aybabtu.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/78464: Rename /proc/mtab to /proc/mounts
Date: Sat, 6 May 2006 12:02:32 +0200

 Hi!
 
 This PR is fixed in HEAD (/proc/mounts was enabled).
 
 I think it can be closed now.
 
 -- 
 Robert Millan
State-Changed-From-To: open->patched 
State-Changed-By: rodrigc 
State-Changed-When: Sat Jun 3 05:15:11 UTC 2006 
State-Changed-Why:  
Fixed in 1.92 of linprocfs.c.  Not in RELENG_6 yet... 


Responsible-Changed-From-To: des->ambrisko 
Responsible-Changed-By: rodrigc 
Responsible-Changed-When: Sat Jun 3 05:15:11 UTC 2006 
Responsible-Changed-Why:  
Fixed in 1.92 of linprocfs.c.  Not in RELENG_6 yet... 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78464 

From: Gavin Atkinson <ga9@york.ac.uk>
To: bug-followup@FreeBSD.org, rmh@debian.org
Cc:  
Subject: Re: kern/78464: Rename /proc/mtab to /proc/mounts
Date: Thu, 10 May 2007 10:53:08 +0100

 This was merged to RELENG_6 as /sys/compat/linprocfs/linprocfs.c
 1.89.2.2.  If this is not likely to be merged to RELENG_5, this PR
 should be closed.
State-Changed-From-To: patched->closed 
State-Changed-By: remko 
State-Changed-When: Sat Feb 9 13:12:09 UTC 2008 
State-Changed-Why:  
This needs MFC to RELENG_5, though I would like people facing this to 
encourage them to use FreeBSD-6 and/or FreeBSD-7 (preferred) since in 
the not too long future REL_5 will no longer be supported. Close the 
ticket for those reasons 

http://www.freebsd.org/cgi/query-pr.cgi?pr=78464 
>Unformatted:
