From a651cf5fd907a13ed9366bf56af67e4deda5047d74d6a4aa947dfd82cf6833b8 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Mon, 12 Mar 2018 04:46:39 +0000 Subject: [PATCH] Accepting request 583756 from home:michael-chang:branches:Base:System - fix wrong command output when default subvolume is toplevel tree with id 5 (bsc#1078775) * grub2-btrfs-09-get-default-subvolume.patch - insert mdraid modules to support software RAID (bsc#1078775) * grub2-xen-pv-firmware.cfg OBS-URL: https://build.opensuse.org/request/show/583756 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=292 --- grub2-btrfs-09-get-default-subvolume.patch | 16 ++++++++++------ grub2-xen-pv-firmware.cfg | 2 ++ grub2.changes | 9 +++++++++ 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/grub2-btrfs-09-get-default-subvolume.patch b/grub2-btrfs-09-get-default-subvolume.patch index 2fb991f..5d039c2 100644 --- a/grub2-btrfs-09-get-default-subvolume.patch +++ b/grub2-btrfs-09-get-default-subvolume.patch @@ -1,8 +1,8 @@ -Index: grub-2.02~beta2/grub-core/fs/btrfs.c +Index: grub-2.02/grub-core/fs/btrfs.c =================================================================== ---- grub-2.02~beta2.orig/grub-core/fs/btrfs.c -+++ grub-2.02~beta2/grub-core/fs/btrfs.c -@@ -2439,6 +2439,238 @@ out: +--- grub-2.02.orig/grub-core/fs/btrfs.c ++++ grub-2.02/grub-core/fs/btrfs.c +@@ -2446,6 +2446,242 @@ out: return 0; } @@ -198,6 +198,10 @@ Index: grub-2.02~beta2/grub-core/fs/btrfs.c + } + + id = subvolid; ++ ++ if (id == GRUB_BTRFS_ROOT_VOL_OBJECTID) ++ subvol = grub_strdup (""); ++ else + while (id != GRUB_BTRFS_ROOT_VOL_OBJECTID) + { + grub_uint64_t parent_id; @@ -241,7 +245,7 @@ Index: grub-2.02~beta2/grub-core/fs/btrfs.c static struct grub_fs grub_btrfs_fs = { .name = "btrfs", .dir = grub_btrfs_dir, -@@ -2457,6 +2689,7 @@ static struct grub_fs grub_btrfs_fs = { +@@ -2464,6 +2700,7 @@ static struct grub_fs grub_btrfs_fs = { static grub_command_t cmd_info; static grub_command_t cmd_mount_subvol; static grub_extcmd_t cmd_list_subvols; @@ -249,7 +253,7 @@ Index: grub-2.02~beta2/grub-core/fs/btrfs.c static char * subvolid_set_env (struct grub_env_var *var __attribute__ ((unused)), -@@ -2527,6 +2760,11 @@ GRUB_MOD_INIT (btrfs) +@@ -2534,6 +2771,11 @@ GRUB_MOD_INIT (btrfs) "[-p|-n] [-o var] DEVICE", "Print list of BtrFS subvolumes on " "DEVICE.", options); diff --git a/grub2-xen-pv-firmware.cfg b/grub2-xen-pv-firmware.cfg index 757b392..e8e02f7 100644 --- a/grub2-xen-pv-firmware.cfg +++ b/grub2-xen-pv-firmware.cfg @@ -4,6 +4,8 @@ insmod search insmod configfile insmod legacy_configfile insmod lvm +insmod mdraid09 +insmod mdraid1x set debian_cddev="" set debian_cdarch="" diff --git a/grub2.changes b/grub2.changes index de6a9db..6f0b84b 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Mar 6 08:21:43 UTC 2018 - mchang@suse.com + +- fix wrong command output when default subvolume is toplevel tree with + id 5 (bsc#1078775) + * grub2-btrfs-09-get-default-subvolume.patch +- insert mdraid modules to support software RAID (bsc#1078775) + * grub2-xen-pv-firmware.cfg + ------------------------------------------------------------------- Tue Feb 13 09:05:45 UTC 2018 - mchang@suse.com