Blame SOURCES/0699-6647-use-path_startswith-dev-in-cryptsetup-6732.patch
|
|
17b0f1 |
From e290169c17a7ca56aa0fce25879656b8e598e1de Mon Sep 17 00:00:00 2001
|
|
|
17b0f1 |
From: ettavolt <ettavolt@gmail.com>
|
|
|
17b0f1 |
Date: Mon, 4 Sep 2017 16:36:52 +0300
|
|
|
17b0f1 |
Subject: [PATCH] 6647 - use path_startswith("/dev") in cryptsetup (#6732)
|
|
|
17b0f1 |
|
|
|
17b0f1 |
For both key and partition paths.
|
|
|
17b0f1 |
|
|
|
17b0f1 |
(cherry picked from commit 048dd629c4590eefb2ebd6a316c7350ed3a6ff19)
|
|
|
17b0f1 |
|
|
|
17b0f1 |
Resolves: #1664695
|
|
|
17b0f1 |
---
|
|
|
17b0f1 |
src/cryptsetup/cryptsetup-generator.c | 4 ++--
|
|
|
17b0f1 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
17b0f1 |
|
|
|
17b0f1 |
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
|
|
|
17b0f1 |
index 7b90d26156..b2edbfe298 100644
|
|
|
17b0f1 |
--- a/src/cryptsetup/cryptsetup-generator.c
|
|
|
17b0f1 |
+++ b/src/cryptsetup/cryptsetup-generator.c
|
|
|
17b0f1 |
@@ -215,7 +215,7 @@ static int create_disk(
|
|
|
17b0f1 |
|
|
|
17b0f1 |
if (!path_equal(uu, "/dev/null")) {
|
|
|
17b0f1 |
|
|
|
17b0f1 |
- if (is_device_path(uu)) {
|
|
|
17b0f1 |
+ if (path_startswith(uu, "/dev/")) {
|
|
|
17b0f1 |
_cleanup_free_ char *dd;
|
|
|
17b0f1 |
|
|
|
17b0f1 |
dd = unit_name_from_path(uu, ".device");
|
|
|
17b0f1 |
@@ -229,7 +229,7 @@ static int create_disk(
|
|
|
17b0f1 |
}
|
|
|
17b0f1 |
}
|
|
|
17b0f1 |
|
|
|
17b0f1 |
- if (is_device_path(u))
|
|
|
17b0f1 |
+ if (path_startswith(u, "/dev/"))
|
|
|
17b0f1 |
fprintf(f,
|
|
|
17b0f1 |
"BindsTo=%s\n"
|
|
|
17b0f1 |
"After=%s\n"
|