aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog2
-rw-r--r--mount.c11
-rw-r--r--util-linux/mount.c11
3 files changed, 16 insertions, 8 deletions
diff --git a/Changelog b/Changelog
index 637f983e9..7ac97dc71 100644
--- a/Changelog
+++ b/Changelog
@@ -57,6 +57,8 @@
57 * Implemented "rm -- <foo>" 57 * Implemented "rm -- <foo>"
58 * "which" rewritten to use stat(). Fixes to improve its compatability 58 * "which" rewritten to use stat(). Fixes to improve its compatability
59 with traditional implementations -- Pavel Roskin. 59 with traditional implementations -- Pavel Roskin.
60 * "mount" now reports errors from nfsmount() and assumes NFS mount
61 if ':' is present in the device name - Pavel Roskin
60 * More doc updates 62 * More doc updates
61 63
62 64
diff --git a/mount.c b/mount.c
index bde55d155..ee6c9475a 100644
--- a/mount.c
+++ b/mount.c
@@ -483,11 +483,14 @@ extern int mount_main(int argc, char **argv)
483 } else { 483 } else {
484 if (device && directory) { 484 if (device && directory) {
485#ifdef BB_NFSMOUNT 485#ifdef BB_NFSMOUNT
486 if (strchr(device, ':') != NULL)
487 filesystemType = "nfs";
486 if (strcmp(filesystemType, "nfs") == 0) { 488 if (strcmp(filesystemType, "nfs") == 0) {
487 if (nfsmount 489 int ret;
488 (device, directory, &flags, &extra_opts, &string_flags, 490 ret = nfsmount (device, directory, &flags,
489 1) != 0) 491 &extra_opts, &string_flags, 1);
490 exit(FALSE); 492 if (ret != 0)
493 fatalError("nfsmount failed: %s\n", strerror(errno));
491 } 494 }
492#endif 495#endif
493 exit(mount_one(device, directory, filesystemType, 496 exit(mount_one(device, directory, filesystemType,
diff --git a/util-linux/mount.c b/util-linux/mount.c
index bde55d155..ee6c9475a 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -483,11 +483,14 @@ extern int mount_main(int argc, char **argv)
483 } else { 483 } else {
484 if (device && directory) { 484 if (device && directory) {
485#ifdef BB_NFSMOUNT 485#ifdef BB_NFSMOUNT
486 if (strchr(device, ':') != NULL)
487 filesystemType = "nfs";
486 if (strcmp(filesystemType, "nfs") == 0) { 488 if (strcmp(filesystemType, "nfs") == 0) {
487 if (nfsmount 489 int ret;
488 (device, directory, &flags, &extra_opts, &string_flags, 490 ret = nfsmount (device, directory, &flags,
489 1) != 0) 491 &extra_opts, &string_flags, 1);
490 exit(FALSE); 492 if (ret != 0)
493 fatalError("nfsmount failed: %s\n", strerror(errno));
491 } 494 }
492#endif 495#endif
493 exit(mount_one(device, directory, filesystemType, 496 exit(mount_one(device, directory, filesystemType,