summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Kraai2001-02-28 15:33:12 +0000
committerMatt Kraai2001-02-28 15:33:12 +0000
commit93ba60f01d19f443187d8720fd8a93bdb890d4e5 (patch)
tree6c421438a6ce0ac49c0a1284ae52c3a1ac01d0a4
parent1b6cff3df400e36310307ef240c81f8e668573ab (diff)
downloadbusybox-93ba60f01d19f443187d8720fd8a93bdb890d4e5.zip
busybox-93ba60f01d19f443187d8720fd8a93bdb890d4e5.tar.gz
Keep trying if an NFS mount fails, and eliminate a call to exit(3).
-rw-r--r--mount.c9
-rw-r--r--util-linux/mount.c9
2 files changed, 8 insertions, 10 deletions
diff --git a/mount.c b/mount.c
index 551695b..76cab7d 100644
--- a/mount.c
+++ b/mount.c
@@ -479,10 +479,9 @@ singlemount:
if (strchr(device, ':') != NULL)
filesystemType = "nfs";
if (strcmp(filesystemType, "nfs") == 0) {
- rc = nfsmount (device, directory, &flags,
- &extra_opts, &string_flags, 1);
- if ( rc != 0) {
- perror_msg_and_die("nfsmount failed");
+ if (nfsmount (device, directory, &flags, &extra_opts,
+ &string_flags, 1)) {
+ perror_msg("nfsmount failed");
rc = EXIT_FAILURE;
}
}
@@ -500,7 +499,7 @@ singlemount:
if (all == FALSE && fstabmount == TRUE && directory == NULL)
fprintf(stderr, "Can't find %s in /etc/fstab\n", device);
- exit(rc);
+ return rc;
}
goto singlemount;
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 551695b..76cab7d 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -479,10 +479,9 @@ singlemount:
if (strchr(device, ':') != NULL)
filesystemType = "nfs";
if (strcmp(filesystemType, "nfs") == 0) {
- rc = nfsmount (device, directory, &flags,
- &extra_opts, &string_flags, 1);
- if ( rc != 0) {
- perror_msg_and_die("nfsmount failed");
+ if (nfsmount (device, directory, &flags, &extra_opts,
+ &string_flags, 1)) {
+ perror_msg("nfsmount failed");
rc = EXIT_FAILURE;
}
}
@@ -500,7 +499,7 @@ singlemount:
if (all == FALSE && fstabmount == TRUE && directory == NULL)
fprintf(stderr, "Can't find %s in /etc/fstab\n", device);
- exit(rc);
+ return rc;
}
goto singlemount;