Date: Sat, 22 Aug 2015 21:35:35 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r287027 - stable/10/bin/mv Message-ID: <201508222135.t7MLZZWH025720@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sat Aug 22 21:35:35 2015 New Revision: 287027 URL: https://svnweb.freebsd.org/changeset/base/287027 Log: 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 Modified: stable/10/bin/mv/mv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/mv/mv.c ============================================================================== --- stable/10/bin/mv/mv.c Sat Aug 22 16:59:27 2015 (r287026) +++ stable/10/bin/mv/mv.c Sat Aug 22 21:35:35 2015 (r287027) @@ -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])); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508222135.t7MLZZWH025720>