From 6217d27d61d908890e6cd5bfa64941a9d0ca0fd6 Mon Sep 17 00:00:00 2001 From: Robert Swiecki Date: Thu, 22 Nov 2018 08:44:25 +0100 Subject: [PATCH] mnt: better description for mounts --- cmdline.cc | 2 +- mnt.cc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmdline.cc b/cmdline.cc index 46bd10d..ac22106 100644 --- a/cmdline.cc +++ b/cmdline.cc @@ -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 --- 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)) -- 2.7.4