54 lines
2.1 KiB
Diff
54 lines
2.1 KiB
Diff
--- /dev/null
|
|
+++ b/s390-tools-zipl-title-section-name.patch
|
|
@@ -0,0 +1,50 @@
|
|
+From ce171812a829d6e0fe1c7d1f91d2ddd301f03bec Mon Sep 17 00:00:00 2001
|
|
+From: Javier Martinez Canillas <javierm@redhat.com>
|
|
+Date: Tue, 6 Nov 2018 13:29:32 +0100
|
|
+Subject: [PATCH] zipl: use the BLS "title" field as the IPL section name
|
|
+
|
|
+Most bootloaders use the BootLoaderSpec "title" field to name the entries
|
|
+in their boot menu. The zipl bootloader used the "version" field instead,
|
|
+since it was wrongly assumed that the zipl boot menu didn't support names
|
|
+that contained spaces, which are usually present in a BLS "title" field.
|
|
+
|
|
+But this is not the case, names with space characters are supported by the
|
|
+IPL and is just a constraint of the section heading in the zipl.conf file.
|
|
+
|
|
+So to be consistent with all the other bootloaders, use the "title" field
|
|
+also on zipl when populating the boot menu entries from BLS files.
|
|
+
|
|
+Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
|
|
+---
|
|
+ scripts/zipl-switch-to-blscfg | 1 +
|
|
+ zipl/src/scan.c | 2 +-
|
|
+ 2 files changed, 2 insertions(+), 1 deletion(-)
|
|
+
|
|
+diff --git a/scripts/zipl-switch-to-blscfg b/scripts/zipl-switch-to-blscfg
|
|
+index 5272033e9848..5141b1c0dd6d 100755
|
|
+--- a/scripts/zipl-switch-to-blscfg
|
|
++++ b/scripts/zipl-switch-to-blscfg
|
|
+@@ -150,6 +150,7 @@ while IFS='= ' read key val; do
|
|
+ if [ -f "${OUTPUT}" ]; then
|
|
+ print_error "BLS file ${OUTPUT} already exists"
|
|
+ fi
|
|
++ echo "title $section" >> ${OUTPUT}
|
|
+ fi
|
|
+ elif [[ $val ]]; then
|
|
+ val="$(echo $val | sed -e 's/^[ \t"]*//;s/[ \t"]*$//')"
|
|
+diff --git a/zipl/src/scan.c b/zipl/src/scan.c
|
|
+index fe72e9ab13df..9160d083e5cb 100644
|
|
+--- a/zipl/src/scan.c
|
|
++++ b/zipl/src/scan.c
|
|
+@@ -701,7 +701,7 @@ scan_bls_field(struct misc_file_buffer *file, struct scan_token* scan,
|
|
+ file->buffer[key_end] = '\0';
|
|
+ file->buffer[val_end] = '\0';
|
|
+
|
|
+- if (strncmp("version", &file->buffer[key_start], key_end - key_start) == 0) {
|
|
++ if (strncmp("title", &file->buffer[key_start], key_end - key_start) == 0) {
|
|
+ scan_append_section_heading(scan, index, &file->buffer[val_start]);
|
|
+ }
|
|
+
|
|
+--
|
|
+2.19.1
|
|
+
|