From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 16:21:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ADEAC6A for ; Thu, 15 Nov 2012 16:21:36 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob11.myregisteredsite.com (atl4mhob11.myregisteredsite.com [209.17.115.49]) by mx1.freebsd.org (Postfix) with ESMTP id 5EBE08FC12 for ; Thu, 15 Nov 2012 16:21:36 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob11.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFGLZ13011704 for ; Thu, 15 Nov 2012 11:21:35 -0500 Received: (qmail 16150 invoked by uid 0); 15 Nov 2012 16:01:49 -0000 Received: (qmail 12711 invoked by uid 0); 15 Nov 2012 15:06:49 -0000 Received: from unknown (HELO atl4mhib22.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:06:49 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib22.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFF6mjG018743 for ; Thu, 15 Nov 2012 10:06:48 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 77E793B6D62; Thu, 15 Nov 2012 15:06:22 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id 4D842501; Thu, 15 Nov 2012 15:06:07 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6B6D163; Thu, 15 Nov 2012 15:05:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ABA2B8FC14; Thu, 15 Nov 2012 15:05:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF5pj3003660; Thu, 15 Nov 2012 15:05:51 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF5pVc003659; Thu, 15 Nov 2012 15:05:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151505.qAFF5pVc003659@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243072 - head/bin/mv X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 16:21:36 -0000 Author: eadler Date: Thu Nov 15 15:05:51 2012 New Revision: 243072 URL: http://svnweb.freebsd.org/changeset/base/243072 Log: Follow the behavior as specified in POSIX: if (exists AND (NOT f_option) AND ((not_writable AND input_is_terminal) OR i_option)) prompt in particular, add the test for input_is_terminal PR: bin/173039 Submitted by: Mark Johnston Approved by: cperciva MFC after: 3 days Modified: head/bin/mv/mv.c Modified: head/bin/mv/mv.c ============================================================================== --- head/bin/mv/mv.c Thu Nov 15 15:05:47 2012 (r243071) +++ head/bin/mv/mv.c Thu Nov 15 15:05:51 2012 (r243072) @@ -199,7 +199,7 @@ do_move(const char *from, const char *to } else if (iflg) { (void)fprintf(stderr, "overwrite %s? %s", to, YESNO); ask = 1; - } else if (access(to, W_OK) && !stat(to, &sb)) { + } else if (access(to, W_OK) && !stat(to, &sb) && isatty(STDIN_FILENO)) { strmode(sb.st_mode, modep); (void)fprintf(stderr, "override %s%s%s/%s for %s? %s", modep + 1, modep[9] == ' ' ? "" : " ", _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"