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/superblocks/superblocks.h | |
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/superblocks/superblocks.h')
-rw-r--r-- | libblkid/src/superblocks/superblocks.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libblkid/src/superblocks/superblocks.h b/libblkid/src/superblocks/superblocks.h index 887732a73..e45dc6a84 100644 --- a/libblkid/src/superblocks/superblocks.h +++ b/libblkid/src/superblocks/superblocks.h @@ -89,5 +89,7 @@ extern int blkid_probe_strncpy_uuid(blkid_probe pr, unsigned char *str, size_t l extern int blkid_probe_set_uuid(blkid_probe pr, unsigned char *uuid); extern int blkid_probe_set_uuid_as(blkid_probe pr, unsigned char *uuid, const char *name); +extern int blkid_probe_set_id_label(blkid_probe pr, const char *name, + unsigned char *data, size_t len); #endif /* _BLKID_SUPERBLOCKS_H */ |