summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog1
-rw-r--r--bincode.asm8
-rwxr-xr-xgfxboot54
-rw-r--r--themes/openSUSE/src/common.inc4
4 files changed, 41 insertions, 26 deletions
diff --git a/Changelog b/Changelog
index 0507cde..33b280e 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,4 @@
+ - allow empty menus
- added new gfxtest script
- support qemu-kvm
diff --git a/bincode.asm b/bincode.asm
index 3b4f678..b9f1ba6 100644
--- a/bincode.asm
+++ b/bincode.asm
@@ -1224,7 +1224,7 @@ gfx_menu_init:
pop esi
or eax,eax
jz gfx_menu_init_90
- cmp dword [tmp_var_1],0
+ cmp dword [tmp_var_2],0
jz gfx_menu_init_90
push ecx
@@ -1236,6 +1236,8 @@ gfx_menu_init:
movzx edi,word [es:esi+menu_ent_list+2]
shl edi,4
add edi,eax
+ or ecx,ecx
+ jz gfx_menu_init_45
gfx_menu_init_40:
mov byte [es:ebx],t_string
mov [es:ebx+1],edi
@@ -1243,6 +1245,7 @@ gfx_menu_init_40:
movzx eax,word [es:esi+menu_ent_size]
add edi,eax
loop gfx_menu_init_40
+gfx_menu_init_45:
pop ecx
@@ -1254,6 +1257,8 @@ gfx_menu_init_40:
movzx edi,word [es:esi+menu_arg_list+2]
shl edi,4
add edi,eax
+ or ecx,ecx
+ jz gfx_menu_init_55
gfx_menu_init_50:
mov byte [es:ebx],t_string
mov [es:ebx+1],edi
@@ -1261,6 +1266,7 @@ gfx_menu_init_50:
movzx eax,word [es:esi+menu_arg_size]
add edi,eax
loop gfx_menu_init_50
+gfx_menu_init_55:
movzx eax,word [es:esi+menu_default]
movzx edi,word [es:esi+menu_default+2]
diff --git a/gfxboot b/gfxboot
index 7352d77..aa669c6 100755
--- a/gfxboot
+++ b/gfxboot
@@ -1741,36 +1741,40 @@ sub prepare_isolinux
system "cp /boot/vmlinuz $dst/${loader}linux" if -f "/boot/vmlinuz";
system "cp /boot/initrd $dst/${loader}initrd" if -f "/boot/initrd";
- open F, ">$dst/${loader}message";
- print F "\x0cgfxboot didn't work? Try one of those:\n";
- print F " $_\n" for (@{$menu->{list}});
- print F "\n";
- close F;
+ if(! -f "$dst/${loader}message") {
+ open F, ">$dst/${loader}message";
+ print F "\x0cgfxboot didn't work? Try one of those:\n";
+ print F " $_\n" for (@{$menu->{list}});
+ print F "\n";
+ close F;
+ }
- open F, ">$dst/${loader}isolinux.cfg";
- print F "default $menu->{list}[$menu->{default}]\n\n";
+ if(! -f "$dst/${loader}isolinux.cfg") {
+ open F, ">$dst/${loader}isolinux.cfg";
+ print F "default $menu->{list}[$menu->{default}]\n\n";
- for (@{$menu->{list}}) {
- print F "label $_\n";
- if($_ eq 'harddisk') {
- print F " localboot 0x80\n\n";
- }
- elsif($_ eq 'memtest' && -f("$dst/${loader}memtest")) {
- print F " kernel memtest\n\n";
- }
- else {
- print F " kernel linux\n append initrd=initrd splash=silent showopts\n\n";
+ for (@{$menu->{list}}) {
+ print F "label $_\n";
+ if($_ eq 'harddisk') {
+ print F " localboot 0x80\n\n";
+ }
+ elsif($_ eq 'memtest' && -f("$dst/${loader}memtest")) {
+ print F " kernel memtest\n\n";
+ }
+ else {
+ print F " kernel linux\n append initrd=initrd splash=silent showopts\n\n";
+ }
}
- }
- print F
- "implicit 1\n" .
- "gfxboot bootlogo\n" .
- "display message\n" .
- "prompt 1\n" .
- "timeout 600\n";
+ print F
+ "implicit 1\n" .
+ "gfxboot bootlogo\n" .
+ "display message\n" .
+ "prompt 1\n" .
+ "timeout 600\n";
- close F;
+ close F;
+ }
if($opt_biarch) {
symlink "i386", "$dst/boot/x86_64" if -d "$dst/boot/i386";
diff --git a/themes/openSUSE/src/common.inc b/themes/openSUSE/src/common.inc
index 79b1f6e..4dae74f 100644
--- a/themes/openSUSE/src/common.inc
+++ b/themes/openSUSE/src/common.inc
@@ -130,6 +130,8 @@
/KeyEvent {
% timeout
+ menu.texts 0 eq { pop "" -1 1 return } if
+
dup 0 eq { boot.ed.list buildcmdline 2 return } if
debug 4 ge {
@@ -591,6 +593,8 @@
/menu.args exch def
/menu.texts exch def
+ menu.texts length 0 eq { return } if
+
/mi_name "mediacheck" "" gfxconfig.set.str
mi_name {