Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Aug 2010 11:30:03 GMT
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-geom@FreeBSD.org
Subject:   Re: kern/149762: volume labels with rogue characters
Message-ID:  <201008191130.o7JBU3jU033851@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/149762; it has been noted by GNATS.

From: Oliver Fromme <olli@lurza.secnetix.de>
To: jhell <jhell@DataIX.net>, bug-followup@freebsd.org
Cc:  
Subject: Re: kern/149762: volume labels with rogue characters
Date: Thu, 19 Aug 2010 13:29:25 +0200 (CEST)

 jhell <jhell@dataix.net> wrote:
  >  This is a hack, something that you would commonly find in Linux code and
  >  is neither a proper or viable workaround for the naming of labels.
  >  
  >  Instead, using glabel(8) the admin/user can create a local label to
  >  FreeBSD that does not change the original nor does it carry over to any
  >  other OS that does not understand geom_label's.
 
 There are cases were you cannot create a permanent label
 with glabel.  For example, there are quite a lot of USB
 devices that insist on having their memory formatted with
 their own firmware only, destroying any other labels.
 I own an mp3 player (Medion) that behaves like this.
 The submitter mentioned a digital camera (Nikon, I think)
 in a previous thread.
 
 How do you suggest to solve the problem for those cases?
 
  >  Stripping characters no matter what they are with a sysctl is overkill
  >  and does not scale well, all the while - presenting false information to
  >  the user.
 
 I don't think there is a scalability issue, because it is
 only done once when a device is attached.  On the other
 hand, maybe the patch should be changed so it doesn't
 touch the name at all when the sysctl is 0, so the default
 behaviour would be no different from what we have today.
 
  >  I would highly advise against this. If the user does not like
  >  the label that appears in msdosfs/{LABEL} then they are free to change
  >  that at their own will.
 
 Unfortunately they are subject to the will of their devices,
 see above.  And if the device's own label contains a space
 (the Nikon camera mentioned above does), it cannot be used
 as-is in /etc/fstab.
 
 I think a similar problem occurs with the volume names of
 CD-ROMs and DVD-ROMs, which contain spaces quite often,
 and you cannot glabel them.  But I haven't looked deeply
 into this, maybe it's not an issue.
 
 (Does FreeBSD even support mounting CDs by their volume
 name, like Solaris does?  I've never tried, but it would
 come in handy, because I have a clip art CD that I use
 every now and then, and I never remember whether it's in
 drive cd0 or cd1 currently ...)
 
  >  I see presenting the label as it is to the user
  >  ``important''.
 
 Uhm ...  it is not my impression that the names of nodes
 in /dev are intended to present accurate "external"
 information to the user.  I always thought that the
 purpose of /dev is an interface between userland software
 and drivers, and that users shouldn't have to deal with
 /dev at all during "normal operations".  Am I wrong?
 
 I mean, there are commands to display the atual labels if
 you need to see them (and I don't mean "ls /dev/...").
 
 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
 
 "When your hammer is C++, everything begins to look like a thumb."
         -- Steve Haflich, in comp.lang.c++



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008191130.o7JBU3jU033851>