projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95bfd1d
)
cryptsetup-generator: don't return error if target directory already exists
author
Michal Sekletar
<msekleta@redhat.com>
Tue, 4 Sep 2018 17:51:14 +0000
(19:51 +0200)
committer
Lukáš Nykrýn
<lnykryn@redhat.com>
Tue, 11 Dec 2018 16:10:46 +0000
(17:10 +0100)
(cherry-picked from commit
579875bc4a59b917fa32519e3d96d56dc591ad1e
)
Related: #
1656869
src/cryptsetup/cryptsetup-generator.c
patch
|
blob
|
history
diff --git
a/src/cryptsetup/cryptsetup-generator.c
b/src/cryptsetup/cryptsetup-generator.c
index 52391bd185ff16ecbc6484f89a3068ee5e19562d..03c513c26e23beb3246122efdc244ba21199a89a 100644
(file)
--- a/
src/cryptsetup/cryptsetup-generator.c
+++ b/
src/cryptsetup/cryptsetup-generator.c
@@
-53,16
+53,16
@@
static int generate_keydev_mount(const char *name, const char *keydev, char **un
return r;
r = mkdir("/run/systemd/cryptsetup", 0700);
- if (r < 0)
- return
r
;
+ if (r < 0
&& errno != EEXIST
)
+ return
-errno
;
where = strjoin("/run/systemd/cryptsetup/keydev-", name);
if (!where)
return -ENOMEM;
r = mkdir(where, 0700);
- if (r < 0)
- return
r
;
+ if (r < 0
&& errno != EEXIST
)
+ return
-errno
;
r = unit_name_from_path(where, ".mount", &u);
if (r < 0)