chiark / gitweb /
sd-icmp6-nd: Add function to stop ongoing ICMPv6 discovery
[elogind.git] / src / nspawn / nspawn.c
index 8270348c1727eedb2a6458e6f94c75bd42d1cdb4..0a8dc0cf301cd7bf047487e75fed5cc33db06c44 100644 (file)
@@ -89,6 +89,7 @@
 #include "gpt.h"
 #include "siphash24.h"
 #include "copy.h"
+#include "base-filesystem.h"
 
 #ifdef HAVE_SECCOMP
 #include "seccomp-util.h"
@@ -824,7 +825,7 @@ static int setup_timezone(const char *dest) {
 }
 
 static int setup_resolv_conf(const char *dest) {
-        char _cleanup_free_ *where = NULL;
+        _cleanup_free_ char *where = NULL;
 
         assert(dest);
 
@@ -3008,6 +3009,12 @@ int main(int argc, char *argv[]) {
                                           srv_device, srv_device_rw) < 0)
                                 goto child_fail;
 
+                        r = base_filesystem_create(arg_directory);
+                        if (r < 0) {
+                                log_error("Failed to create the base filesystem: %s", strerror(-r));
+                                goto child_fail;
+                        }
+
                         /* Turn directory into bind mount */
                         if (mount(arg_directory, arg_directory, "bind", MS_BIND|MS_REC, NULL) < 0) {
                                 log_error("Failed to make bind mount: %m");