From: Harald Hoyer <[email protected]>
---
src/core/main.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/core/main.c b/src/core/main.c
index a816015..e8bcbe7 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1234,7 +1234,14 @@ static int do_switch_root(const char *switch_root) {
}
if (cfd >= 0) {
- rm_rf_children(cfd, false, false);
+ struct stat rb;
+
+ if (fstat(cfd, &rb)) {
+ log_error("failed to stat old root directory");
+ goto fail;
+ }
+
+ rm_rf_children(cfd, false, false, &rb);
close(cfd);
cfd=-1;
}
--
1.7.10.1
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel