diff options
author | Zeeshan Ali (Khattak) | 2013-02-11 22:22:12 +0100 |
---|---|---|
committer | Karel Zak | 2013-02-14 12:11:34 +0100 |
commit | fafe46bc266b65ca524909b43701a3d06825d0a8 (patch) | |
tree | f76dd96274aacb8bb51f7d3409db1bf187c3d2f4 /libblkid/src/verify.c | |
parent | libblkid: Don't keep reading same sector of ISO (diff) | |
download | kernel-qcow2-util-linux-fafe46bc266b65ca524909b43701a3d06825d0a8.tar.gz kernel-qcow2-util-linux-fafe46bc266b65ca524909b43701a3d06825d0a8.tar.xz kernel-qcow2-util-linux-fafe46bc266b65ca524909b43701a3d06825d0a8.zip |
libblkid: Expose more ISO9660 headers
In order to kill libosinfo's infamous udev rule[1], we need to make blkid
report the following information as udev properties on IS09660 media so
that libosinfo can make use of that for detection:
1. Volume ID (already exposed as label).
2. System ID.
3. Publisher ID.
4. Application ID.
5. Boot record's boot system ID, (almost always 'EL TORITO
SPECIFICATION' if boot record is present).
Example use:
$ blkid -p -o udev Fedora-17-x86_64-DVD.iso
ID_FS_SYSTEM_ID=LINUX
ID_FS_APPLICATION_ID=GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C)
1993 E.YOUNGDALE
ID_FS_UUID=2012-05-22-20-55-32-00
ID_FS_UUID_ENC=2012-05-22-20-55-32-00
ID_FS_BOOT_SYSTEM_ID=EL TORITO SPECIFICATION
ID_FS_LABEL=Fedora_17_x86_64
ID_FS_LABEL_ENC=Fedora\x2017\x20x86_64
ID_FS_TYPE=iso9660
ID_PART_TABLE_TYPE=dos
[1] https://fedorahosted.org/libosinfo/ticket/1
[kzak@redhat.com: - add blkid_ltrim_whitespace() and use it together
with blkid_rtrim_whitespace() to trim white spaces
- enlarge blkid values to 128 bytes
- add generic blkid_probe_set_id_label() function
- always terminate all _ID with \0
- don't export the _IDs to blkid cache]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/verify.c')
-rw-r--r-- | libblkid/src/verify.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libblkid/src/verify.c b/libblkid/src/verify.c index 9383e8570..bd756e7a7 100644 --- a/libblkid/src/verify.c +++ b/libblkid/src/verify.c @@ -38,8 +38,10 @@ static void blkid_probe_to_tags(blkid_probe pr, blkid_dev dev) blkid_set_tag(dev, "PARTUUID", data, len); else if (strcmp(name, "PART_ENTRY_NAME") == 0) blkid_set_tag(dev, "PARTLABEL", data, len); - } else { - /* superblock UUID, LABEL, ... */ + + } else if (!strstr(name, "_ID")) { + /* superblock UUID, LABEL, ... + * but not {SYSTEM,APPLICATION,..._ID} */ blkid_set_tag(dev, name, data, len); } } |