[systemd-devel] [PATCH] switch-root: do not use close old_root_fd after rm_rf_children()
From: Harald Hoyer har...@redhat.com rm_rf_children() has already closed the fd with closedir(). --- src/core/switch-root.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/switch-root.c b/src/core/switch-root.c index ed0a31e..9832a52 100644 --- a/src/core/switch-root.c +++ b/src/core/switch-root.c @@ -111,8 +111,10 @@ int switch_root(const char *new_root) { if (fstat(old_root_fd, rb) 0) log_warning(Failed to stat old root directory, leaving: %m); -else +else { rm_rf_children(old_root_fd, false, false, rb); +old_root_fd = -1; +} } r = 0; -- 1.7.10.2 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] switch-root: do not use close old_root_fd after rm_rf_children()
Ah.. forget that old patch... slipped in the patch mail queue Am 12.07.2012 08:44, schrieb har...@redhat.com: From: Harald Hoyer har...@redhat.com rm_rf_children() has already closed the fd with closedir(). --- src/core/switch-root.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/switch-root.c b/src/core/switch-root.c index ed0a31e..9832a52 100644 --- a/src/core/switch-root.c +++ b/src/core/switch-root.c @@ -111,8 +111,10 @@ int switch_root(const char *new_root) { if (fstat(old_root_fd, rb) 0) log_warning(Failed to stat old root directory, leaving: %m); -else +else { rm_rf_children(old_root_fd, false, false, rb); +old_root_fd = -1; +} } r = 0; ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] switch-root: do not use close old_root_fd after rm_rf_children()
From: Harald Hoyer har...@redhat.com rm_rf_children() has already closed the fd with closedir(). --- src/core/switch-root.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/switch-root.c b/src/core/switch-root.c index ed0a31e..9832a52 100644 --- a/src/core/switch-root.c +++ b/src/core/switch-root.c @@ -111,8 +111,10 @@ int switch_root(const char *new_root) { if (fstat(old_root_fd, rb) 0) log_warning(Failed to stat old root directory, leaving: %m); -else +else { rm_rf_children(old_root_fd, false, false, rb); +old_root_fd = -1; +} } r = 0; -- 1.7.10.2 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] switch-root: do not use close old_root_fd after rm_rf_children()
On Tue, 22.05.12 15:28, har...@redhat.com (har...@redhat.com) wrote: From: Harald Hoyer har...@redhat.com rm_rf_children() has already closed the fd with closedir(). Thanks! Applied! Lennart -- Lennart Poettering - Red Hat, Inc. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel