projects
/
profile
/
ivi
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
07f71a9
)
Print an error message if the configuration file seems empty.
author
hpa
<hpa>
Tue, 4 Jan 2005 03:04:00 +0000
(
03:04
+0000)
committer
hpa
<hpa>
Tue, 4 Jan 2005 03:04:00 +0000
(
03:04
+0000)
com32/modules/Makefile
patch
|
blob
|
history
com32/modules/menu.c
patch
|
blob
|
history
diff --git
a/com32/modules/Makefile
b/com32/modules/Makefile
index
8f7ff0a
..
23efeb5
100644
(file)
--- a/
com32/modules/Makefile
+++ b/
com32/modules/Makefile
@@
-20,14
+20,14
@@
gcc_ok = $(shell if gcc $(1) -c -x c /dev/null -o /dev/null 2>/dev/null; \
M32 := $(call gcc_ok,-m32,)
M32 := $(call gcc_ok,-m32,)
-CC = gcc
$(M32)
+CC = gcc
LD = ld -m elf_i386
AR = ar
NASM = nasm
RANLIB = ranlib
LD = ld -m elf_i386
AR = ar
NASM = nasm
RANLIB = ranlib
-CFLAGS = -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include -D__COM32__
-LNXCFLAGS = -W -Wall -
march=i386 -Os
-g -I../libutil/include
-LNXSFLAGS = -
march=i386
+CFLAGS =
$(M32)
-mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include -D__COM32__
+LNXCFLAGS = -W -Wall -
O
-g -I../libutil/include
+LNXSFLAGS = -
g
LNXLDFLAGS = -g
SFLAGS = -D__COM32__ -march=i386
LDFLAGS = -T ../lib/com32.ld
LNXLDFLAGS = -g
SFLAGS = -D__COM32__ -march=i386
LDFLAGS = -T ../lib/com32.ld
diff --git
a/com32/modules/menu.c
b/com32/modules/menu.c
index
9b91868
..
039e55c
100644
(file)
--- a/
com32/modules/menu.c
+++ b/
com32/modules/menu.c
@@
-1,7
+1,7
@@
#ident "$Id$"
/* ----------------------------------------------------------------------- *
*
#ident "$Id$"
/* ----------------------------------------------------------------------- *
*
- * Copyright 2004 H. Peter Anvin - All Rights Reserved
+ * Copyright 2004
-2005
H. Peter Anvin - All Rights Reserved
*
* 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
*
* 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
@@
-399,7
+399,8
@@
void __attribute__((noreturn)) execute(const char *cmdline)
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
- const char *cmdline;
+ const char *cmdline = NULL;
+ int err = 0;
(void)argc;
(void)argc;
@@
-408,10
+409,16
@@
int main(int argc, char *argv[])
parse_config(argv[1]);
parse_config(argv[1]);
- cmdline = run_menu();
+ if ( !nentries ) {
+ fputs("No LABEL entries found in configuration file!\n", stdout);
+ err = 1;
+ } else {
+ cmdline = run_menu();
+ }
+
printf("\033[?25h\033[%d;1H\033[0m", END_ROW);
if ( cmdline )
execute(cmdline);
else
printf("\033[?25h\033[%d;1H\033[0m", END_ROW);
if ( cmdline )
execute(cmdline);
else
- return
0
;
+ return
err
;
}
}