diff options
author | Robert Swiecki <robert@swiecki.net> | 2022-02-10 09:51:13 +0100 |
---|---|---|
committer | Robert Swiecki <robert@swiecki.net> | 2022-02-10 09:51:13 +0100 |
commit | 999d4631f33d27a9a1ecde6edbd0a1381a09f87b (patch) | |
tree | 714af305c5778e8f53b9ca8599795b4ef5c0b66c | |
parent | 9b73eaa289c1ace35e89ec60c6eaf9be08318420 (diff) | |
download | nsjail-999d4631f33d27a9a1ecde6edbd0a1381a09f87b.tar.gz |
mnt: better error messages with mandatory mount points
-rw-r--r-- | mnt.cc | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -150,7 +150,7 @@ static bool mountPt(mount_t* mpt, const char* newroot, const char* tmpdir) { LOG_D("symlink('%s', '%s')", srcpath, dstpath); if (symlink(srcpath, dstpath) == -1) { if (mpt->is_mandatory) { - PLOG_W("symlink('%s', '%s')", srcpath, dstpath); + PLOG_E("symlink('%s', '%s')", srcpath, dstpath); return false; } else { PLOG_W("symlink('%s', '%s'), but it's not mandatory, continuing", @@ -396,6 +396,7 @@ static bool initCloneNs(nsjconf_t* nsjconf) { for (auto& p : nsjconf->mountpts) { if (!mountPt(&p, destdir->c_str(), tmpdir->c_str()) && p.is_mandatory) { + LOG_E("Couldn't mount '%s'", p.dst.c_str()); return false; } } |