diff options
author | LaMont Jones <lamont@debian.org> | 2009-07-21 15:45:04 -0600 |
---|---|---|
committer | LaMont Jones <lamont@debian.org> | 2009-07-21 15:45:04 -0600 |
commit | 7a22bb9abcb56d1010cefd204709e3888f95f735 (patch) | |
tree | 5c38b4485f79ee8f6a9d5f9537e973f1f663f027 /mount/mount.c | |
parent | 4e13a18f57a5b427c559f3b466b9655db14d28f8 (diff) | |
parent | 741064af10ec81635d708e9fb8373f96341246eb (diff) | |
download | util-linux-old-7a22bb9abcb56d1010cefd204709e3888f95f735.tar.gz |
Merge commit 'origin/master'
Conflicts:
AUTHORS
NEWS
config/include-Makefile.am
configure.ac
mount/lomount.c
po/POTFILES.in
po/ca.po
po/cs.po
po/da.po
po/de.po
po/es.po
po/et.po
po/eu.po
po/fi.po
po/fr.po
po/hu.po
po/id.po
po/it.po
po/ja.po
po/nl.po
po/pl.po
po/pt_BR.po
po/ru.po
po/sl.po
po/sv.po
po/tr.po
po/uk.po
po/util-linux-ng.pot
po/vi.po
po/zh_CN.po
Diffstat (limited to 'mount/mount.c')
-rw-r--r-- | mount/mount.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mount/mount.c b/mount/mount.c index a43fad56..bd883391 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -907,9 +907,6 @@ guess_fstype_and_mount(const char *spec, const char *node, const char **types, if (*types && strcasecmp (*types, "auto") == 0) *types = NULL; - if (flags & (MS_BIND | MS_MOVE)) - *types = "none"; - if (!*types && !(flags & MS_REMOUNT)) { *types = guess_fstype_by_devname(spec); if (*types) { @@ -1317,6 +1314,9 @@ try_mount_one (const char *spec0, const char *node0, const char *types0, if (loop) opt_loopdev = loopdev; + if (flags & (MS_BIND | MS_MOVE | MS_PROPAGATION)) + types = "none"; + /* * Call mount.TYPE for types that require a separate mount program. * For the moment these types are ncpfs and smbfs. Maybe also vxfs. @@ -1538,6 +1538,10 @@ mount_retry: error (_("mount: %s%s is write-protected but explicit `-w' flag given"), bd, spec); break; + } else if (flags & MS_REMOUNT) { + error (_("mount: cannot remount %s%s read-write, is write-protected"), + bd, spec); + break; } else { opts = opts0; types = types0; |