diff options
author | Dmitry V. Levin <ldv@strace.io> | 2023-02-25 21:00:00 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-25 23:51:26 +0100 |
commit | dc652e7dc321666bcf4b14f4b57b9df7ab1bc8e0 (patch) | |
tree | 44452b8157e1ed2e55af10f00a6b23ac7a55376b /rules.d | |
parent | tpm2-util: use compound initialization when allocating tpm2 objects (diff) | |
download | systemd-dc652e7dc321666bcf4b14f4b57b9df7ab1bc8e0.tar.xz systemd-dc652e7dc321666bcf4b14f4b57b9df7ab1bc8e0.zip |
rules: remove redundant duplicate comparisons
$ grep -F -n -o 'ENV{DISKSEQ}=="?*", ' rules.d/60-persistent-storage.rules
139:ENV{DISKSEQ}=="?*",
139:ENV{DISKSEQ}=="?*",
140:ENV{DISKSEQ}=="?*",
140:ENV{DISKSEQ}=="?*",
Reported-by: Alexey Gladkov <legion@kernel.org>
Fixes: 17d97d4c90f8 ("udev: create disk/by-diskseq symlink only when the device has diskseq")
Fixes: 583dc6d933d8 ("udev: also create partition /dev/disk/by-diskseq/ symlinks")
Diffstat (limited to 'rules.d')
-rw-r--r-- | rules.d/60-persistent-storage.rules | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rules.d/60-persistent-storage.rules b/rules.d/60-persistent-storage.rules index 86e0165b0b..3265cd23c5 100644 --- a/rules.d/60-persistent-storage.rules +++ b/rules.d/60-persistent-storage.rules @@ -136,7 +136,7 @@ ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="disk/ # by-diskseq link (if an app is told to open a path like this, they may parse # the diskseq number from the path, then issue BLKGETDISKSEQ to verify they really got # the right device, to access specific disks in a race-free fashion) -ENV{DISKSEQ}=="?*", ENV{DEVTYPE}!="partition", ENV{DISKSEQ}=="?*", ENV{ID_IGNORE_DISKSEQ}!="1", SYMLINK+="disk/by-diskseq/$env{DISKSEQ}" -ENV{DISKSEQ}=="?*", ENV{DEVTYPE}=="partition", ENV{DISKSEQ}=="?*", ENV{ID_IGNORE_DISKSEQ}!="1", SYMLINK+="disk/by-diskseq/$env{DISKSEQ}-part%n" +ENV{DISKSEQ}=="?*", ENV{DEVTYPE}!="partition", ENV{ID_IGNORE_DISKSEQ}!="1", SYMLINK+="disk/by-diskseq/$env{DISKSEQ}" +ENV{DISKSEQ}=="?*", ENV{DEVTYPE}=="partition", ENV{ID_IGNORE_DISKSEQ}!="1", SYMLINK+="disk/by-diskseq/$env{DISKSEQ}-part%n" LABEL="persistent_storage_end" |