volume label parsing regression
Alberto Milone
albertomilone at alice.it
Wed Apr 8 09:21:07 PDT 2009
On Friday 03 April 2009 16:51:23 Martin Pitt wrote:
> Hello all,
>
> https://launchpad.net/bugs/347370 reported a regression in volume
> labels in hal. Spaces are now mangled to '_'.
>
> I tracked this down to 79b92dbdf65b8c978d5a8f6fb2b421aac83c3de3 and
> committed a fix:
>
> Not probing volumes ourselves and reading from the udev db (commit
> 79b92dbdf65b8c978d5a8f6fb2b421aac83c3de3) caused a regression:
> udevadm info's ID_FS_LABEL is mangled, e. g. spaces appear as '_'.
> Use ID_FS_LABEL_ENC instead and use a new hal/util.c function
> hal_util_decode_escape() to decode those.
>
>
> http://cgit.freedesktop.org/hal/commit/?id=97b023f94f1d79a19bc0489c0d167bda
>ebb765fd
>
> It works well for me, but I always appreciate a second pair of eyes.
>
> Thank you!
>
> Martin
Hi Martin,
I'm not sure as to whether this change caused the problem that I'm
experiencing but my label seems to show up as %mnt%hdc5
instead of /mnt/hdc5:
http://www.albertomilone.com/ubuntu/gnome/problem.png
I find it a bit weird since vol_id works correctly:
$ sudo vol_id /dev/sdd5
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=ec4df2ed-43a4-480b-9586-0c96e108c566
ID_FS_UUID_ENC=ec4df2ed-43a4-480b-9586-0c96e108c566
ID_FS_LABEL=/mnt/hdc5
ID_FS_LABEL_ENC=\x2fmnt\x2fhdc5
Furthermore if I compile a small program which has only
hal_util_decode_escape() and hexdigit() and I pass "\x2fmnt\x2fhdc5" to
hal_util_decode_escape() I get /mnt/hdc5.
Any ideas as to what could be causing the problem?
Regards,
--
Alberto Milone
Sustaining Engineer (system)
Foundations Team
Canonical OEM Services
More information about the hal
mailing list