summaryrefslogtreecommitdiff
path: root/mount
diff options
context:
space:
mode:
authorLaMont Jones <lamont@debian.org>2010-10-25 13:42:20 -0600
committerLaMont Jones <lamont@debian.org>2010-10-25 13:42:20 -0600
commitccc5ad27923c600ee5dcab01e6fcc48b5bf82648 (patch)
tree601c20ec4f851abc101ce9d821a4fe74e5283790 /mount
parente61e0ca7d872870ca843133c4c60c6b8992d7bca (diff)
parent973d9cf9c6092d94a3e5b54e5b8e7cd4e2d705d7 (diff)
downloadutil-linux-old-ccc5ad27923c600ee5dcab01e6fcc48b5bf82648.tar.gz
Merge remote branch 'origin/master'
Diffstat (limited to 'mount')
-rw-r--r--mount/mount.85
-rw-r--r--mount/umount.c15
2 files changed, 10 insertions, 10 deletions
diff --git a/mount/mount.8 b/mount/mount.8
index b33e62f5..7bffbb5b 100644
--- a/mount/mount.8
+++ b/mount/mount.8
@@ -663,11 +663,6 @@ Creating a file
.I /etc/filesystems
can be useful to change the probe order (e.g., to try vfat before msdos
or ext3 before ext2) or if you use a kernel module autoloader.
-Warning: the probing uses a heuristic (the presence of appropriate `magic'),
-and could recognize the wrong filesystem type, possibly with catastrophic
-consequences. If your data is valuable, don't ask
-.B mount
-to guess.
More than one type may be specified in a comma separated
list. The list of filesystem types can be prefixed with
diff --git a/mount/umount.c b/mount/umount.c
index 49741a51..b5ff8a17 100644
--- a/mount/umount.c
+++ b/mount/umount.c
@@ -267,15 +267,20 @@ umount_one (const char *spec, const char *node, const char *type,
res = mount(spec, node, NULL,
MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL);
if (res == 0) {
- struct my_mntent remnt;
fprintf(stderr,
_("umount: %s busy - remounted read-only\n"),
spec);
- remnt.mnt_type = remnt.mnt_fsname = NULL;
- remnt.mnt_dir = xstrdup(node);
- remnt.mnt_opts = xstrdup("ro");
- if (!nomtab)
+ if (mc && !nomtab) {
+ /* update mtab if the entry is there */
+ struct my_mntent remnt;
+ remnt.mnt_fsname = mc->m.mnt_fsname;
+ remnt.mnt_dir = mc->m.mnt_dir;
+ remnt.mnt_type = mc->m.mnt_type;
+ remnt.mnt_opts = "ro";
+ remnt.mnt_freq = 0;
+ remnt.mnt_passno = 0;
update_mtab(node, &remnt);
+ }
return 0;
} else if (errno != EBUSY) { /* hmm ... */
perror("remount");