All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Remove trailing space from FAT label
Date: Wed, 04 Feb 2009 11:32:09 -0500	[thread overview]
Message-ID: <1233765129.2487.10.camel@dv> (raw)
In-Reply-To: <498983B3.8090904@gmail.com>

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	other threads:[~2009-02-04 16:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04 12:01 Remove trailing space from FAT label phcoder
2009-02-04 16:32 ` Pavel Roskin [this message]
2009-02-04 18:15   ` phcoder
2009-02-07 22:36 ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1233765129.2487.10.camel@dv \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.