mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
nspawn: ignore EEXIST when creating mount point
A combination of commitsf3c80515c
and79d80fc14
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
This commit is contained in:
parent
ef7b6c0190
commit
1ab19cb167
Notes:
Lennart Poettering
2014-10-30 01:15:39 +01:00
Backport: bugfix
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue