From 4e995f2a014b6efa1fa6b0cf17c7f63ed51acf69 Mon Sep 17 00:00:00 2001 From: Marcel Telka Date: Wed, 29 Jan 2020 06:55:18 +0100 Subject: 12256 reboot(1m) looks for 32-bit kernel only Reviewed by: Toomas Soome Reviewed by: Alexander Pyhalov Reviewed by: C Fraire Approved by: Dan McDonald --- usr/src/cmd/halt/halt.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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]; -- cgit v1.2.3