bin/149424: fstab and labels with whitespace

Oliver Fromme olli at lurza.secnetix.de
Tue Aug 17 12:48:03 UTC 2010


Walter C. Pelissero <walter.pelissero at iesy.net> wrote:
 > > Number:         149424
 > > Category:       bin
 > > Synopsis:       fstab and labels with whitespace
 > [...]
 > > Description:
 >         /etc/fstab currently doesn't allow for whitespace anywhere but
 >         between fields (or in comments).  This makes impossible to use
 >         a label in place of a device name when mounting volumes
 >         containing whitespace in the name.  Take for instance CF or SD
 >         memory cards created by Nikon cameras: they are labelled
 >         "NIKON <model>", with a whitespace between NIKON and the model
 >         name.  Although it's still possible to mount the /dev/da*
 >         device, the label is arguably much more convenient.
 > > How-To-Repeat:
 > 
 > > Fix:
 > 
 >         The following patch modifies libc to allow for special
 >         characters in the first field of a fstab entry.  A single
 >         space can be written as \s, as in NIKON\sD300S, or \040, as in
 >         NIKON\040D300S.  Indeed, any octal escape sequence can be
 >         used, or sequences such as \t, \r, or \n.

The problem with this patch is that it breaks backwards-
compatibility.  Some people might already use backslashes
in /etc/fstab, for whatever reason.  This change would
make them rather unhappy, I'm afraid.

One way to circumvent the problem would be to use glabel(8)
which should also work with memory cards that contain FAT
file systems.  You just have to make sure that you don't
format the card with the camera -- If you accidentally do
that, you need to recreate the label.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

I suggested holding a "Python Object Oriented Programming Seminar",
but the acronym was unpopular.
        -- Joseph Strout


More information about the freebsd-bugs mailing list