diff --git a/ChangeLog b/ChangeLog index 84798cc83..99fc59a0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,18 @@ -2012-05-12 Vladimir Serbinenko +2012-05-13 Vladimir Serbinenko + + * grub-core/disk/ieee1275/ofdisk.c (scan): Don't scan device tree if + GRUB_IEEE1275_FLAG_NO_TREE_SCANNING_FOR_DISKS is set. + * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set + GRUB_IEEE1275_FLAG_NO_TREE_SCANNING_FOR_DISKS on IBM hardware. + * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum value + GRUB_IEEE1275_FLAG_NO_TREE_SCANNING_FOR_DISKS. + +2012-05-13 Vladimir Serbinenko * grub-core/kern/fs.c (grub_fs_probe): Handle GRUB_ERR_OUT_OF_RANGE as a bad FS. -2012-05-12 Vladimir Serbinenko +2012-05-13 Vladimir Serbinenko * grub-core/fs/udf.c (read_string): Bail out on size=0. (grub_udf_read_symlink): Handle read_string failure. diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c index 56fed0a6a..6b734f7fd 100644 --- a/grub-core/disk/ieee1275/ofdisk.c +++ b/grub-core/disk/ieee1275/ofdisk.c @@ -159,7 +159,8 @@ scan (void) } grub_devalias_iterate (dev_iterate_alias); - grub_ieee1275_devices_iterate (dev_iterate); + if (!grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_TREE_SCANNING_FOR_DISKS)) + grub_ieee1275_devices_iterate (dev_iterate); } static int diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c index 9e80757f4..e04ce5b69 100644 --- a/grub-core/kern/ieee1275/cmain.c +++ b/grub-core/kern/ieee1275/cmain.c @@ -88,6 +88,9 @@ grub_ieee1275_find_options (void) if (rc >= 0 && !grub_strcmp (tmp, "Emulated PC")) is_qemu = 1; + if (rc >= 0 && grub_strncmp (tmp, "IBM", 3) == 0) + grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_TREE_SCANNING_FOR_DISKS); + if (grub_strncmp (tmp, "PowerMac", sizeof ("PowerMac") - 1) == 0) grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS); diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h index fb85db9f1..99a4bc172 100644 --- a/include/grub/ieee1275/ieee1275.h +++ b/include/grub/ieee1275/ieee1275.h @@ -116,6 +116,8 @@ enum grub_ieee1275_flag 1 address cell is used on PowerMacs. */ GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS, + + GRUB_IEEE1275_FLAG_NO_TREE_SCANNING_FOR_DISKS }; extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag);