]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
unshare: Fix error message when setting proc mount propagation
authorJohan Herland <johan@herland.net>
Thu, 6 May 2021 22:53:29 +0000 (00:53 +0200)
committerGitHub <noreply@github.com>
Thu, 6 May 2021 22:53:29 +0000 (00:53 +0200)
The mount() command associated with this error message is not about
unmounting the proc fs, but rather about changing the propagation
of mount events for the proc fs. Rewrite the error message to
reflect this.

sys-utils/unshare.c

index cd5fe68f8cd49e773d6a2df4a6d7e6a8aabf7094..e5627d3c64c60f922958572e47db2dcb577b7a96 100644 (file)
@@ -651,7 +651,7 @@ int main(int argc, char *argv[])
 
        if (procmnt) {
                if (!newroot && mount("none", procmnt, NULL, MS_PRIVATE|MS_REC, NULL) != 0)
-                       err(EXIT_FAILURE, _("umount %s failed"), procmnt);
+                       err(EXIT_FAILURE, _("cannot change %s filesystem propagation"), procmnt);
                if (mount("proc", procmnt, "proc", MS_NOSUID|MS_NOEXEC|MS_NODEV, NULL) != 0)
                        err(EXIT_FAILURE, _("mount %s failed"), procmnt);
        }