diff --git a/ChangeLog b/ChangeLog index 0d902ecd6..741f0f013 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-03-26 Vladimir Serbinenko + + * grub-core/fs/iso9660.c (grub_iso9660_label): Rtrim the label. + 2011-03-26 Vladimir Serbinenko Use libgeom on FreeBSD to detect partitions. diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c index 6dc465f25..f72249d20 100644 --- a/grub-core/fs/iso9660.c +++ b/grub-core/fs/iso9660.c @@ -808,6 +808,15 @@ grub_iso9660_label (grub_device_t device, char **label) ((grub_uint16_t *) &data->voldesc.volname, 16); else *label = grub_strndup ((char *) data->voldesc.volname, 32); + if (*label) + { + char *ptr; + for (ptr = *label; *ptr;ptr++); + ptr--; + while (ptr >= *label && *ptr == ' ') + *ptr-- = 0; + } + grub_free (data); } else