Accepting request 18635 from system:install:head

Copy from system:install:head/syslinux based on submit request 18635 from user snwint

OBS-URL: https://build.opensuse.org/request/show/18635
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/syslinux?expand=0&rev=17
This commit is contained in:
OBS User autobuild 2009-08-26 13:13:42 +00:00 committed by Git OBS Bridge
parent ff0f0fdacd
commit 4bf14b52ba
4 changed files with 124 additions and 4 deletions

View File

@ -4,11 +4,22 @@ gfxboot bootlogo
before in isolinux.cfg or syslinux.cfg, change this to before in isolinux.cfg or syslinux.cfg, change this to
ui gfxboot.com bootlogo ui gfxboot bootlogo
and add /usr/share/syslinux/gfxboot.com to your boot directory (the one and add /usr/share/syslinux/gfxboot.com to your boot directory (the one
where the config file is). where the config file is).
This also means that gfxboot now works with other syslinux variants like You can also use
pxelinux or extlinux, too.
ui gfxboot bootlogo message
and remove the
display message
line. The 'message' file will be shown when you leave the gfxboot module (or
it couldn't be started).
This also means that gfxboot now works with other syslinux variants like
pxelinux or extlinux.

View File

@ -2632,3 +2632,106 @@ index 0000000..b7a3dc6
+ +
+#endif /* _LIBIO_H */ +#endif /* _LIBIO_H */
+ +
diff --git a/modules/gfxboot.c b/modules/gfxboot.c
index 6b0d300..c7c69fe 100644
--- a/modules/gfxboot.c
+++ b/modules/gfxboot.c
@@ -153,6 +153,7 @@ void gfx_infobox32(int type, uint32_t str1, uint32_t str2);
void gfx_infobox(int type, char *str1, char *str2);
void boot(void);
+void show_message(char *file);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -202,8 +203,8 @@ int main(int argc, char **argv)
gfx_config.boot_drive = 0;
}
- if(argc != 2) {
- printf("Usage: gfxboot.com <bootlogo>\n");
+ if(argc < 2) {
+ printf("Usage: gfxboot.com bootlogo_file [message_file]\n");
return 0;
}
@@ -237,6 +238,10 @@ int main(int argc, char **argv)
boot();
}
+ if(argc > 2) {
+ show_message(argv[2]);
+ }
+
return 0;
}
@@ -896,3 +901,17 @@ void syslinux_hook(x86regs_t *r)
}
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+void show_message(char *file)
+{
+ int c;
+
+ if(open(file) == -1) return;
+
+ while((c = getc()) != EOF) {
+ if(c < ' ' && c != '\n' && c != '\t') continue;
+ printf("%c", c);
+ }
+}
+
+
diff --git a/modules/libio.asm b/modules/libio.asm
index 57bcde3..1b31219 100644
--- a/modules/libio.asm
+++ b/modules/libio.asm
@@ -59,7 +59,7 @@ _start:
rep stosb
; parse args
- mov bx,80h
+ mov ebx,80h
movzx si,byte [bx]
mov byte [si+81h],0dh ; just make sure
xor ecx,ecx
diff --git a/modules/gfxboot.c b/modules/gfxboot.c
index c7c69fe..9c9682b 100644
--- a/modules/gfxboot.c
+++ b/modules/gfxboot.c
@@ -205,16 +205,22 @@ int main(int argc, char **argv)
if(argc < 2) {
printf("Usage: gfxboot.com bootlogo_file [message_file]\n");
+ if(argc > 2) show_message(argv[2]);
+
return 0;
}
if(read_config_file()) {
printf("Error reading config file\n");
+ if(argc > 2) show_message(argv[2]);
+
return 0;
}
if(gfx_init(argv[1])) {
printf("Error setting up gfxboot\n");
+ if(argc > 2) show_message(argv[2]);
+
return 0;
}
@@ -238,9 +244,7 @@ int main(int argc, char **argv)
boot();
}
- if(argc > 2) {
- show_message(argv[2]);
- }
+ if(argc > 2) show_message(argv[2]);
return 0;
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Aug 25 15:53:39 CEST 2009 - snwint@suse.de
- fix argv setup (bnc #530255)
- now accepts two args: bootlogo and a (text)message file
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Aug 7 13:47:54 CEST 2009 - snwint@suse.de Fri Aug 7 13:47:54 CEST 2009 - snwint@suse.de

View File

@ -27,7 +27,7 @@ Requires: mtools
AutoReqProv: on AutoReqProv: on
Summary: Boot Loader for Linux Summary: Boot Loader for Linux
Version: 3.82 Version: 3.82
Release: 5 Release: 6
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
Source1: isolinux-config Source1: isolinux-config
Source2: README.gfxboot Source2: README.gfxboot