Move a comment and a debug message to a more logical place.
They both pertain to mounting the working directory, so it's better for them
to live next to the place where that's done.
RELNOTES: None.
@@ -280,10 +280,6 @@ static void MountFilesystems() {
}
}
- // Make sure that our working directory is a mount point. The easiest way to
- // do this is by bind-mounting it upon itself.
- PRINT_DEBUG("working dir: %s", opt.working_dir.c_str());
-
// An attempt to mount the sandbox in tmpfs will always fail, so this block is
// slightly redundant with the next mount() check, but dumping the mount()
// syscall is incredibly cryptic, so we explicitly check against and warn
@@ -326,6 +322,10 @@ static void MountFilesystems() {
}
}
+ // Make sure that our working directory is a mount point. The easiest way to
+ // do this is by bind-mounting it upon itself.
+ PRINT_DEBUG("working dir: %s", opt.working_dir.c_str());
+
if (mount(opt.working_dir.c_str(), opt.working_dir.c_str(), nullptr, MS_BIND,
nullptr) < 0) {
DIE("mount(%s, %s, nullptr, MS_BIND, nullptr)", opt.working_dir.c_str(),
