aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--com32/gfxboot/gfxboot.c20
-rw-r--r--com32/lib/sys/open.c6
-rw-r--r--version2
3 files changed, 24 insertions, 4 deletions
diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c
index 65b2d498..552728fd 100644
--- a/com32/gfxboot/gfxboot.c
+++ b/com32/gfxboot/gfxboot.c
@@ -319,7 +319,7 @@ int read_config_file(const char *filename)
{
FILE *f;
char *s, *t, buf[MAX_CONFIG_LINE_LEN];
- unsigned u, top_level = 0;
+ unsigned u, top_level = 0, text = 0;
if(!strcmp(filename, "~")) {
top_level = 1;
@@ -342,6 +342,14 @@ int read_config_file(const char *filename)
if(*t) *t++ = 0;
t = skip_spaces(t);
+ if(!strcasecmp(s, "endtext")) {
+ text = 0;
+ continue;
+ }
+
+ if (text)
+ continue;
+
if(!strcasecmp(s, "timeout")) {
timeout = atoi(t);
continue;
@@ -396,6 +404,11 @@ int read_config_file(const char *filename)
continue;
}
+ if(!strcasecmp(s, "text")) {
+ text = 1;
+ continue;
+ }
+
if(!strcasecmp(s, "menu") && menu_ptr) {
s = skip_spaces(t);
t = skip_nonspaces(s);
@@ -428,6 +441,11 @@ do_include:
if (!top_level)
return 0;
+ if (gfx_menu.entries == 0) {
+ printf("No LABEL keywords found.\n");
+ return 1;
+ }
+
// final '\0'
gfx_menu.label_size++;
gfx_menu.arg_size++;
diff --git a/com32/lib/sys/open.c b/com32/lib/sys/open.c
index cb7c1b4d..3e7bb6cf 100644
--- a/com32/lib/sys/open.c
+++ b/com32/lib/sys/open.c
@@ -56,15 +56,17 @@ int open(const char *pathname, int flags, ...)
struct file_info *fp;
fd = opendev(&__file_dev, NULL, flags);
-
if (fd < 0)
return -1;
fp = &__file_info[fd];
handle = __com32.cs_pm->open_file(pathname, &fp->i.fd);
- if (handle < 0)
+ if (handle < 0) {
+ close(fd);
+ errno = ENOENT;
return -1;
+ }
fp->i.offset = 0;
fp->i.nbytes = 0;
diff --git a/version b/version
index 1152a5aa..fa3ff4d6 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-4.03 2010
+4.04 2010