From 680d65a646feaea3c3440ca81732c3c09ae95d15 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 6 Jun 2000 17:03:55 +0000 Subject: "mount" now reports errors from nfsmount() and assumes NFS mount if ':' is present in the device name - Pavel Roskin --- util-linux/mount.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'util-linux/mount.c') 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, -- cgit v1.1