From owner-svn-src-stable@freebsd.org Tue Nov 27 16:13:57 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E1DD115237B; Tue, 27 Nov 2018 16:13:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D41EF8363A; Tue, 27 Nov 2018 16:13:56 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2CB01DAAE; Tue, 27 Nov 2018 16:13:56 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wARGDu1w023007; Tue, 27 Nov 2018 16:13:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wARGDuDM023006; Tue, 27 Nov 2018 16:13:56 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201811271613.wARGDuDM023006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 27 Nov 2018 16:13:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r341070 - stable/12/stand/i386/gptboot X-SVN-Group: stable-12 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/12/stand/i386/gptboot X-SVN-Commit-Revision: 341070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D41EF8363A X-Spamd-Result: default: False [1.07 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_MEDIUM(0.63)[0.632,0]; NEURAL_HAM_SHORT(-0.01)[-0.007,0]; NEURAL_SPAM_LONG(0.44)[0.441,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2018 16:13:57 -0000 Author: ian Date: Tue Nov 27 16:13:56 2018 New Revision: 341070 URL: https://svnweb.freebsd.org/changeset/base/341070 Log: Revert r341069, I committed it to the wrong branch. Modified: stable/12/stand/i386/gptboot/gptboot.c Modified: stable/12/stand/i386/gptboot/gptboot.c ============================================================================== --- stable/12/stand/i386/gptboot/gptboot.c Tue Nov 27 16:09:16 2018 (r341069) +++ stable/12/stand/i386/gptboot/gptboot.c Tue Nov 27 16:13:56 2018 (r341070) @@ -81,6 +81,7 @@ uint32_t opts; static const char *const dev_nm[NDEV] = {"ad", "da", "fd"}; static const unsigned char dev_maj[NDEV] = {30, 4, 2}; +static struct dsk dsk; static char kname[1024]; static int comspeed = SIOSPD; static struct bootinfo bootinfo; @@ -568,22 +569,22 @@ parse_cmds(char *cmdstr, int *dskupdated) arg[1] != dev_nm[i][1]; i++) if (i == NDEV - 1) return (-1); - gdsk.dsk.type = i; + dsk.type = i; arg += 3; - gdsk.dsk.unit = *arg - '0'; - if (arg[1] != 'p' || gdsk.dsk.unit > 9) + dsk.unit = *arg - '0'; + if (arg[1] != 'p' || dsk.unit > 9) return (-1); arg += 2; - gdsk.dsk.part = *arg - '0'; - if (gdsk.dsk.part < 1 || gdsk.dsk.part > 9) + dsk.part = *arg - '0'; + if (dsk.part < 1 || dsk.part > 9) return (-1); arg++; if (arg[0] != ')') return (-1); arg++; if (drv == -1) - drv = gdsk.dsk.unit; - gdsk.dsk.drive = (gdsk.dsk.type <= TYPE_MAXHARD + drv = dsk.unit; + dsk.drive = (dsk.type <= TYPE_MAXHARD ? DRV_HARD : 0) + drv; *dskupdated = 1; }