The current text is badly formatted and incomplete as to which optional
parts can be omitted in which way

        The file specification used is of the form:
              promdev:partition/filename options
        where: “promdev” is an optional Open Firmware device name (such as “hd”
        or “ide”) and “partition” is an optional disk partition number.  Normal
        line editing characters can be used when typing the file specification.

1. 'partition' seems like an artifact that is not at all parsed as such,
   see sys/arch/macppc/stand/ ofwdev.c and main.c where the double colon is
   parsed;  the comments confirm this with
    * this function is passed [device specifier]:[kernel]
   and
    * if the kernel image specified contains a ':' it is
    * [device]:[kernel], so separate the two fields.

   Manual tests confirm this.

2. if promdev is given, the double-colon MUST exist.
   'boot hd'  tries to boot the kernel "hd"
   'boot hd:' tries to boot the kernel "hd:"
   'boot hd:/bsd' does what it says
   'boot hd:bsd'  is equivalent to the previous line since ofwboot prepends
                  trailing slashes;  don't document to keep it simple

3. no vertical spacing makes the manual harder to read.

We could zap the entire specification and rely on wording, similar to what
boot_sparc64(8) does, but I prefer fixing the specification by removing
partition from it and adding proper markup, yielding:

     The file specification used is of the form:

           [promdev:]filename [-acds]

     where promdev is an optional Open Firmware device name (such as hd or
     ide).  Normal line editing characters can be used when typing the file
     specification.

That should be much clearer.

gkoehler greatly helped in confirming/testing various lines on his hardware.

Feedback? Objection? OK?

NB: boot(8/macppc) also mentions this, but some parts are plain wrong...
I suggest fixing that in a separate diff.


Index: share/man/man8/man8.macppc/boot_macppc.8
===================================================================
RCS file: /cvs/src/share/man/man8/man8.macppc/boot_macppc.8,v
retrieving revision 1.21
diff -u -p -r1.21 boot_macppc.8
--- share/man/man8/man8.macppc/boot_macppc.8    14 Feb 2014 12:18:27 -0000      
1.21
+++ share/man/man8/man8.macppc/boot_macppc.8    3 Sep 2022 18:08:42 -0000
@@ -93,16 +93,15 @@ If the special line
 is entered, the bootloader will attempt to restart the machine.
 .Pp
 The file specification used is of the form:
-.Dl promdev:partition/filename options
-where:
-.Dq promdev
+.Pp
+.Dl Oo Ar promdev : Oc Ns Ar filename Op Fl acds
+.Pp
+where
+.Ar promdev
 is an optional Open Firmware device name (such as
 .Dq hd
 or
-.Dq ide )
-and
-.Dq partition
-is an optional disk partition number.
+.Dq ide ) .
 Normal line editing characters can be used when typing the file
 specification.
 .Pp
Index: sys/arch/macppc/stand//ofdev.c
===================================================================
RCS file: /cvs/src/sys/arch/macppc/stand/ofdev.c,v
retrieving revision 1.26
diff -u -p -r1.26 ofdev.c
--- sys/arch/macppc/stand//ofdev.c      11 Mar 2021 11:16:59 -0000      1.26
+++ sys/arch/macppc/stand//ofdev.c      3 Sep 2022 17:45:13 -0000
@@ -55,7 +55,6 @@ char opened_name[256];
 
 /*
  * this function is passed [device specifier]:[kernel]
- * however a device specifier may contain a ':'
  */
 static int
 parsename(char *str, char **file)

Reply via email to