mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 14:40:31 +00:00
cryptsetup-generator: fix luks-* entry parsing from crypttab
This reverts a part of commit 49fe5c0996 ('tree-wide: port various places
over to STARTSWITH_SET()') that replaced a pair of startswith() calls
with STARTSWITH_SET().
They were in fact for a different strings (device vs. name), botching
the crypttap parsing.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
cc82851c0d
commit
844d5a87c9
@@ -546,9 +546,11 @@ static int add_crypttab_devices(void) {
|
||||
continue;
|
||||
}
|
||||
|
||||
uuid = STARTSWITH_SET(device, "UUID=", "luks-");
|
||||
uuid = startswith(device, "UUID=");
|
||||
if (!uuid)
|
||||
uuid = path_startswith(device, "/dev/disk/by-uuid/");
|
||||
if (!uuid)
|
||||
uuid = startswith(name, "luks-");
|
||||
if (uuid)
|
||||
d = hashmap_get(arg_disks, uuid);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user