diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2019-04-15 09:55:41 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2019-04-15 09:55:41 -0500 |
commit | 859c853ee4ecbb8ee958e3b61e12fca9aca8cd53 (patch) | |
tree | 6b69522fdd41a91da8a8b1d22c3e9bf5f4eb65dd /libre/syslinux/0002-gfxboot-menu-label.patch | |
parent | 4106007657ac82b8df2219ea4b7c97686055f4f9 (diff) | |
download | abslibre-859c853ee4ecbb8ee958e3b61e12fca9aca8cd53.tar.gz abslibre-859c853ee4ecbb8ee958e3b61e12fca9aca8cd53.tar.bz2 abslibre-859c853ee4ecbb8ee958e3b61e12fca9aca8cd53.zip |
syslinux-6.04.pre2.r11.gbf6db5b4-1.par1: updating version
Diffstat (limited to 'libre/syslinux/0002-gfxboot-menu-label.patch')
-rw-r--r-- | libre/syslinux/0002-gfxboot-menu-label.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/libre/syslinux/0002-gfxboot-menu-label.patch b/libre/syslinux/0002-gfxboot-menu-label.patch new file mode 100644 index 000000000..0666a8832 --- /dev/null +++ b/libre/syslinux/0002-gfxboot-menu-label.patch @@ -0,0 +1,53 @@ +From: Colin Watson <cjwatson@ubuntu.com> +Date: Wed, 2 Nov 2011 07:57:23 +0100 +Subject: Allow boot entry to start with label instead of menu_label. + +menu_ptr->menu_label is human-readable (perhaps even translatable!) text if +the MENU LABEL command is used, which isn't very convenient at the start of +a boot entry. Allow the entry to start with menu_ptr->label (an +identifier) as an alternative. +--- + com32/gfxboot/gfxboot.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c +index f67132c..4c76a35 100644 +--- a/com32/gfxboot/gfxboot.c ++++ b/com32/gfxboot/gfxboot.c +@@ -818,7 +818,7 @@ void boot(int index) + { + char *arg, *alt_kernel; + menu_t *menu_ptr; +- int i, label_len; ++ int i, label_len, menu_label_len; + unsigned ipapp; + const struct syslinux_ipappend_strings *ipappend; + char *gfxboot_cwd = (char *) gfx_config.gfxboot_cwd; +@@ -836,18 +836,22 @@ void boot(int index) + if(!menu_ptr || !menu_ptr->menu_label) return; + + arg = skipspace(cmdline); +- label_len = strlen(menu_ptr->menu_label); ++ label_len = strlen(menu_ptr->label); ++ menu_label_len = strlen(menu_ptr->menu_label); + + // if it does not start with label string, assume first word is kernel name +- if(strncmp(arg, menu_ptr->menu_label, label_len)) { ++ if(!strncmp(arg, menu_ptr->label, label_len)) { ++ arg += label_len; ++ } ++ else if(!strncmp(arg, menu_ptr->menu_label, menu_label_len)) { ++ arg += menu_label_len; ++ } ++ else { + alt_kernel = arg; + arg = skip_nonspaces(arg); + if(*arg) *arg++ = 0; + if(*alt_kernel) menu_ptr->alt_kernel = alt_kernel; + } +- else { +- arg += label_len; +- } + + arg = skipspace(arg); + |