mirror of
https://github.com/systemd/systemd.git
synced 2026-08-05 07:30:30 +00:00
nspawn: ignore EEXIST when creating mount point
A combination of commitsf3c80515cand79d80fc14cause 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:
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;
|
||||
|
||||
Reference in New Issue
Block a user