Author: jhay
Date: Mon Aug 17 15:39:47 2009
New Revision: 196328
URL: http://svn.freebsd.org/changeset/base/196328

Log:
  MFC: 196326
  Fix parse() so that the partition to boot (load /boot/loader) from can
  be set. The syntax as printed in main() is used: 0:ad(0p3)/boot/loader
  
  Reviewed by:  jhb
  Approved by:  re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/i386/gptboot/gptboot.c
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/mfi/   (props changed)
  stable/8/sys/dev/xen/netfront/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/netipx/spx_reass.c   (props changed)

Modified: stable/8/sys/boot/i386/gptboot/gptboot.c
==============================================================================
--- stable/8/sys/boot/i386/gptboot/gptboot.c    Mon Aug 17 15:39:45 2009        
(r196327)
+++ stable/8/sys/boot/i386/gptboot/gptboot.c    Mon Aug 17 15:39:47 2009        
(r196328)
@@ -466,16 +466,13 @@ parse(void)
                dsk.type = i;
                arg += 3;
                dsk.unit = *arg - '0';
-               if (arg[1] != ',' || dsk.unit > 9)
+               if (arg[1] != 'p' || dsk.unit > 9)
                    return -1;
                arg += 2;
-               dsk.part = -1;
-               if (arg[1] == ',') {
-                   dsk.part = *arg - '0';
-                   if (dsk.part < 1 || dsk.part > 9)
-                       return -1;
-                   arg += 2;
-               }
+               dsk.part = *arg - '0';
+               if (dsk.part < 1 || dsk.part > 9)
+                   return -1;
+               arg++;
                if (arg[0] != ')')
                    return -1;
                arg++;
_______________________________________________
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-unsubscr...@freebsd.org"

Reply via email to