From owner-svn-src-all@FreeBSD.ORG Mon Aug 17 15:39:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27155106568E; Mon, 17 Aug 2009 15:39:48 +0000 (UTC) (envelope-from jhay@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13B958FC55; Mon, 17 Aug 2009 15:39:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7HFdlbu082232; Mon, 17 Aug 2009 15:39:47 GMT (envelope-from jhay@svn.freebsd.org) Received: (from jhay@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7HFdlW1082230; Mon, 17 Aug 2009 15:39:47 GMT (envelope-from jhay@svn.freebsd.org) Message-Id: <200908171539.n7HFdlW1082230@svn.freebsd.org> From: John Hay Date: Mon, 17 Aug 2009 15:39:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196328 - in stable/8/sys: . amd64/include/xen boot/i386/gptboot cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/mfi dev/xen/netfront dev/xen/xenpci netipx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Aug 2009 15:39:48 -0000 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++;