diff options
author | Pavel Roskin <proski@gnu.org> | 2000-06-06 17:03:55 +0000 |
---|---|---|
committer | Pavel Roskin <proski@gnu.org> | 2000-06-06 17:03:55 +0000 |
commit | 680d65a646feaea3c3440ca81732c3c09ae95d15 (patch) | |
tree | f1d28e9822c2df07e37ac314f0c86ab9ea7e6995 /util-linux | |
parent | 68480dc30f9cdf4a660ea773353d2c9f56eb61d8 (diff) | |
download | busybox-w32-680d65a646feaea3c3440ca81732c3c09ae95d15.tar.gz busybox-w32-680d65a646feaea3c3440ca81732c3c09ae95d15.tar.bz2 busybox-w32-680d65a646feaea3c3440ca81732c3c09ae95d15.zip |
"mount" now reports errors from nfsmount() and assumes NFS mount
if ':' is present in the device name - Pavel Roskin
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/mount.c | 11 |
1 files changed, 7 insertions, 4 deletions
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, |