Blame SOURCES/0229-util-grub-mkconfig_lib.in-prepare_grub_to_access_dev.patch

f96e0b
From a4a74e06ccc7868c9dd3a5da8c24d7244fdae50e Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Sun, 24 Mar 2013 13:11:19 +0100
f96e0b
Subject: [PATCH 229/482] 	* util/grub-mkconfig_lib.in
f96e0b
 (prepare_grub_to_access_device): Fix 	handling of multi-device filesystems.
f96e0b
f96e0b
---
f96e0b
 ChangeLog                 |  5 +++++
f96e0b
 util/grub-mkconfig_lib.in | 16 +++++++---------
f96e0b
 2 files changed, 12 insertions(+), 9 deletions(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 6fab49f..4df000e 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,5 +1,10 @@
f96e0b
 2013-03-24  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
+	* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
f96e0b
+	handling of multi-device filesystems.
f96e0b
+
f96e0b
+2013-03-24  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
 	* grub-core/Makefile.core.def (vbe): Disable on coreboot and multiboot
f96e0b
 	platforms.
f96e0b
 
f96e0b
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
f96e0b
index e560dd7..b48e2af 100644
f96e0b
--- a/util/grub-mkconfig_lib.in
f96e0b
+++ b/util/grub-mkconfig_lib.in
f96e0b
@@ -115,9 +115,7 @@ EOF
f96e0b
 
f96e0b
 prepare_grub_to_access_device ()
f96e0b
 {
f96e0b
-  device="$1"
f96e0b
-
f96e0b
-  partmap="`"${grub_probe}" --device "${device}" --target=partmap`"
f96e0b
+  partmap="`"${grub_probe}" --device "$@" --target=partmap`"
f96e0b
   for module in ${partmap} ; do
f96e0b
     case "${module}" in
f96e0b
       netbsd | openbsd)
f96e0b
@@ -128,30 +126,30 @@ prepare_grub_to_access_device ()
f96e0b
   done
f96e0b
 
f96e0b
   # Abstraction modules aren't auto-loaded.
f96e0b
-  abstraction="`"${grub_probe}" --device "${device}" --target=abstraction`"
f96e0b
+  abstraction="`"${grub_probe}" --device "$@" --target=abstraction`"
f96e0b
   for module in ${abstraction} ; do
f96e0b
     echo "insmod ${module}"
f96e0b
   done
f96e0b
 
f96e0b
-  fs="`"${grub_probe}" --device "${device}" --target=fs`"
f96e0b
+  fs="`"${grub_probe}" --device "$@" --target=fs`"
f96e0b
   for module in ${fs} ; do
f96e0b
     echo "insmod ${module}"
f96e0b
   done
f96e0b
 
f96e0b
   if [ x$GRUB_CRYPTODISK_ENABLE = xy ]; then
f96e0b
-      for uuid in "`"${grub_probe}" --device "${device}" --target=cryptodisk_uuid`"; do
f96e0b
+      for uuid in "`"${grub_probe}" --device "$@" --target=cryptodisk_uuid`"; do
f96e0b
 	  echo "cryptomount -u $uuid"
f96e0b
       done
f96e0b
   fi
f96e0b
 
f96e0b
   # If there's a filesystem UUID that GRUB is capable of identifying, use it;
f96e0b
   # otherwise set root as per value in device.map.
f96e0b
-  fs_hint="`"${grub_probe}" --device "${device}" --target=compatibility_hint`"
f96e0b
+  fs_hint="`"${grub_probe}" --device "$@" --target=compatibility_hint`"
f96e0b
   if [ "x$fs_hint" != x ]; then
f96e0b
     echo "set root='$fs_hint'"
f96e0b
   fi
f96e0b
-  if fs_uuid="`"${grub_probe}" --device "${device}" --target=fs_uuid 2> /dev/null`" ; then
f96e0b
-    hints="`"${grub_probe}" --device "${device}" --target=hints_string 2> /dev/null`" || hints=
f96e0b
+  if fs_uuid="`"${grub_probe}" --device "$@" --target=fs_uuid 2> /dev/null`" ; then
f96e0b
+    hints="`"${grub_probe}" --device "$@" --target=hints_string 2> /dev/null`" || hints=
f96e0b
     echo "if [ x\$feature_platform_search_hint = xy ]; then"
f96e0b
     echo "  search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"
f96e0b
     echo "else"
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b