forked from pool/grub2
Accepting request 947913 from home:michael-chang:bsc:1159205
- Fix wrong default entry when booting snapshot (bsc#1159205) * grub2-btrfs-08-workaround-snapshot-menu-default-entry.patch OBS-URL: https://build.opensuse.org/request/show/947913 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=403
This commit is contained in:
parent
0f630408b0
commit
da02c891ad
@ -1,8 +1,11 @@
|
|||||||
Index: grub-2.02~beta2/grub-core/normal/menu.c
|
|
||||||
|
v2: Add menuentry "Help on bootable snapshot" to be excluded as default entry.
|
||||||
|
|
||||||
|
Index: grub-2.06/grub-core/normal/menu.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- grub-2.02~beta2.orig/grub-core/normal/menu.c
|
--- grub-2.06.orig/grub-core/normal/menu.c
|
||||||
+++ grub-2.02~beta2/grub-core/normal/menu.c
|
+++ grub-2.06/grub-core/normal/menu.c
|
||||||
@@ -575,6 +575,44 @@ print_countdown (struct grub_term_coordi
|
@@ -574,6 +574,43 @@ print_countdown (struct grub_term_coordi
|
||||||
grub_refresh ();
|
grub_refresh ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15,10 +18,9 @@ Index: grub-2.02~beta2/grub-core/normal/menu.c
|
|||||||
+workaround_snapshot_menu_default_entry (grub_menu_t menu, const char *name, int *default_entry)
|
+workaround_snapshot_menu_default_entry (grub_menu_t menu, const char *name, int *default_entry)
|
||||||
+{
|
+{
|
||||||
+ grub_menu_entry_t entry;
|
+ grub_menu_entry_t entry;
|
||||||
+
|
+ if ((entry = grub_menu_get_entry (menu, 0)) &&
|
||||||
+ if ((entry = grub_menu_get_entry (menu, 0))
|
+ ((entry->submenu && grub_strncmp (entry->title, "Bootable snapshot", sizeof("Bootable snapshot") - 1) == 0) ||
|
||||||
+ && entry->submenu
|
+ (!entry->submenu && grub_strncmp (entry->title, "Help on bootable snapshot", sizeof("Help on bootable snapshot") - 1) == 0)))
|
||||||
+ && grub_strncmp (entry->title, "Bootable snapshot", sizeof("Bootable snapshot") - 1) == 0)
|
|
||||||
+ {
|
+ {
|
||||||
+ const char *val;
|
+ const char *val;
|
||||||
+
|
+
|
||||||
@ -47,7 +49,7 @@ Index: grub-2.02~beta2/grub-core/normal/menu.c
|
|||||||
#define GRUB_MENU_PAGE_SIZE 10
|
#define GRUB_MENU_PAGE_SIZE 10
|
||||||
|
|
||||||
/* Show the menu and handle menu entry selection. Returns the menu entry
|
/* Show the menu and handle menu entry selection. Returns the menu entry
|
||||||
@@ -593,6 +631,8 @@ run_menu (grub_menu_t menu, int nested,
|
@@ -592,6 +629,8 @@ run_menu (grub_menu_t menu, int nested,
|
||||||
|
|
||||||
default_entry = get_entry_number (menu, "default");
|
default_entry = get_entry_number (menu, "default");
|
||||||
|
|
||||||
|
@ -5,6 +5,12 @@ Fri Jan 14 08:39:36 UTC 2022 - Michael Chang <mchang@suse.com>
|
|||||||
(jsc#SLE-18271) (bsc#1192764)
|
(jsc#SLE-18271) (bsc#1192764)
|
||||||
* 0001-grub-install-Add-SUSE-signed-image-support-for-power.patch
|
* 0001-grub-install-Add-SUSE-signed-image-support-for-power.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 13 06:36:44 UTC 2022 - Michael Chang <mchang@suse.com>
|
||||||
|
|
||||||
|
- Fix wrong default entry when booting snapshot (bsc#1159205)
|
||||||
|
* grub2-btrfs-08-workaround-snapshot-menu-default-entry.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 11 03:49:15 UTC 2022 - Michael Chang <mchang@suse.com>
|
Tue Jan 11 03:49:15 UTC 2022 - Michael Chang <mchang@suse.com>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user