From rsmith@xs4all.nl  Wed Nov 12 13:30:03 2008
Return-Path: <rsmith@xs4all.nl>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E3C7A106567A
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Nov 2008 13:30:03 +0000 (UTC)
	(envelope-from rsmith@xs4all.nl)
Received: from smtp-vbr16.xs4all.nl (smtp-vbr16.xs4all.nl [194.109.24.36])
	by mx1.freebsd.org (Postfix) with ESMTP id 9BF228FC12
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Nov 2008 13:30:03 +0000 (UTC)
	(envelope-from rsmith@xs4all.nl)
Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160])
	by smtp-vbr16.xs4all.nl (8.13.8/8.13.8) with ESMTP id mACDG24O043668
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 12 Nov 2008 14:16:06 +0100 (CET)
	(envelope-from rsmith@xs4all.nl)
Received: by slackbox.xs4all.nl (Postfix, from userid 1001)
	id 5B44CBA8A; Wed, 12 Nov 2008 14:15:59 +0100 (CET)
Message-Id: <20081112131559.5B44CBA8A@slackbox.xs4all.nl>
Date: Wed, 12 Nov 2008 14:15:59 +0100 (CET)
From: Roland Smith <rsmith@xs4all.nl>
Reply-To: Roland Smith <rsmith@xs4all.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Enhance the explanation of using of mount options in fstab(5)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         128816
>Category:       docs
>Synopsis:       [PATCH] Enhance the explanation of using of mount options in fstab(5)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    keramida
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 12 13:40:01 UTC 2008
>Closed-Date:    Sat Dec 06 14:43:18 UTC 2008
>Last-Modified:  Sat Dec 06 14:43:18 UTC 2008
>Originator:     Roland Smith
>Release:        FreeBSD 7.1-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD slackbox.xs4all.nl 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Thu Sep 25 16:47:48 CEST 2008 rsmith@slackbox.xs4all.nl:/usr/obj/usr/src/sys/QUADSLACK amd64


	
>Description:
	The fstab manual page (and others) imply that only the -o options
	of different mount commands can be used in fstab. Other flags can
	be used as well, but this is not documented.

>How-To-Repeat:
	Read fstab(5)
>Fix:
	Apply one of the following patches to
	/usr/src/share/man/man5/fstab.5. The first patch is against HEAD
	(r1.30), while the second is against 7.1-PRERELEASE (r1.26).
----- patch for fstab.5 (r1.30) -----
--- fstab.5.orig	2008-11-12 13:32:14.000000000 +0100
+++ fstab.5	2008-11-12 14:02:58.000000000 +0100
@@ -32,7 +32,7 @@
 .\"     @(#)fstab.5	8.1 (Berkeley) 6/5/93
 .\" $FreeBSD: src/share/man/man5/fstab.5,v 1.30 2008/02/11 09:36:43 mpp Exp $
 .\"
-.Dd February 11, 2008
+.Dd November 12, 2008
 .Dt FSTAB 5
 .Os
 .Sh NAME
@@ -91,15 +91,29 @@
 It is formatted as a comma separated list of options.
 It contains at least the type of mount (see
 .Fa fs_type
-below) plus any additional options
-appropriate to the file system type.
+below) plus any additional options appropriate to the file system type.
 See the options flag
 .Pq Fl o
 in the
 .Xr mount 8
 page and the file system specific page, such as
 .Xr mount_nfs 8 ,
-for additional options that may be specified.
+for additional options that may be specified. All options that can be given
+to the file system specific mount commands can be used in 
+.Nm
+as well. They just need to be formatted differently. The arguments of the 
+.Fl o
+option can be used without the preceding
+.Fl o 
+flag. Other options need the flag and its argument separated by an equal
+sign. So for e.g. mounting an
+.Xr msdosfs 5
+filesystem, the options
+.Dq -o sync -o noatime -m 644 -M 755 -u foo -g bar
+on the command-line become
+.Dq sync,noatime,-m=644,-M=755,-u=foo,-g=bar
+in 
+.Nm .
 .Pp
 If the options ``userquota'' and/or ``groupquota'' are specified,
 the file system is automatically processed by the
----- patch for fstab.5  (r1.30) -----

----- patch for fstab.5  (r1.26) -----
--- fstab.5.orig	2008-11-12 14:09:39.000000000 +0100
+++ fstab.5	2008-11-12 14:10:53.000000000 +0100
@@ -32,7 +32,7 @@
 .\"     @(#)fstab.5	8.1 (Berkeley) 6/5/93
 .\" $FreeBSD: src/share/man/man5/fstab.5,v 1.26 2004/07/03 18:29:22 ru Exp $
 .\"
-.Dd June 5, 1993
+.Dd November 12, 2008
 .Dt FSTAB 5
 .Os
 .Sh NAME
@@ -98,15 +98,29 @@
 It is formatted as a comma separated list of options.
 It contains at least the type of mount (see
 .Fa fs_type
-below) plus any additional options
-appropriate to the file system type.
+below) plus any additional options appropriate to the file system type.
 See the options flag
 .Pq Fl o
 in the
 .Xr mount 8
 page and the file system specific page, such as
 .Xr mount_nfs 8 ,
-for additional options that may be specified.
+for additional options that may be specified. All options that can be given
+to the file system specific mount commands can be used in 
+.Nm
+as well. They just need to be formatted differently. The arguments of the 
+.Fl o
+option can be used without the preceding
+.Fl o 
+flag. Other options need the flag and its argument separated by an equal
+sign. So for e.g. mounting an
+.Xr msdosfs 5
+filesystem, the options
+.Dq -o sync -o noatime -m 644 -M 755 -u foo -g bar
+on the command-line become
+.Dq sync,noatime,-m=644,-M=755,-u=foo,-g=bar
+in 
+.Nm .
 .Pp
 If the options ``userquota'' and/or ``groupquota'' are specified,
 the file system is automatically processed by the
----- patch for fstab.5  (r1.26) -----
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->keramida 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Sun Nov 23 19:42:46 UTC 2008 
Responsible-Changed-Why:  
I'll handle this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=128816 
State-Changed-From-To: open->patched 
State-Changed-By: keramida 
State-Changed-When: Sun Nov 23 19:53:07 UTC 2008 
State-Changed-Why:  
Hi Roland, 

I committed the fix in CURRENT just now.  I used a slightly different 
wording and added .Bd instead of .Dq for the mount options, to avoid 
too-short lines in `man fstab | less'.  If the new text needs a bit of 
improvement, please feel free to send a note.  I'll try to MFC this in 
2-3 days. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=128816 
State-Changed-From-To: patched->closed 
State-Changed-By: keramida 
State-Changed-When: Sat Dec 6 14:42:47 UTC 2008 
State-Changed-Why:  
Patched in stable/6, stable/7 and releng/7.1 now. 
Thanks for the original diff :) 

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