summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2015-08-22 21:35:35 +0000
committerjilles <jilles@FreeBSD.org>2015-08-22 21:35:35 +0000
commit403ac3fe2ac5f9025e10e44971d01a8c6ef8d0ae (patch)
tree3edb8ea42624d14550ed003ac386f1461a8397a9 /bin
parent170343c951ee836a0be987536f35a69bbe3670de (diff)
downloadFreeBSD-src-403ac3fe2ac5f9025e10e44971d01a8c6ef8d0ae.zip
FreeBSD-src-403ac3fe2ac5f9025e10e44971d01a8c6ef8d0ae.tar.gz
MFC r284916: 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
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 2710f89..566167d 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