eudev/extras
David Zeuthen ad88f9409a *_id: add model/vendor enc strings
So ID_MODEL and ID_VENDOR are pretty useful keys. However since we fix
them up (removing leading/trailing whitespace, converts spaces to
underscores) for use in device naming etc. we also force these fixups on
the desktop shell. And this looks pretty ugly.

The attached patch introduces the ID_MODEL_ENC and ID_VENDOR_ENC keys
that contains the encoded version of the raw strings obtained. It's
pretty similar in spirit to ID_FS_LABEL and its cousin ID_FS_LABEL_ENC.

With this patch a desktop shell can fix up these strings as it sees fit.
Note that some fixup is still needed though, for example

# /lib/udev/ata_id --export /dev/sda |grep ID_MODEL
ID_MODEL=INTEL_SSDSA2MH080G1GC
ID_MODEL_ENC=INTEL\x20SSDSA2MH080G1GC\x20\x20\x20\x20\x20\x20\x20\x20
\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20

Note the trailing and leading whitespace. Anyway with the attached patch
the desktop shell should be able to display "INTEL SSDSA2MH080G1GC"
rather than "INTEL_SSDSA2MH080G1GC" to the user.
2009-02-17 21:45:43 +01:00
..
ata_id *_id: add model/vendor enc strings 2009-02-17 21:45:43 +01:00
cdrom_id make: do not delete autotools generated file with distclean 2008-12-06 04:03:08 +01:00
collect make: do not delete autotools generated file with distclean 2008-12-06 04:03:08 +01:00
edd_id make: do not delete autotools generated file with distclean 2008-12-06 04:03:08 +01:00
firmware rules: first simple step merging with Ubuntu rules 2008-12-19 16:49:56 +01:00
floppy make: do not delete autotools generated file with distclean 2008-12-06 04:03:08 +01:00
fstab_import make: do not delete autotools generated file with distclean 2008-12-06 04:03:08 +01:00
path_id path_id: rework SAS persistent names 2008-12-18 13:42:28 +01:00
rule_generator rule_generator: fix enumeration for write_cd_rules 2008-12-22 15:05:11 +01:00
scsi_id *_id: add model/vendor enc strings 2009-02-17 21:45:43 +01:00
usb_id *_id: add model/vendor enc strings 2009-02-17 21:45:43 +01:00
volume_id vol_id: add missing id->type to swap0 2009-01-24 15:21:15 +01:00
Makefile.am make: do not delete autotools generated file with distclean 2008-12-06 04:03:08 +01:00