Bug 116047

Summary: [patch] bsdlabel(8) manpage doesn't mention 'auto' type for -w
Product: Documentation Reporter: Ian Smith <smithi>
Component: Books & ArticlesAssignee: Remko Lodder <remko>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Ian Smith 2007-09-03 12:20:13 UTC
This applies equally to the 7-CURRENT manpage (footer: FreeBSD 6.2) at
http://www.freebsd.org/cgi/man.cgi?query=bsdlabel&apropos=0&sektion=0&manpath=FreeBSD+7-current&format=html

bsdlabel(8) fails to mention that type 'auto' may be used instead of not
specifying any type.  mdconfig(8), at least, uses 'bsdlabel -w md0 auto'
in an example, which is why I found it missing.

>  Writing a Standard Label
>     To write a standard label, use the form
>
>     bsdlabel -w [-An] [-m machine] disk [type]
>
>     If the drive type is specified, the entry of that name in the disktab(5)
>     file is used; otherwise a default layout is used.

'auto' is the value adopted if no type is specified anyway.  bsdlabel.c:

        case WRITE:
                if (argc == 2)
                        name = argv[1];
                else if (argc == 1)
                        name = "auto";
                else
                        usage();
                readlabel(0);
                makelabel(name, &lab);

makelabel() then uses type 'auto' to call getvirginlabel() rather than
to getdiskbyname(type) from /etc/disktab

Bit trivial for a first docs PR, but Kris said I should :)

Fix: 

A proper patch would only be against my 5.5-STABLE (Mar07) but suggested:

      If the drive type is specified, the entry of that name in the disktab(5)
-     file is used; otherwise a default layout is used.

      If the drive type is specified, the entry of that name in the disktab(5)
+     file is used; otherwise - or if specified as 'auto' - a default layout
+     is used.
How-To-Repeat: man mdconfig   # second last example
man bsdlabel   # search for 'auto'
Comment 1 dfilter service freebsd_committer freebsd_triage 2007-12-08 19:57:27 UTC
remko       2007-12-08 19:57:22 UTC

  FreeBSD src repository

  Modified files:
    sbin/bsdlabel        bsdlabel.8 
  Log:
  Attempt to describe the ''auto'' type a bit better in the default
  section (if nothing had been specified, or if the auto type had
  been specified, a default layout is used).
  
  PR:             docs/116047
  Submitted by:   Ian Smith <smithi at nimnet dot asn dot au>
                  Minor modifications by me.
  
  Revision  Changes    Path
  1.69      +3 -2      src/sbin/bsdlabel/bsdlabel.8
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 2 Remko Lodder freebsd_committer freebsd_triage 2007-12-08 19:58:07 UTC
State Changed
From-To: open->patched

Patch applied on -CURRENT.
Comment 3 Remko Lodder freebsd_committer freebsd_triage 2007-12-08 19:59:13 UTC
Responsible Changed
From-To: freebsd-doc->remko

Also take over this ticket
Comment 4 dfilter service freebsd_committer freebsd_triage 2008-02-10 12:30:36 UTC
remko       2008-02-10 12:30:30 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    sbin/bsdlabel        bsdlabel.8 
  Log:
  MFC rev 1.69 bsdlabel.8
  
    Attempt to describe the ''auto'' type a bit better in the default
    section (if nothing had been specified, or if the auto type had
    been specified, a default layout is used).
  
    PR: docs/116047
    Submitted by: Ian Smith <smithi at nimnet dot asn dot au>
    Minor modifications by me.
  
  Revision  Changes    Path
  1.60.2.4  +3 -2      src/sbin/bsdlabel/bsdlabel.8
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 dfilter service freebsd_committer freebsd_triage 2008-02-10 12:31:13 UTC
remko       2008-02-10 12:31:06 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_7)
    sbin/bsdlabel        bsdlabel.8 
  Log:
  MFC rev 1.69 bsdlabel.8
  
    Attempt to describe the ''auto'' type a bit better in the default
    section (if nothing had been specified, or if the auto type had
    been specified, a default layout is used).
  
    PR: docs/116047
    Submitted by: Ian Smith <smithi at nimnet dot asn dot au>
    Minor modifications by me.
  
  Revision  Changes    Path
  1.68.2.1  +3 -2      src/sbin/bsdlabel/bsdlabel.8
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Remko Lodder freebsd_committer freebsd_triage 2008-02-10 12:31:21 UTC
State Changed
From-To: patched->closed

MFC'ed to all relevant branches, thanks for the submission!
Comment 7 dfilter service freebsd_committer freebsd_triage 2008-02-14 21:46:26 UTC
remko       2008-02-14 21:46:19 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_7_0)
    sbin/bsdlabel        bsdlabel.8 
  Log:
  MFC rev 1.69 to 1.70 bsdlabel.8
  
    v1.70
    Remove redundant whitespace.
  
    Noticed by:   brueffer
  
    v1.69
    Attempt to describe the ''auto'' type a bit better in the default
    section (if nothing had been specified, or if the auto type had
    been specified, a default layout is used).
  
    PR:           docs/116047
    Submitted by: Ian Smith <smithi at nimnet dot asn dot au>
                  Minor modifications by me.
  
  Approved by:    re (bmah)
  
  Revision  Changes    Path
  1.68.4.1  +3 -2      src/sbin/bsdlabel/bsdlabel.8
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"