mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-07 17:17:44 +03: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
@ -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 New Issue
Block a user