diff --git a/ChangeLog b/ChangeLog index d7b2c3f30..aed1fc299 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2001-12-11 Yoshinori K. Okuji + + * stage2/builtins.c (displayapm_func): Don't use multi-line + string literals but string concatenation instead, to suppress + warnings from gcc-3.0.x. + * stage2/cmdline.c (print_cmdline_message): Likewise. + * util/mbchk.c (usage): Likewise. + + * stage2/smp-imps.c (imps_read_config_table): Add a break + statement after the label ``default''. + + * util/mbchk.c: Include for the prototype of exit. + + * stage2/serial.c (serial_port): Initialize with 0 instead of + -1, as an invalid value, because SERIAL_PORT is unsigned. This + change shouldn't affect anything. + (serial_exists): For the above change, check SERIAL_PORT with 0 + instead of -1. + 2001-12-10 Yoshinori K. Okuji * stage2/shared.h (ERR_NO_DISK_SPACE): New constant. diff --git a/stage2/builtins.c b/stage2/builtins.c index 976dfd6cc..08c25c8be 100644 --- a/stage2/builtins.c +++ b/stage2/builtins.c @@ -877,15 +877,15 @@ displayapm_func (char *arg, int flags) { if (mbi.flags & MB_INFO_APM_TABLE) { - grub_printf ("APM BIOS information: - Version: 0x%x - 32-bit CS: 0x%x - Offset: 0x%x - 16-bit CS: 0x%x - 16-bit DS: 0x%x - 32-bit CS length: 0x%x - 16-bit CS length: 0x%x - 16-bit DS length: 0x%x\n", + grub_printf ("APM BIOS information:\n" + " Version: 0x%x\n" + " 32-bit CS: 0x%x\n" + " Offset: 0x%x\n" + " 16-bit CS: 0x%x\n" + " 16-bit DS: 0x%x\n" + " 32-bit CS length: 0x%x\n" + " 16-bit CS length: 0x%x\n" + " 16-bit DS length: 0x%x\n", (unsigned) apm_bios_info.version, (unsigned) apm_bios_info.cseg, apm_bios_info.offset, diff --git a/stage2/cmdline.c b/stage2/cmdline.c index a1a5ccff5..96dd823e3 100644 --- a/stage2/cmdline.c +++ b/stage2/cmdline.c @@ -1,7 +1,7 @@ /* cmdline.c - the device-independent GRUB text command line */ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 1999, 2000 Free Software Foundation, Inc. + * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -49,10 +49,9 @@ skip_to (int after_equal, char *cmdline) void print_cmdline_message (int forever) { - printf ("\ - [ Minimal BASH-like line editing is supported. For the first word, TAB - lists possible command completions. Anywhere else TAB lists the possible - completions of a device/filename.%s ]\n", + printf (" [ Minimal BASH-like line editing is supported. For the first word, TAB\n" + " lists possible command completions. Anywhere else TAB lists the possible\n" + " completions of a device/filename.%s ]\n", (forever ? "" : " ESC at any time exits.")); } diff --git a/stage2/serial.c b/stage2/serial.c index 10a8d2bd9..a72b9bfce 100644 --- a/stage2/serial.c +++ b/stage2/serial.c @@ -31,7 +31,7 @@ struct divisor }; /* Store the port number of a serial unit. */ -static unsigned short serial_port = -1; +static unsigned short serial_port = 0; /* The table which lists common configurations. */ static struct divisor divisor_tab[] = @@ -106,7 +106,7 @@ serial_putchar (int c) int serial_exists (void) { - return serial_port != -1; + return serial_port != 0; } /* Return the port number for the UNITth serial device. */ diff --git a/stage2/smp-imps.c b/stage2/smp-imps.c index b033feb8b..2fb6caeb9 100644 --- a/stage2/smp-imps.c +++ b/stage2/smp-imps.c @@ -434,6 +434,7 @@ imps_read_config_table (unsigned start, int count) break; #endif default: + break; } start += 8; } diff --git a/util/mbchk.c b/util/mbchk.c index 6c2c19b60..ee738e59c 100644 --- a/util/mbchk.c +++ b/util/mbchk.c @@ -1,6 +1,6 @@ /* mbchk - a simple checker for the format of a Multiboot kernel */ /* - * Copyright (C) 1999 Free Software Foundation, Inc. + * Copyright (C) 1999, 2001 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -39,15 +40,14 @@ usage (int status) if (status) fprintf (stderr, "Try ``mbchk --help'' for more information.\n"); else - printf ("Usage: mbchk [OPTION]... [FILE]... -Check if the format of FILE complies with the Multiboot Specification. - - -q, --quiet suppress all normal output - -h, --help display this help and exit - -v, --version output version information and exit. - -Report bugs to . -"); + printf ("Usage: mbchk [OPTION]... [FILE]...\n" + "Check if the format of FILE complies with the Multiboot Specification.\n" + "\n" + "-q, --quiet suppress all normal output\n" + "-h, --help display this help and exit\n" + "-v, --version output version information and exit.\n" + "\n" + "Report bugs to .\n"); exit (status); }