6647 - use path_startswith("/dev") in cryptsetup (#6732)

For both key and partition paths.
This commit is contained in:
ettavolt 2017-09-04 16:36:52 +03:00 committed by Lennart Poettering
parent 89106f0a79
commit 048dd629c4

View file

@ -129,7 +129,7 @@ static int create_disk(
if (!path_equal(uu, "/dev/null")) {
if (is_device_path(uu)) {
if (path_startswith(uu, "/dev/")) {
_cleanup_free_ char *dd = NULL;
r = unit_name_from_path(uu, ".device", &dd);
@ -143,7 +143,7 @@ static int create_disk(
}
}
if (is_device_path(u)) {
if (path_startswith(u, "/dev/")) {
fprintf(f,
"BindsTo=%s\n"
"After=%s\n"