diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-28 20:24:28 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-28 20:24:28 +0100 |
commit | ba8e6c4d0e074a3df0b55751f1753460ce82f1eb (patch) | |
tree | e589c2cc53ebe0ade75aee8e946b5010f6baa66e /src | |
parent | 8054d749c4ad69503b5b2735864f8e72a1b73e62 (diff) |
nspawn: make sure --link-journal=host may be used twice in a row
Fixes #2186
This fixes fall-out from 574edc90066c3faeadcf4666928ed9b0ac409c75.
Diffstat (limited to 'src')
-rw-r--r-- | src/nspawn/nspawn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 44c91de85f..9dd4c051b2 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -1457,8 +1457,8 @@ static int setup_journal(const char *directory) { if (arg_link_journal == LINK_HOST) { /* don't create parents here -- if the host doesn't have * permanent journal set up, don't force it here */ - r = mkdir(p, 0755); - if (r < 0) { + + if (mkdir(p, 0755) < 0 && errno != EEXIST) { if (try) { log_debug_errno(errno, "Failed to create %s, skipping journal setup: %m", p); return 0; |