diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-05-04 14:49:58 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-05-04 14:49:58 +0000 |
commit | 1a515047c42e0ba1fc1068f55660eaddaf5407e1 (patch) | |
tree | 40ad37b3ae456d2aaa02de47419630bad480b5b4 /util-linux | |
parent | d270024ec781d50ae76f7d2181542adea375c845 (diff) | |
download | busybox-w32-1a515047c42e0ba1fc1068f55660eaddaf5407e1.tar.gz busybox-w32-1a515047c42e0ba1fc1068f55660eaddaf5407e1.tar.bz2 busybox-w32-1a515047c42e0ba1fc1068f55660eaddaf5407e1.zip |
Fix two bugs reported by Ralph Jones.
git-svn-id: svn://busybox.net/trunk/busybox@2530 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/mount.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index 89eb099c5..9d61bd3e3 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -381,9 +381,13 @@ extern int mount_main(int argc, char **argv) | |||
381 | if (!all && optind == argc) | 381 | if (!all && optind == argc) |
382 | show_mounts(); | 382 | show_mounts(); |
383 | 383 | ||
384 | if (optind < argc) | 384 | if (optind < argc) { |
385 | if (realpath(argv[optind], device) == NULL) | 385 | /* Don't canonicalize NFS devices. */ |
386 | if (strchr(argv[optind], ':') != NULL) | ||
387 | safe_strncpy(device, argv[optind], PATH_MAX); | ||
388 | else if (realpath(argv[optind], device) == NULL) | ||
386 | perror_msg_and_die("%s", device); | 389 | perror_msg_and_die("%s", device); |
390 | } | ||
387 | 391 | ||
388 | if (optind + 1 < argc) | 392 | if (optind + 1 < argc) |
389 | if (realpath(argv[optind + 1], directory) == NULL) | 393 | if (realpath(argv[optind + 1], directory) == NULL) |
@@ -444,7 +448,7 @@ singlemount: | |||
444 | if (fstabmount == TRUE) | 448 | if (fstabmount == TRUE) |
445 | endmntent(f); | 449 | endmntent(f); |
446 | 450 | ||
447 | if (all == FALSE && fstabmount == TRUE && optind + 1 == argc) | 451 | if (all == FALSE && fstabmount == TRUE && m == NULL) |
448 | fprintf(stderr, "Can't find %s in /etc/fstab\n", device); | 452 | fprintf(stderr, "Can't find %s in /etc/fstab\n", device); |
449 | 453 | ||
450 | return rc; | 454 | return rc; |