]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-04-14 Vesa Jaaskelainen <chaac@nic.fi>
authorchaac <chaac@localhost>
Mon, 14 Apr 2008 19:08:38 +0000 (19:08 +0000)
committerchaac <chaac@localhost>
Mon, 14 Apr 2008 19:08:38 +0000 (19:08 +0000)
        * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
        volume name mapping to support bigger than 9 character names properly.

ChangeLog
disk/lvm.c

index 79c1db86be8364fd3ea94ed05b92a8f0b3ad9dce..10b22099b03a85109707142f709df4c640d7ca0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
+
+       * 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  <rmh@aybabtu.com>
 
        * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
index d215ca4d9c7d67cfb7092619020a06a40bdaaf9a..7af01e2bbd3cf40cd05faf6a739196d910d62c86 100644 (file)
@@ -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;