[grub2: 15/22] add grub-2.00-no-canon.patch (#737370)

Peter Jones pjones at fedoraproject.org
Mon Jun 4 15:51:03 UTC 2012


commit 7045ce64ed3d72796e9c0105577383b71dae81df
Author: Mads Kiilerich <mads at kiilerich.com>
Date:   Mon Jun 4 02:29:21 2012 +0200

    add grub-2.00-no-canon.patch (#737370)
    
    backport upstream rev 4408:
    Don't canonicalise /dev/root and /dev/dm-*.

 grub-2.00-no-canon.patch |   29 +++++++++++++++++++++++++++++
 grub2.spec               |    1 +
 2 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/grub-2.00-no-canon.patch b/grub-2.00-no-canon.patch
new file mode 100644
index 0000000..14082a7
--- /dev/null
+++ b/grub-2.00-no-canon.patch
@@ -0,0 +1,29 @@
+From: Valdimir Serbinenko <phcoder at gmail.com>
+Subject: Don't canonicalise /dev/root and /dev/dm-*.
+
+upstream rev 4408
+
+--- a/util/getroot.c	2012-05-28 15:43:12 +0000
++++ b/util/getroot.c	2012-06-02 12:36:27 +0000
+@@ -1036,10 +1036,16 @@
+ 	{
+ 	  char *tmp = *cur;
+ 	  int root, dm;
+-	  *cur = canonicalize_file_name (tmp);
+-	  if (*cur == NULL)
+-	    grub_util_error (_("failed to get canonical path of %s"), tmp);
+-	  free (tmp);
++	  if (strcmp (*cur, "/dev/root") == 0
++	      || strncmp (*cur, "/dev/dm-", sizeof ("/dev/dm-") - 1) == 0)
++	    *cur = tmp;
++	  else
++	    {
++	      *cur = canonicalize_file_name (tmp);
++	      if (*cur == NULL)
++		grub_util_error (_("failed to get canonical path of %s"), tmp);
++	      free (tmp);
++	    }
+ 	  root = (strcmp (*cur, "/dev/root") == 0);
+ 	  dm = (strncmp (*cur, "/dev/dm-", sizeof ("/dev/dm-") - 1) == 0);
+ 	  if (!dm && !root)
+
diff --git a/grub2.spec b/grub2.spec
index 36944cb..c865c80 100644
--- a/grub2.spec
+++ b/grub2.spec
@@ -51,6 +51,7 @@ Source3:        README.Fedora
 Source4:	http://unifoundry.com/unifont-5.1.20080820.pcf.gz
 Source5:	theme.tar.bz2
 Patch0:		grub-2.00-ieee1276.patch
+Patch1:		grub-2.00-no-canon.patch
 Patch2:		grub-1.99-just-say-linux.patch
 Patch5:		grub-1.99-ppc-terminfo.patch
 Patch10:	grub-2.00-add-fw_path-search.patch


More information about the scm-commits mailing list