aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-09-22 11:07:22 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-09-22 11:08:35 -0700
commit4aaa347aba58df3bc0916fc4711749e6cf99a813 (patch)
treeb3254057d3820b83041a7f58145a1d281a322237
parentaa48bfd3324727b87b3654d5615a64e1edf2e6d7 (diff)
downloadsyslinux-elf-4aaa347aba58df3bc0916fc4711749e6cf99a813.tar.gz
syslinux-elf-4aaa347aba58df3bc0916fc4711749e6cf99a813.tar.xz
syslinux-elf-4aaa347aba58df3bc0916fc4711749e6cf99a813.zip
simple menu: make "menu default" work after "menu begin"
Make "menu default" work after "menu begin", similar to after "label". This is consistent with how "menu label" works. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--com32/menu/readconfig.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c
index e26105ad..0d3093b2 100644
--- a/com32/menu/readconfig.c
+++ b/com32/menu/readconfig.c
@@ -624,7 +624,11 @@ static void parse_config_file(FILE *f)
}
}
} else if ( looking_at(p, "default") ) {
- ld.menudefault = 1;
+ if (ld.label) {
+ ld.menudefault = 1;
+ } else if (m->parent_entry) {
+ m->parent->defentry = m->parent_entry->entry;
+ }
} else if ( looking_at(p, "hide") ) {
ld.menuhide = 1;
} else if ( looking_at(p, "passwd") ) {