On Wed, 2009-02-04 at 13:01 +0100, phcoder wrote:
> Hello. Here is the patch to remove trailing spaces from FAT label. These 
> spaces generally aren't considiered to be part of label

Suppose the label is "DOS \0DDDDDDDD", then your algorithm will fail to
strip the final space, as it would iterate past the binary null.  I
don't know if it can happen, but I guess it's better to be prepared.

Also, please see how ordinary 8.3 filenames are handled.  Look for "8.3"
in fs/fat.c.  grub_isspace() is used to check for spaces.  Binary nulls
and spaces terminate the name.  There may be no spaces anywhere in the
name.

Perhaps we could use the same mechanism for the label except that no "."
is added.

-- 
Regards,
Pavel Roskin


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to