mount(8) tries to mount read-only when the previous attempt ends with
EROFS or EACCES. This is bad idea for bind mounts as "ro,bind" has
a special semantic.
Signed-off-by: Karel Zak <kzak@redhat.com>
else if (mflags & MS_REMOUNT)
warnx(_("cannot remount %s read-write, is write-protected"), src);
+ else if (mflags & MS_BIND)
+ warn(_("mount %s on %s failed"), src, tgt);
+
else {
warnx(_("%s is write-protected, mounting read-only"), src);