Date: Mon, 17 Aug 2009 15:19:03 +0000 (UTC) From: John Hay <jhay@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r196326 - head/sys/boot/i386/gptboot Message-ID: <200908171519.n7HFJ351081727@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhay Date: Mon Aug 17 15:19:03 2009 New Revision: 196326 URL: http://svn.freebsd.org/changeset/base/196326 Log: 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: head/sys/boot/i386/gptboot/gptboot.c Modified: head/sys/boot/i386/gptboot/gptboot.c ============================================================================== --- head/sys/boot/i386/gptboot/gptboot.c Mon Aug 17 14:53:59 2009 (r196325) +++ head/sys/boot/i386/gptboot/gptboot.c Mon Aug 17 15:19:03 2009 (r196326) @@ -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++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908171519.n7HFJ351081727>