From owner-svn-src-all@freebsd.org Sun Jun 28 21:36:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ECCB98F25E; Sun, 28 Jun 2015 21:36:01 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7024D1917; Sun, 28 Jun 2015 21:36:01 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5SLa1E0060898; Sun, 28 Jun 2015 21:36:01 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5SLa1ZO060897; Sun, 28 Jun 2015 21:36:01 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201506282136.t5SLa1ZO060897@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 28 Jun 2015 21:36:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284916 - head/bin/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 21:36:01 -0000 Author: jilles Date: Sun Jun 28 21:36:00 2015 New Revision: 284916 URL: https://svnweb.freebsd.org/changeset/base/284916 Log: 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 Modified: head/bin/mv/mv.c Modified: head/bin/mv/mv.c ============================================================================== --- head/bin/mv/mv.c Sun Jun 28 21:06:45 2015 (r284915) +++ head/bin/mv/mv.c Sun Jun 28 21:36:00 2015 (r284916) @@ -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])); }