Actually we dont need to check if the device is nfs as it wont be stat'ed

This commit is contained in:
Glenn L McGrath 2001-05-07 01:51:24 +00:00
parent 1b62619446
commit cc0aa0f2d7
2 changed files with 2 additions and 4 deletions

View File

@ -385,8 +385,7 @@ extern int mount_main(int argc, char **argv)
if (optind < argc) { if (optind < argc) {
/* if device is a filename get its real path */ /* if device is a filename get its real path */
if ((strchr(argv[optind], ':') == NULL) && if (stat(argv[optind], &statbuf) == 0) {
(stat(argv[optind], &statbuf) == 0)) {
realpath(argv[optind], device); realpath(argv[optind], device);
} else { } else {
safe_strncpy(device, argv[optind], PATH_MAX); safe_strncpy(device, argv[optind], PATH_MAX);

View File

@ -385,8 +385,7 @@ extern int mount_main(int argc, char **argv)
if (optind < argc) { if (optind < argc) {
/* if device is a filename get its real path */ /* if device is a filename get its real path */
if ((strchr(argv[optind], ':') == NULL) && if (stat(argv[optind], &statbuf) == 0) {
(stat(argv[optind], &statbuf) == 0)) {
realpath(argv[optind], device); realpath(argv[optind], device);
} else { } else {
safe_strncpy(device, argv[optind], PATH_MAX); safe_strncpy(device, argv[optind], PATH_MAX);