summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Telka <marcel@telka.sk>2020-01-29 06:55:18 +0100
committerDan McDonald <danmcd@joyent.com>2020-01-31 10:46:07 -0500
commit4e995f2a014b6efa1fa6b0cf17c7f63ed51acf69 (patch)
treee748767fba9c0e2adea6b4940e16c76486a00459
parentc6f039c73ee9eb7e4acb232afaca51cdf9d30ff3 (diff)
downloadillumos-joyent-4e995f2a014b6efa1fa6b0cf17c7f63ed51acf69.tar.gz
12256 reboot(1m) looks for 32-bit kernel only
Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Alexander Pyhalov <alp@sfedu.ru> Reviewed by: C Fraire <seeemef@mac.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/halt/halt.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/usr/src/cmd/halt/halt.c b/usr/src/cmd/halt/halt.c
index edd862ff39..893539611b 100644
--- a/usr/src/cmd/halt/halt.c
+++ b/usr/src/cmd/halt/halt.c
@@ -645,6 +645,19 @@ validate_disk(char *arg, char *mountpoint)
if (rc != 0)
return (rc);
+ /*
+ * Check for the usual case: 64-bit kernel
+ */
+ (void) snprintf(kernpath, MAXPATHLEN,
+ "%s/platform/i86pc/kernel/amd64/unix", mountpoint);
+ if (stat64(kernpath, &statbuf) == 0)
+ return (0);
+
+ /*
+ * We no longer build 32-bit kernel but in a case we are trying to boot
+ * some ancient filesystem with 32-bit only kernel we should be able to
+ * proceed too
+ */
(void) snprintf(kernpath, MAXPATHLEN, "%s/platform/i86pc/kernel/unix",
mountpoint);
@@ -1150,7 +1163,7 @@ parse_fastboot_args(char *bootargs_buf, size_t buf_size,
} else if (mplen != 0) {
/*
* No unix argument, but mountpoint is not empty, use
- * /platform/i86pc/$ISADIR/kernel/unix as default.
+ * /platform/i86pc/kernel/$ISADIR/unix as default.
*/
char isa[20];