From nobody@FreeBSD.org  Mon Apr 15 13:14:05 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 7E21812F
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 Apr 2013 13:14:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 6ED2EF8D
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 Apr 2013 13:14:05 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r3FDE5n4081245
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 Apr 2013 13:14:05 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r3FDE5GF081240;
	Mon, 15 Apr 2013 13:14:05 GMT
	(envelope-from nobody)
Message-Id: <201304151314.r3FDE5GF081240@red.freebsd.org>
Date: Mon, 15 Apr 2013 13:14:05 GMT
From: Bjrn Heidotting <b.heidotting@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] order EXAMPLE section in devfs(8) manpage
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         177870
>Category:       docs
>Synopsis:       [patch] order EXAMPLE section in devfs(8) manpage
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    joel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 15 13:20:00 UTC 2013
>Closed-Date:    Sun Apr 21 10:09:35 UTC 2013
>Last-Modified:  Sun Apr 21 10:10:00 UTC 2013
>Originator:     Bjrn Heidotting
>Release:        FreeBSD 9.1
>Organization:
>Environment:
>Description:
In the devfs(8) manpage:
move EXAMPLES descriptions to before the actual command.
>How-To-Repeat:

>Fix:
A patch is included in this report.

Patch attached with submission follows:

--- devfs.8	2013-04-15 14:54:17.000000000 +0200
+++ devfs_work.8	2013-04-15 14:48:27.000000000 +0200
@@ -269,13 +269,11 @@
 .Pa /dev
 (this only matters for things that might change the properties of nodes).
 .Pp
-.Dl "devfs ruleset 10"
-.Pp
 Specify that ruleset 10 should be the current ruleset for
 .Pa /dev
 (if it does not already exist, it is created).
 .Pp
-.Dl "devfs rule add path speaker mode 666"
+.Dl "devfs ruleset 10"
 .Pp
 Add a rule that causes all nodes that have a path that matches
 .Dq Li speaker
@@ -293,7 +291,7 @@
 .Pa atspeaker
 module is loaded after the above rule is added).
 .Pp
-.Dl "devfs rule applyset"
+.Dl "devfs rule add path speaker mode 666"
 .Pp
 Apply all the rules in the current ruleset to all the existing nodes.
 E.g., if the above rule was added after
@@ -302,7 +300,7 @@
 this command will cause its file mode to be changed to 666
 as prescribed by the rule.
 .Pp
-.Dl devfs rule add path "snp*" mode 660 group snoopers
+.Dl "devfs rule applyset"
 .Pp
 (Quoting the argument to
 .Cm path
@@ -317,7 +315,7 @@
 .Xr snp 4
 devices.
 .Pp
-.Dl "devfs rule -s 20 add type disk group wheel"
+.Dl devfs rule add path "snp*" mode 660 group snoopers
 .Pp
 Add a rule to ruleset number 20.
 Since this ruleset is not the current ruleset for any mount-points,
@@ -325,34 +323,34 @@
 a current ruleset for some mount-point at a later time).
 However, it can be applied explicitly, as such:
 .Pp
-.Dl "devfs -m /my/jail/dev rule -s 20 applyset"
+.Dl "devfs rule -s 20 add type disk group wheel"
 .Pp
 This will apply all rules in ruleset number 20 to the DEVFS mount on
 .Pa /my/jail/dev .
 It does not matter that ruleset 20 is not the current ruleset for that
 mount-point; the rules are still applied.
 .Pp
-.Dl "devfs rule apply hide"
+.Dl "devfs -m /my/jail/dev rule -s 20 applyset"
 .Pp
 Since this rule has no conditions, the action
 .Pq Cm hide
 will be applied to all nodes.
 Since hiding all nodes is not very useful, we can undo it:
 .Pp
-.Dl "devfs rule apply unhide"
+.Dl "devfs rule apply hide"
 .Pp
 which applies
 .Cm unhide
 to all the nodes,
 causing them to reappear.
 .Pp
-.Dl "devfs rule -s 10 add - < my_rules"
+.Dl "devfs rule apply unhide"
 .Pp
 Add all the rules from the file
 .Pa my_rules
 to ruleset 10.
 .Pp
-.Dl "devfs rule -s 20 show | devfs rule -s 10 add -"
+.Dl "devfs rule -s 10 add - < my_rules"
 .Pp
 Since
 .Cm show
@@ -362,6 +360,8 @@
 The rule numbers are preserved,
 but ruleset 10 may already have rules with non-conflicting numbers
 (these will be preserved).
+.Pp
+.Dl "devfs rule -s 20 show | devfs rule -s 10 add -"
 .Sh SEE ALSO
 .Xr chmod 1 ,
 .Xr jail 2 ,


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->joel 
Responsible-Changed-By: joel 
Responsible-Changed-When: Sat Apr 20 22:28:28 UTC 2013 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177870 
State-Changed-From-To: open->closed 
State-Changed-By: joel 
State-Changed-When: Sun Apr 21 10:09:04 UTC 2013 
State-Changed-Why:  
Committed with some modifications. Thanks. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/177870: commit references a PR
Date: Sun, 21 Apr 2013 10:08:41 +0000 (UTC)

 Author: joel (doc committer)
 Date: Sun Apr 21 10:08:33 2013
 New Revision: 249720
 URL: http://svnweb.freebsd.org/changeset/base/249720
 
 Log:
   Move EXAMPLES descriptions to before the actual command.
   
   PR:		177870
   Submitted by:	Bjorn Heidotting <b.heidotting@yahoo.com>
 
 Modified:
   head/sbin/devfs/devfs.8
 
 Modified: head/sbin/devfs/devfs.8
 ==============================================================================
 --- head/sbin/devfs/devfs.8	Sun Apr 21 09:10:35 2013	(r249719)
 +++ head/sbin/devfs/devfs.8	Sun Apr 21 10:08:33 2013	(r249720)
 @@ -25,7 +25,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd February 21, 2010
 +.Dd April 21, 2013
  .Dt DEVFS 8
  .Os
  .Sh NAME
 @@ -269,13 +269,11 @@ the operations are performed on
  .Pa /dev
  (this only matters for things that might change the properties of nodes).
  .Pp
 -.Dl "devfs ruleset 10"
 -.Pp
  Specify that ruleset 10 should be the current ruleset for
  .Pa /dev
 -(if it does not already exist, it is created).
 +(if it does not already exist, it is created):
  .Pp
 -.Dl "devfs rule add path speaker mode 666"
 +.Dl "devfs ruleset 10"
  .Pp
  Add a rule that causes all nodes that have a path that matches
  .Dq Li speaker
 @@ -291,22 +289,19 @@ be changed if the node is created
  the rule is added
  (e.g., the
  .Pa atspeaker
 -module is loaded after the above rule is added).
 +module is loaded after the above rule is added):
  .Pp
 -.Dl "devfs rule applyset"
 +.Dl "devfs rule add path speaker mode 666"
  .Pp
  Apply all the rules in the current ruleset to all the existing nodes.
 -E.g., if the above rule was added after
 +E.g., if the below rule was added after
  .Pa /dev/speaker
  was created,
  this command will cause its file mode to be changed to 666
 -as prescribed by the rule.
 +as prescribed by the rule:
  .Pp
 -.Dl devfs rule add path "snp*" mode 660 group snoopers
 +.Dl "devfs rule applyset"
  .Pp
 -(Quoting the argument to
 -.Cm path
 -is often necessary to disable the shell's globbing features.)
  For all devices with a path that matches
  .Dq Li snp* ,
  set the file mode to 660 and the GID to
 @@ -315,53 +310,57 @@ This permits users in the
  .Dq Li snoopers
  group to use the
  .Xr snp 4
 -devices.
 +devices
 +(quoting the argument to
 +.Cm path
 +is often necessary to disable the shell's globbing features):
  .Pp
 -.Dl "devfs rule -s 20 add type disk group wheel"
 +.Dl devfs rule add path "snp*" mode 660 group snoopers
  .Pp
  Add a rule to ruleset number 20.
  Since this ruleset is not the current ruleset for any mount-points,
  this rule is never applied automatically (unless ruleset 20 becomes
 -a current ruleset for some mount-point at a later time).
 -However, it can be applied explicitly, as such:
 +a current ruleset for some mount-point at a later time):
  .Pp
 -.Dl "devfs -m /my/jail/dev rule -s 20 applyset"
 +.Dl "devfs rule -s 20 add type disk group wheel"
  .Pp
 -This will apply all rules in ruleset number 20 to the DEVFS mount on
 +Explicitly apply all rules in ruleset number 20 to the DEVFS mount on
  .Pa /my/jail/dev .
  It does not matter that ruleset 20 is not the current ruleset for that
 -mount-point; the rules are still applied.
 +mount-point; the rules are still applied:
  .Pp
 -.Dl "devfs rule apply hide"
 +.Dl "devfs -m /my/jail/dev rule -s 20 applyset"
  .Pp
 -Since this rule has no conditions, the action
 +Since the following rule has no conditions, the action
  .Pq Cm hide
 -will be applied to all nodes.
 -Since hiding all nodes is not very useful, we can undo it:
 +will be applied to all nodes:
  .Pp
 -.Dl "devfs rule apply unhide"
 +.Dl "devfs rule apply hide"
  .Pp
 -which applies
 +Since hiding all nodes is not very useful, we can undo it.
 +The following applies
  .Cm unhide
  to all the nodes,
 -causing them to reappear.
 +causing them to reappear:
  .Pp
 -.Dl "devfs rule -s 10 add - < my_rules"
 +.Dl "devfs rule apply unhide"
  .Pp
  Add all the rules from the file
  .Pa my_rules
 -to ruleset 10.
 +to ruleset 10:
  .Pp
 -.Dl "devfs rule -s 20 show | devfs rule -s 10 add -"
 +.Dl "devfs rule -s 10 add - < my_rules"
  .Pp
 -Since
 -.Cm show
 -outputs valid rules,
 -this feature can be used to copy rulesets.
 -The above copies all the rules from ruleset 20 into ruleset 10.
 +The below copies all the rules from ruleset 20 into ruleset 10.
  The rule numbers are preserved,
  but ruleset 10 may already have rules with non-conflicting numbers
  (these will be preserved).
 +Since
 +.Cm show
 +outputs valid rules,
 +this feature can be used to copy rulesets:
 +.Pp
 +.Dl "devfs rule -s 20 show | devfs rule -s 10 add -"
  .Sh SEE ALSO
  .Xr chmod 1 ,
  .Xr jail 2 ,
 _______________________________________________
 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"
 
>Unformatted:
