~ubuntu-branches/ubuntu/natty/grub2/natty

« back to all changes in this revision

Viewing changes to debian/patches/branch_butter.patch

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-01-13 08:58:59 UTC
  • mfrom: (17.6.25 experimental)
  • Revision ID: james.westby@ubuntu.com-20110113085859-u2blg1r67oj5gz0x
Tags: 1.99~20110112-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Adjust for default Ubuntu boot options ("quiet splash").
  - Default to hiding the menu; holding down Shift at boot will show it.
  - Set a monochromatic theme and an aubergine background for Ubuntu.
  - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
    recovery mode, quiet option, tweak how memtest86+ is displayed, and
    use UUIDs where appropriate.
  - Fix backslash-escaping in merge_debconf_into_conf.
  - Remove "GNU/Linux" from default distributor string.
  - Add crashkernel option.
  - Bypass menu unless other OSes are installed or Shift is pressed.
  - Allow Shift to interrupt 'sleep --interruptible'.
  - Reduce visual clutter in normal mode.
  - Remove verbose messages printed before reading configuration.
  - Suppress kernel/initrd progress messages, except in recovery mode.
  - Handle filesystems loop-mounted on file images.
  - Ignore devices loop-mounted from files in Linux grub.d scripts.
  - Show the boot menu if the previous boot failed.
  - Don't generate device.map during grub-install or grub-mkconfig.
  - Adjust upgrade version checks for Ubuntu.
  - Suppress "GRUB loading" message unless Shift is held down.
  - Adjust versions of grub-doc and grub-legacy-doc conflicts.
  - Fix LVM/RAID probing in the absence of /boot/grub/device.map.
  - Look for .mo files in /usr/share/locale-langpack first.
  - Make sure GRUB_TIMEOUT isn't quoted unnecessarily.
  - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
  - Use qemu rather than qemu-system-i386.
  - Add a grub-rescue-efi-amd64 package.
  - On Wubi, don't ask for an install device, but just update wubildr
    using the diverted grub-install.
  - Enable lua from grub-extras.
  - Incorporate the bitop library into lua.
  - Add enum_pci function to grub module in lua.
  - Check hardware support before using gfxpayload=keep.
  - Build part_msdos and vfat into EFI boot images.
  - Put second and subsequent Linux menu entries in a submenu.
  - Preferred resolution detection for VBE.
  - Set vt.handoff=7 for smooth handoff to kernel graphical mode.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1920
1920
     }
1921
1921
 
1922
1922
   free (buf);
1923
 
@@ -535,7 +528,7 @@
 
1923
@@ -474,7 +467,7 @@
 
1924
 char *
 
1925
 grub_guess_root_device (const char *dir)
 
1926
 {
 
1927
-  char *os_dev;
 
1928
+  char *os_dev = NULL;
 
1929
 #ifdef __GNU__
 
1930
   file_t file;
 
1931
   mach_port_t *ports;
 
1932
@@ -533,30 +526,42 @@
 
1933
   mach_port_deallocate (mach_task_self (), file);
 
1934
 #else /* !__GNU__ */
1924
1935
   struct stat st;
 
1936
+  dev_t dev;
1925
1937
 
1926
1938
 #ifdef __linux__
1927
1939
-  os_dev = find_root_device_from_mountinfo (dir);
1928
 
+  os_dev = grub_find_root_device_from_mountinfo (dir, NULL);
1929
 
   if (os_dev)
1930
 
     return os_dev;
 
1940
-  if (os_dev)
 
1941
-    return os_dev;
 
1942
+  if (!os_dev)
 
1943
+    os_dev = grub_find_root_device_from_mountinfo (dir, NULL);
1931
1944
 #endif /* __linux__ */
 
1945
 
 
1946
 #if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
 
1947
-  os_dev = find_root_device_from_libzfs (dir);
 
1948
-  if (os_dev)
 
1949
-    return os_dev;
 
1950
+  if (!os_dev)
 
1951
+    os_dev = find_root_device_from_libzfs (dir);
 
1952
 #endif
 
1953
 
 
1954
-  if (stat (dir, &st) < 0)
 
1955
-    grub_util_error ("cannot stat `%s'", dir);
 
1956
+  if (os_dev)
 
1957
+    {
 
1958
+      if (stat (os_dev, &st) >= 0)
 
1959
+       dev = st.st_rdev;
 
1960
+      else
 
1961
+       grub_util_error ("cannot stat `%s'", os_dev);
 
1962
+      free (os_dev);
 
1963
+    }
 
1964
+  else
 
1965
+    {
 
1966
+      if (stat (dir, &st) >= 0)
 
1967
+       dev = st.st_dev;
 
1968
+      else
 
1969
+       grub_util_error ("cannot stat `%s'", dir);
 
1970
+    }
 
1971
 
 
1972
 #ifdef __CYGWIN__
 
1973
   /* Cygwin specific function.  */
 
1974
-  os_dev = grub_find_device (dir, st.st_dev);
 
1975
+  os_dev = grub_find_device (dir, dev);
 
1976
 
 
1977
 #else
 
1978
 
 
1979
   /* This might be truly slow, but is there any better way?  */
 
1980
-  os_dev = grub_find_device ("/dev", st.st_dev);
 
1981
+  os_dev = grub_find_device ("/dev", dev);
 
1982
 #endif
 
1983
 #endif /* !__GNU__ */
 
1984
 
1932
1985
Index: b/grub-core/kern/emu/misc.c
1933
1986
===================================================================
1934
1987
--- a/grub-core/kern/emu/misc.c