summaryrefslogtreecommitdiff
path: root/rules.d
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2020-11-30 11:38:21 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-01-13 00:58:43 +0900
commit4fcc033b5476039a7a8030e1edc261d42cec028b (patch)
treeb05b198d690bb8b9a50600787c2e31f357e1eece /rules.d
parent885598f36c48aa54431dc3f671f07f842fb9360c (diff)
downloadsystemd-4fcc033b5476039a7a8030e1edc261d42cec028b.tar.gz
udev-builtin-blkid: add support for --hint offsets
The next libblkid v2.37 is going to support session offsets for multi-session CD/DVDs. This feature is implemented by "hint offsets". These offsets are optional and prober specific (e.g., iso, udf, ...). For this purpose, the library provides a new function blkid_probe_set_hint(), and blkid(8) provides a new command-line option --hint <name>=<offset>. For CD/DVD, the offset name is "session_offset". The difference between classic --offset and the new --hint is that --offset is very restrictive and defines the probing area and the rest of the device is invisible to the library. The new --hint works like a suggestion, it provides a hint where the user assumes the filesystem, but the rest of the device is still readable for the library (for example, to get some additional superblock information etc.). If the --hint is without a value then it defaults to zero. The option --hint implementation in udev-builtin-blkid.c is backwardly compatible. If compiled against old libblkid, then the option is used in the same way as --offset. Addresses: https://github.com/karelzak/util-linux/issues/1161 Addresses: https://github.com/systemd/systemd/pull/17424
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/60-persistent-storage.rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules.d/60-persistent-storage.rules b/rules.d/60-persistent-storage.rules
index fc7f733e20..35b4f2c6dc 100644
--- a/rules.d/60-persistent-storage.rules
+++ b/rules.d/60-persistent-storage.rules
@@ -104,7 +104,7 @@ KERNEL=="vd*[0-9]", ENV{ID_PATH}=="pci-*", SYMLINK+="disk/by-path/virtio-$env{ID
# probe filesystem metadata of optical drives which have a media inserted
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", \
- IMPORT{builtin}="blkid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}"
+ IMPORT{builtin}="blkid --hint=session_offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}"
# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \
IMPORT{builtin}="blkid --noraid"