[coreboot] r74 - trunk/filo/main/grub
svn at coreboot.org
svn at coreboot.org
Thu Oct 2 09:38:29 CEST 2008
Author: oxygene
Date: 2008-10-02 09:38:29 +0200 (Thu, 02 Oct 2008)
New Revision: 74
Modified:
trunk/filo/main/grub/builtins.c
Log:
Make the FILO 'color' command set a more helpful errnum rather than
using the one from the integer parser.
Signed-off-by: Alex Mauer <hawke at hawkensest.net>
Acked-by: Patrick Georgi <patrick.georgi at coresystems.de>
Modified: trunk/filo/main/grub/builtins.c
===================================================================
--- trunk/filo/main/grub/builtins.c 2008-09-30 21:14:11 UTC (rev 73)
+++ trunk/filo/main/grub/builtins.c 2008-10-02 07:38:29 UTC (rev 74)
@@ -218,8 +218,10 @@
highlight = skip_to(0, arg);
new_normal_color = color_number(normal);
- if (new_normal_color < 0 && !safe_parse_maxint(&normal, &new_normal_color))
+ if (new_normal_color < 0 && !safe_parse_maxint(&normal, &new_normal_color)) {
+ errnum = ERR_BAD_ARGUMENT;
return 1;
+ }
/* The second argument is optional, so set highlight_color to inverted NORMAL_COLOR. */
if (!*highlight)
@@ -227,8 +229,10 @@
| ((new_normal_color & 0xf) << 4));
else {
new_highlight_color = color_number(highlight);
- if (new_highlight_color < 0 && !safe_parse_maxint(&highlight, &new_highlight_color))
+ if (new_highlight_color < 0 && !safe_parse_maxint(&highlight, &new_highlight_color)) {
+ errnum = ERR_BAD_ARGUMENT;
return 1;
+ }
}
console_setcolor(new_normal_color, new_highlight_color);
More information about the coreboot
mailing list