[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Remove trailing space from FAT label
From: |
phcoder |
Subject: |
Remove trailing space from FAT label |
Date: |
Wed, 04 Feb 2009 13:01:55 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20090105) |
Hello. Here is the patch to remove trailing spaces from FAT label. These
spaces generally aren't considiered to be part of label
Thanks
Vladimir 'phcoder' Serbinenko
Index: fs/fat.c
===================================================================
--- fs/fat.c (revision 1973)
+++ fs/fat.c (working copy)
@@ -809,7 +809,13 @@
if (dir.attr == GRUB_FAT_ATTR_VOLUME_ID)
{
- *label = grub_strndup ((char *) dir.name, 11);
+ int labellen = 0, i;
+ for (i = 0; i < 11; i++)
+ if (dir.name[i] != ' ')
+ labellen = i + 1;
+
+ *label = grub_strndup ((char *) dir.name, labellen);
+
return GRUB_ERR_NONE;
}
}
Index: ChangeLog
===================================================================
--- ChangeLog (revision 1973)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2009-02-04 Vladimir Serbinenko <address@hidden>
+
+ Remove trailing spaces from FAT label
+
+ * fs/fat.c (grub_fat_label): Remove trailing spaces
+
2009-02-04 Felix Zielcke <address@hidden>
util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
- Remove trailing space from FAT label,
phcoder <=