mount: add info about mounting /proc
authorRobert Swiecki <robert@swiecki.net>
Thu, 26 Oct 2017 21:00:15 +0000 (23:00 +0200)
committerRobert Swiecki <robert@swiecki.net>
Thu, 26 Oct 2017 21:00:15 +0000 (23:00 +0200)
mount.c

diff --git a/mount.c b/mount.c
index 45f5be1348079d96771e817a824f5a0bf5fec388..9d423e5e703e3c22be1d881fcfb338fe75ec28da 100644 (file)
--- a/mount.c
+++ b/mount.c
@@ -203,6 +203,12 @@ static bool mountMount(struct mounts_t* mpt, const char* newroot, const char* tm
                } else {
                        PLOG_W("mount('%s') src:'%s' dst:'%s' failed", mountDescribeMountPt(mpt),
                            srcpath, dst);
+                       if (mpt->fs_type && strcmp(mpt->fs_type, "proc") == 0) {
+                               PLOG_W(
+                                   "procfs can only be mounted if the original /proc doesn't have "
+                                   "any other file-systems mounted on top of it (e.g. /dev/null "
+                                   "on top of /proc/kcore)");
+                       }
                }
                return false;
        } else {