blob: 2b8f4ad36c3f1107d902bab0f6ab537eebdea80e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
Make umount respect the -n option when using -r
Patch by Derick Swanepoel
http://bugs.gentoo.org/98675
--- mount/umount.c
+++ mount/umount.c
@@ -349,7 +349,8 @@
remnt.mnt_type = remnt.mnt_fsname = NULL;
remnt.mnt_dir = xstrdup(node);
remnt.mnt_opts = xstrdup("ro");
- update_mtab(node, &remnt);
+ if (!nomtab && mtab_is_writable())
+ update_mtab(node, &remnt);
return 0;
} else if (errno != EBUSY) { /* hmm ... */
perror("remount");
|