summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2015-06-28 21:36:00 +0000
committerjilles <jilles@FreeBSD.org>2015-06-28 21:36:00 +0000
commit2120b1ed16dc65b7d4b2ab07ed54f3a7282eb12a (patch)
tree70cf23d98dd1ff0eb5a7fd5c986026ff8e48dd9a /bin
parent0647fdddb3df86e40812519e4913a3f61d94c95c (diff)
downloadFreeBSD-src-2120b1ed16dc65b7d4b2ab07ed54f3a7282eb12a.zip
FreeBSD-src-2120b1ed16dc65b7d4b2ab07ed54f3a7282eb12a.tar.gz
mv: Improve message when moving two or more files to non-directory.
The message text is from cp, which has had a nicer message for this since 2007 (PR bin/50656). As with cp, the exit status changes from 64 to 1. PR: 201083 MFC after: 1 week
Diffstat (limited to 'bin')
-rw-r--r--bin/mv/mv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c
index a95b07a..c19f6a0 100644
--- a/bin/mv/mv.c
+++ b/bin/mv/mv.c
@@ -122,7 +122,7 @@ main(int argc, char *argv[])
*/
if (stat(argv[argc - 1], &sb) || !S_ISDIR(sb.st_mode)) {
if (argc > 2)
- usage();
+ errx(1, "%s is not a directory", argv[argc - 1]);
exit(do_move(argv[0], argv[1]));
}
OpenPOWER on IntegriCloud