From 0a1150e26b97ee4fed4f360b59ee1b00558c42f8 Mon Sep 17 00:00:00 2001 From: chaac Date: Mon, 14 Apr 2008 19:08:38 +0000 Subject: [PATCH] 2008-04-14 Vesa Jaaskelainen * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical volume name mapping to support bigger than 9 character names properly. --- ChangeLog | 5 +++++ disk/lvm.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 79c1db86b..10b22099b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-14 Vesa Jaaskelainen + + * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical + volume name mapping to support bigger than 9 character names properly. + 2008-04-13 Robert Millan * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check, diff --git a/disk/lvm.c b/disk/lvm.c index d215ca4d9..7af01e2bb 100644 --- a/disk/lvm.c +++ b/disk/lvm.c @@ -467,7 +467,7 @@ grub_lvm_scan_device (const char *name) for (j = 0; j < seg->stripe_count; j++) { - char pvname[10]; + char *pvname; p = grub_strchr (p, '"'); if (p == NULL) @@ -477,6 +477,7 @@ grub_lvm_scan_device (const char *name) q++; s = q - p; + pvname = grub_malloc (s + 1); grub_memcpy (pvname, p, s); pvname[s] = '\0'; @@ -490,6 +491,8 @@ grub_lvm_scan_device (const char *name) } } + grub_free(pvname); + stripe->start = grub_lvm_getvalue (&p, ","); if (p == NULL) continue;