grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remove trailing space from FAT label


From: Pavel Roskin
Subject: Re: Remove trailing space from FAT label
Date: Wed, 04 Feb 2009 11:32:09 -0500

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]