summaryrefslogtreecommitdiff
path: root/mount/fstab.c
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2008-01-28 14:30:29 +0100
committerKarel Zak <kzak@redhat.com>2008-02-14 14:28:19 +0100
commitc3327025169a7c6c59edce7eb271a333c42b5275 (patch)
treed417ead077ae7feb3405a8936d2c0d5b955b5722 /mount/fstab.c
parent5c55d9bf1ae789fd25d5e4153c699134706c2e9f (diff)
downloadutil-linux-old-c3327025169a7c6c59edce7eb271a333c42b5275.tar.gz
mount: "can't create lock file" message sometimes means failure, sometimes not
What the patch does is goes from the situation where: 1) If /etc/mtab doesn't exist and /etc is read-only, you get the "can't create lock file" message and the mount fails 2) If /etc/mtab does exist and /etc is read-only,you get the same message but the mount succeeds Clearly, the failure to update /etc/mtab should either cause the mount to fail or not ... sometimes causing it to fail, and sometimes not (each with the same message) is not useful. This patch sets the same behaviour for create and update mtab. In both cases it prints error message and the mount succeeds. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/fstab.c')
-rw-r--r--mount/fstab.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mount/fstab.c b/mount/fstab.c
index 03ddf4ec..814e6fc0 100644
--- a/mount/fstab.c
+++ b/mount/fstab.c
@@ -41,6 +41,11 @@ get_mtab_info(void) {
}
}
+void
+reset_mtab_info(void) {
+ have_mtab_info = 0;
+}
+
int
mtab_does_not_exist(void) {
get_mtab_info();