diff options
author | Toomas Soome <tsoome@me.com> | 2014-10-30 15:24:08 +0200 |
---|---|---|
committer | Gordon Ross <gwr@nexenta.com> | 2014-11-25 10:15:39 -0500 |
commit | 9e573dcc6440324d76c37be570afdef86f045685 (patch) | |
tree | 2f5efd0ccdc54fc4c9c85c245e360b2df96d1bf1 /usr/src | |
parent | 21920a0a2f368f65491623e68d7c66dfd09c46f4 (diff) | |
download | illumos-gate-9e573dcc6440324d76c37be570afdef86f045685.tar.gz |
5104 reboot should check for (and remove) extra -B zfs-bootfs options.
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/halt/halt.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/src/cmd/halt/halt.c b/usr/src/cmd/halt/halt.c index ba969a369c..36867c88dc 100644 --- a/usr/src/cmd/halt/halt.c +++ b/usr/src/cmd/halt/halt.c @@ -1210,8 +1210,13 @@ parse_fastboot_args(char *bootargs_buf, size_t buf_size, } if (is_zfs && (buflen != 0 || bename != NULL)) { - /* LINTED E_SEC_SPRINTF_UNBOUNDED_COPY */ - off += sprintf(bootargs_buf + off, "%s ", bootfs_arg); + /* do not copy existing zfs boot args */ + if (strstr(&bootargs_saved[rootlen], "-B") == NULL || + strstr(&bootargs_saved[rootlen], "zfs-bootfs=") == NULL || + (strstr(&bootargs_saved[rootlen], "bootpath=") == NULL && + strstr(&bootargs_saved[rootlen], "diskdevid=") == NULL)) + /* LINTED E_SEC_SPRINTF_UNBOUNDED_COPY */ + off += sprintf(bootargs_buf + off, "%s ", bootfs_arg); } /* |