/dev/disk/by-label should not \xNN escape lables with spaces in them

Bug #667404 reported by jimav
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
In Progress
Medium
Abhishek kumar singh

Bug Description

Binary package hint: util-linux

This is an enhancement request, not a bug report.

The request: Allow special characters in /etc/fstab to be represented using either \xNN or \NNN hex or octal escapes (currently only the octal form is accepted).

This will make /etc/fstab syntax compatible with the way disk labels are displayed by udev in /dev/disk/by-label, which uses hex escapes.

For example, I have an external (ESATA) disk drive with an NTFS partition labeled "Cavalry External Drive". After plugging it in, the label can be seen as follows:

$ ls -l -N /dev/disk/by-label/
lrwxrwxrwx 1 root root 10 2010-10-27 11:27 Cavalry\x20External\x20Drive -> ../../sdc1

However, if the label is copied as-is to an /etc/fstab entry it won't work. You have to translate to octal, like this:
LABEL=Cavalry\040External\040Drive /mnt auto rw,user,utf8 0 0

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: mount 2.17.2-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-22.35-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
Date: Wed Oct 27 11:16:35 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate amd64 (20100928)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: util-linux

Revision history for this message
jimav (james-avera) wrote :
summary: - Allow \0NN hex escapes in /etc/fstab for compatibility with
+ Allow \xNN hex escapes in /etc/fstab for compatibility with
/dev/disk/by-label
Revision history for this message
jimav (james-avera) wrote : Re: Allow \xNN hex escapes in /etc/fstab for compatibility with /dev/disk/by-label

Alternatively, fix the system (udev?) to not replace spaces with escape sequences, but simply embed the actual space characters in the symlinks under /dev/disk/by-label, just like ordinary files containing spaces.

Currently, the "\xNN" escapes are actual characters in the symbolic link's name. Upon reflection, this seems wrong.

description: updated
Revision history for this message
Phillip Susi (psusi) wrote :

Good point. Reassigning to udev.

affects: util-linux (Ubuntu) → udev (Ubuntu)
Changed in udev (Ubuntu):
importance: Undecided → Medium
summary: - Allow \xNN hex escapes in /etc/fstab for compatibility with
- /dev/disk/by-label
+ /dev/disk/by-label should not \xNN escape lables with spaces in them
Changed in udev (Ubuntu):
assignee: nobody → Abhishek kumar singh (abhishekkumarsingh-cse)
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.