From 6563f63dfd8eb3b3e5db20b774ca3fadb3aac4b5 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 28 Oct 2011 15:52:15 +0200 Subject: [PATCH] * grub-core/disk/raid.c (scan_devices): Check partition. * grub-core/disk/lvm.c (do_lvm_scan): Likewise. --- ChangeLog | 5 +++++ grub-core/disk/lvm.c | 7 ++++++- grub-core/disk/raid.c | 7 ++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cfb00531a..d2fc4ba84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-10-28 Vladimir Serbinenko + + * grub-core/disk/raid.c (scan_devices): Check partition. + * grub-core/disk/lvm.c (do_lvm_scan): Likewise. + 2011-10-27 Vladimir Serbinenko Support BFS (befs) UUID. diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c index 7c19f08de..7c65db4ab 100644 --- a/grub-core/disk/lvm.c +++ b/grub-core/disk/lvm.c @@ -23,6 +23,7 @@ #include #include #include +#include #ifdef GRUB_UTIL #include @@ -153,7 +154,11 @@ do_lvm_scan (const char *scan_for) for (vg = vg_list; vg; vg = vg->next) for (pv = vg->pvs; pv; pv = pv->next) if (pv->disk && pv->disk->id == disk->id - && pv->disk->dev->id == disk->dev->id) + && pv->disk->dev->id == disk->dev->id + && grub_partition_get_start (pv->disk->partition) + == grub_partition_get_start (disk->partition) + && grub_partition_get_len (pv->disk->partition) + == grub_partition_get_len (disk->partition)) { grub_disk_close (disk); return 0; diff --git a/grub-core/disk/raid.c b/grub-core/disk/raid.c index 5d8326daf..07249eabc 100644 --- a/grub-core/disk/raid.c +++ b/grub-core/disk/raid.c @@ -23,6 +23,7 @@ #include #include #include +#include #ifdef GRUB_UTIL #include #endif @@ -119,7 +120,11 @@ scan_devices (const char *arname) struct grub_raid_member *m; for (m = arr->members; m < arr->members + arr->nr_devs; m++) if (m->device && m->device->id == disk->id - && m->device->dev->id == m->device->dev->id) + && m->device->dev->id == m->device->dev->id + && grub_partition_get_start (m->device->partition) + == grub_partition_get_start (disk->partition) + && grub_partition_get_len (m->device->partition) + == grub_partition_get_len (disk->partition)) { grub_disk_close (disk); return 0;