add bootpath device to the device list (pfsmorigo, #886685)
This commit is contained in:
parent
b96417a904
commit
83401c6de5
54
grub2-add-bootpath-device-to-the-list.patch
Normal file
54
grub2-add-bootpath-device-to-the-list.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
From d2863ca186a6d4ba2a56559bf522f46c18403645 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
|
||||||
|
Date: Fri, 14 Dec 2012 20:10:21 -0200
|
||||||
|
Subject: [PATCH] Add bootpath device to the list
|
||||||
|
|
||||||
|
When scanning the devices, always check (and add) the bootpath device if it
|
||||||
|
isn't in the device list.
|
||||||
|
---
|
||||||
|
grub-core/disk/ieee1275/ofdisk.c | 29 +++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 29 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c
|
||||||
|
index b0aa7ec..99b156e 100644
|
||||||
|
--- a/grub-core/disk/ieee1275/ofdisk.c
|
||||||
|
+++ b/grub-core/disk/ieee1275/ofdisk.c
|
||||||
|
@@ -213,6 +213,35 @@ scan (void)
|
||||||
|
return grub_children_iterate (alias->path, dev_iterate);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ char *bootpath;
|
||||||
|
+ int bootpath_size;
|
||||||
|
+ char *type;
|
||||||
|
+
|
||||||
|
+ if (grub_ieee1275_get_property_length (grub_ieee1275_chosen, "bootpath",
|
||||||
|
+ &bootpath_size)
|
||||||
|
+ || bootpath_size <= 0)
|
||||||
|
+ {
|
||||||
|
+ /* Should never happen. */
|
||||||
|
+ grub_printf ("/chosen/bootpath property missing!\n");
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ bootpath = (char *) grub_malloc ((grub_size_t) bootpath_size + 64);
|
||||||
|
+ if (! bootpath)
|
||||||
|
+ {
|
||||||
|
+ grub_print_error ();
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ grub_ieee1275_get_property (grub_ieee1275_chosen, "bootpath", bootpath,
|
||||||
|
+ (grub_size_t) bootpath_size + 1, 0);
|
||||||
|
+ bootpath[bootpath_size] = '\0';
|
||||||
|
+
|
||||||
|
+ type = grub_ieee1275_get_device_type (bootpath);
|
||||||
|
+ if (type && grub_strcmp (type, "block") == 0)
|
||||||
|
+ dev_iterate_real (bootpath, bootpath);
|
||||||
|
+
|
||||||
|
+ grub_free (bootpath);
|
||||||
|
+
|
||||||
|
grub_devalias_iterate (dev_iterate_alias);
|
||||||
|
grub_children_iterate ("/", dev_iterate);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.0
|
||||||
|
|
@ -41,7 +41,7 @@
|
|||||||
Name: grub2
|
Name: grub2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.00
|
Version: 2.00
|
||||||
Release: 13%{?dist}
|
Release: 14%{?dist}
|
||||||
Summary: Bootloader with support for Linux, Multiboot and more
|
Summary: Bootloader with support for Linux, Multiboot and more
|
||||||
|
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
@ -77,6 +77,7 @@ Patch33: follow-the-symbolic-link-ieee1275.patch
|
|||||||
Patch34: grub-2.00-add-X-option-to-printf-functions.patch
|
Patch34: grub-2.00-add-X-option-to-printf-functions.patch
|
||||||
Patch35: grub-2.00-dhcp-client-id-and-uuid-options-added.patch
|
Patch35: grub-2.00-dhcp-client-id-and-uuid-options-added.patch
|
||||||
Patch36: grub-2.00-search-for-specific-config-file-for-netboot.patch
|
Patch36: grub-2.00-search-for-specific-config-file-for-netboot.patch
|
||||||
|
Patch37: grub2-add-bootpath-device-to-the-list.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
@ -430,6 +431,9 @@ fi
|
|||||||
%doc grub-%{tarversion}/themes/starfield/COPYING.CC-BY-SA-3.0
|
%doc grub-%{tarversion}/themes/starfield/COPYING.CC-BY-SA-3.0
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 17 2012 Karsten Hopp <karsten@redhat.com> 2.00-14
|
||||||
|
- add bootpath device to the device list (pfsmorigo, #886685)
|
||||||
|
|
||||||
* Tue Nov 27 2012 Peter Jones <pjones@redhat.com> - 2.00-13
|
* Tue Nov 27 2012 Peter Jones <pjones@redhat.com> - 2.00-13
|
||||||
- Add vlan tag support (pfsmorigo, #871563)
|
- Add vlan tag support (pfsmorigo, #871563)
|
||||||
- Follow symlinks during PReP installation in grub2-install (pfsmorigo, #874234)
|
- Follow symlinks during PReP installation in grub2-install (pfsmorigo, #874234)
|
||||||
|
Loading…
Reference in New Issue
Block a user