From: Glenn L McGrath Date: Mon, 7 May 2001 01:51:24 +0000 (-0000) Subject: Actually we dont need to check if the device is nfs as it wont be stat'ed X-Git-Tag: 0_52~232 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cc0aa0f2d74901f3cdc87073f52020b98605cb79;p=oweals%2Fbusybox.git Actually we dont need to check if the device is nfs as it wont be stat'ed --- diff --git a/mount.c b/mount.c index e511b798b..0295fabc6 100644 --- a/mount.c +++ b/mount.c @@ -385,8 +385,7 @@ extern int mount_main(int argc, char **argv) if (optind < argc) { /* if device is a filename get its real path */ - if ((strchr(argv[optind], ':') == NULL) && - (stat(argv[optind], &statbuf) == 0)) { + if (stat(argv[optind], &statbuf) == 0) { realpath(argv[optind], device); } else { safe_strncpy(device, argv[optind], PATH_MAX); diff --git a/util-linux/mount.c b/util-linux/mount.c index e511b798b..0295fabc6 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -385,8 +385,7 @@ extern int mount_main(int argc, char **argv) if (optind < argc) { /* if device is a filename get its real path */ - if ((strchr(argv[optind], ':') == NULL) && - (stat(argv[optind], &statbuf) == 0)) { + if (stat(argv[optind], &statbuf) == 0) { realpath(argv[optind], device); } else { safe_strncpy(device, argv[optind], PATH_MAX);