Date: Wed, 25 Apr 2012 07:27:13 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r234680 - in stable/8/sys: boot/i386/zfsboot i386/conf Message-ID: <201204250727.q3P7RD74085863@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Wed Apr 25 07:27:13 2012 New Revision: 234680 URL: http://svn.freebsd.org/changeset/base/234680 Log: MFC r234339: zfsboot: honor -q if it's present in boot.config Modified: stable/8/sys/boot/i386/zfsboot/zfsboot.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) 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/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- stable/8/sys/boot/i386/zfsboot/zfsboot.c Wed Apr 25 07:23:35 2012 (r234679) +++ stable/8/sys/boot/i386/zfsboot/zfsboot.c Wed Apr 25 07:27:13 2012 (r234680) @@ -93,6 +93,7 @@ static const char *const dev_nm[NDEV] = static const unsigned char dev_maj[NDEV] = {30, 4, 2}; static char cmd[512]; +static char cmddup[512]; static char kname[1024]; static int comspeed = SIOSPD; static struct bootinfo bootinfo; @@ -536,10 +537,15 @@ main(void) } if (*cmd) { - if (!OPT_CHECK(RBX_QUIET)) - printf("%s: %s", PATH_CONFIG, cmd); + /* + * Note that parse() is destructive to cmd[] and we also want + * to honor RBX_QUIET option that could be present in cmd[]. + */ + memcpy(cmddup, cmd, sizeof(cmd)); if (parse()) autoboot = 0; + if (!OPT_CHECK(RBX_QUIET)) + printf("%s: %s", PATH_CONFIG, cmddup); /* Do not process this command twice */ *cmd = 0; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204250727.q3P7RD74085863>