summaryrefslogtreecommitdiffstats
path: root/isys/imount.c
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-02-21 16:54:27 -0500
committerChris Lumens <clumens@redhat.com>2008-02-21 16:54:27 -0500
commitd85f234b3e327f719fa328cb6728fc206b3677d1 (patch)
tree0b0ae14a7367a682510f0b95b3516fc0c2294b2f /isys/imount.c
parent340ab81f1b99a19da9c79184a2b661ed4928dff8 (diff)
downloadanaconda-d85f234b3e327f719fa328cb6728fc206b3677d1.tar.gz
anaconda-d85f234b3e327f719fa328cb6728fc206b3677d1.tar.xz
anaconda-d85f234b3e327f719fa328cb6728fc206b3677d1.zip
Don't try to lock /etc/mtab, fix error detection when mount fails.
Diffstat (limited to 'isys/imount.c')
-rw-r--r--isys/imount.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/isys/imount.c b/isys/imount.c
index a167c03c1..434fc61bd 100644
--- a/isys/imount.c
+++ b/isys/imount.c
@@ -72,11 +72,11 @@ int doPwMount(char *dev, char *where, char *fs, char *options) {
if (opts) {
rc = execl("/bin/mount",
- "/bin/mount", "-t", fs, "-o", opts, dev, where, NULL);
+ "/bin/mount", "-n", "-t", fs, "-o", opts, dev, where, NULL);
exit(1);
}
else {
- rc = execl("/bin/mount", "/bin/mount", "-t", fs, dev, where, NULL);
+ rc = execl("/bin/mount", "/bin/mount", "-n", "-t", fs, dev, where, NULL);
exit(1);
}
}
@@ -84,8 +84,8 @@ int doPwMount(char *dev, char *where, char *fs, char *options) {
waitpid(child, &status, 0);
free(opts);
- if (status)
- return IMOUNT_ERR_OTHER;
+ if (!WIFEXITED(status) || (WIFEXITED(status) && WEXITSTATUS(status)))
+ return IMOUNT_ERR_OTHER;
return 0;
}