diff options
author | Pavel Roskin | 2000-06-06 17:03:55 +0000 |
---|---|---|
committer | Pavel Roskin | 2000-06-06 17:03:55 +0000 |
commit | 680d65a646feaea3c3440ca81732c3c09ae95d15 (patch) | |
tree | f1d28e9822c2df07e37ac314f0c86ab9ea7e6995 | |
parent | 68480dc30f9cdf4a660ea773353d2c9f56eb61d8 (diff) | |
download | busybox-680d65a646feaea3c3440ca81732c3c09ae95d15.zip busybox-680d65a646feaea3c3440ca81732c3c09ae95d15.tar.gz |
"mount" now reports errors from nfsmount() and assumes NFS mount
if ':' is present in the device name - Pavel Roskin
-rw-r--r-- | Changelog | 2 | ||||
-rw-r--r-- | mount.c | 11 | ||||
-rw-r--r-- | util-linux/mount.c | 11 |
3 files changed, 16 insertions, 8 deletions
@@ -57,6 +57,8 @@ * Implemented "rm -- <foo>" * "which" rewritten to use stat(). Fixes to improve its compatability with traditional implementations -- Pavel Roskin. + * "mount" now reports errors from nfsmount() and assumes NFS mount + if ':' is present in the device name - Pavel Roskin * More doc updates @@ -483,11 +483,14 @@ extern int mount_main(int argc, char **argv) } else { if (device && directory) { #ifdef BB_NFSMOUNT + if (strchr(device, ':') != NULL) + filesystemType = "nfs"; if (strcmp(filesystemType, "nfs") == 0) { - if (nfsmount - (device, directory, &flags, &extra_opts, &string_flags, - 1) != 0) - exit(FALSE); + int ret; + ret = nfsmount (device, directory, &flags, + &extra_opts, &string_flags, 1); + if (ret != 0) + fatalError("nfsmount failed: %s\n", strerror(errno)); } #endif exit(mount_one(device, directory, filesystemType, diff --git a/util-linux/mount.c b/util-linux/mount.c index bde55d1..ee6c947 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -483,11 +483,14 @@ extern int mount_main(int argc, char **argv) } else { if (device && directory) { #ifdef BB_NFSMOUNT + if (strchr(device, ':') != NULL) + filesystemType = "nfs"; if (strcmp(filesystemType, "nfs") == 0) { - if (nfsmount - (device, directory, &flags, &extra_opts, &string_flags, - 1) != 0) - exit(FALSE); + int ret; + ret = nfsmount (device, directory, &flags, + &extra_opts, &string_flags, 1); + if (ret != 0) + fatalError("nfsmount failed: %s\n", strerror(errno)); } #endif exit(mount_one(device, directory, filesystemType, |