mnt: better description for mounts
authorRobert Swiecki <robert@swiecki.net>
Thu, 22 Nov 2018 07:44:25 +0000 (08:44 +0100)
committerRobert Swiecki <robert@swiecki.net>
Thu, 22 Nov 2018 07:44:25 +0000 (08:44 +0100)
cmdline.cc
mnt.cc

index 46bd10d..ac22106 100644 (file)
@@ -224,7 +224,7 @@ void logParams(nsjconf_t* nsjconf) {
            "Jail parameters: hostname:'%s', chroot:'%s', process:'%s', bind:[%s]:%d, "
            "max_conns_per_ip:%u, time_limit:%" PRId64
            ", personality:%#lx, daemonize:%s, clone_newnet:%s, "
-           "clone_newuser:%s, clone_newns:%s, clone_newpid:%s, clone_newipc:%s, clonew_newuts:%s, "
+           "clone_newuser:%s, clone_newns:%s, clone_newpid:%s, clone_newipc:%s, clone_newuts:%s, "
            "clone_newcgroup:%s, keep_caps:%s, disable_no_new_privs:%s, max_cpus:%zu",
            nsjconf->hostname.c_str(), nsjconf->chroot.c_str(),
            nsjconf->exec_file.empty() ? nsjconf->argv[0].c_str() : nsjconf->exec_file.c_str(),
diff --git a/mnt.cc b/mnt.cc
index 007f839..4da78d6 100644 (file)
--- a/mnt.cc
+++ b/mnt.cc
@@ -539,9 +539,10 @@ bool addMountPtTail(nsjconf_t* nsjconf, const std::string& src, const std::strin
 const std::string describeMountPt(const mount_t& mpt) {
        std::string descr;
 
-       descr.append("'")
+       descr.append(mpt.src.empty() ? "" : "'")
            .append(mpt.src.empty() ? "" : mpt.src)
-           .append(mpt.src.empty() ? "" : "' -> '")
+           .append(mpt.src.empty() ? "" : "' -> ")
+           .append("'")
            .append(mpt.dst)
            .append("' flags:")
            .append(flagsToStr(mpt.flags))