aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-19 14:20:53 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-19 14:20:53 -0700
commitb730320f30592528fbccb28fd2298ab2257c1851 (patch)
treea8887b2ef1114ac6f0e4d5e263ab519a1a79b2af
parentce5cbe874769be6a6aac023db161863d35ae6bc5 (diff)
downloadsyslinux-elf-b730320f30592528fbccb28fd2298ab2257c1851.tar.gz
syslinux-elf-b730320f30592528fbccb28fd2298ab2257c1851.tar.xz
syslinux-elf-b730320f30592528fbccb28fd2298ab2257c1851.zip
mboot.c32: reorganize print messages
Reorganize the mboot.c32 Solaris print messages slightly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--com32/modules/mboot.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/com32/modules/mboot.c b/com32/modules/mboot.c
index 61ef565e..2ebba066 100644
--- a/com32/modules/mboot.c
+++ b/com32/modules/mboot.c
@@ -930,7 +930,7 @@ int main(int argc, char **argv)
char *p;
size_t mbi_run_addr, mbi_size, entry;
int i;
- int opt_solaris = 0;
+ bool opt_solaris = false;
void *dhcpdata;
size_t dhcplen;
@@ -941,15 +941,12 @@ int main(int argc, char **argv)
/* This is way too ugly. */
if (!strcmp("-solaris", argv[1])) {
- opt_solaris = 1;
+ opt_solaris = true;
argv[1] = argv[0];
argv = &argv[1];
argc -= 1;
}
- if (opt_solaris)
- printf("Solaris DHCP passing enabled\n");
-
if (argc < 2 || !strcmp(argv[1], module_separator)) {
printf("Fatal: No kernel filename!\n");
exit(1);
@@ -1051,8 +1048,10 @@ int main(int argc, char **argv)
p += strlen(version_string) + 1;
if (opt_solaris) {
+ printf("Solaris DHCP passing enabled... ");
/* Try to get the DHCP ACK packet from PXE */
- if (!pxe_get_cached_info(PXENV_PACKET_TYPE_DHCP_ACK, &dhcpdata, &dhcplen)) {
+ if (!pxe_get_cached_info(PXENV_PACKET_TYPE_DHCP_ACK,
+ &dhcpdata, &dhcplen)) {
/* Solaris expects the DHCP ACK packet to be passed in the drives_*
structure. However, the flags field must indicate that the
drives_structure is not being used.
@@ -1067,9 +1066,9 @@ int main(int argc, char **argv)
mbi->boot_device = 0x20ffffff;
mbi->flags |= MB_INFO_BOOTDEV;
+ printf("ok\n");
} else {
- printf("Could not get DHCP information from PXE\n");
- return 1;
+ printf("not found.\n");
}
}