diff options
author | Dave Reisner <dreisner@archlinux.org> | 2014-10-29 13:32:43 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2014-11-05 16:04:26 -0500 |
commit | 8d34f3c9c149dbe7746b849e2002675eae0984f5 (patch) | |
tree | bdf9b19e89197f4d81277dad8bb0f33f33ad7403 | |
parent | sd-bus: properly handle removals of non-existing matches (diff) | |
download | systemd-8d34f3c9c149dbe7746b849e2002675eae0984f5.tar.gz systemd-8d34f3c9c149dbe7746b849e2002675eae0984f5.tar.bz2 systemd-8d34f3c9c149dbe7746b849e2002675eae0984f5.zip |
nspawn: ignore EEXIST when creating mount point
A combination of commits f3c80515c and 79d80fc14 cause nspawn to
silently fail with a commandline such as:
# systemd-nspawn -D /build/extra-x86_64 --bind=/usr
strace shows the culprit:
[pid 27868] writev(2, [{"Failed to create mount point /build/extra-x86_64/usr: File exists", 82}, {"\n", 1}], 2) = 83
-rw-r--r-- | src/nspawn/nspawn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index b6d9bc631..d88987a58 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -758,7 +758,7 @@ static int mount_binds(const char *dest, char **l, bool ro) { * and char devices. */ if (S_ISDIR(source_st.st_mode)) { r = mkdir_label(where, 0755); - if (r < 0) { + if (r < 0 && errno != EEXIST) { log_error("Failed to create mount point %s: %s", where, strerror(-r)); return r; |