From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17347 invoked by alias); 4 Aug 2014 06:45:28 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 17325 invoked by uid 89); 4 Aug 2014 06:45:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mailout4.w1.samsung.com Received: from mailout4.w1.samsung.com (HELO mailout4.w1.samsung.com) (210.118.77.14) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (DES-CBC3-SHA encrypted) ESMTPS; Mon, 04 Aug 2014 06:45:16 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9R003L6S32QS50@mailout4.w1.samsung.com> for gcc-patches@gcc.gnu.org; Mon, 04 Aug 2014 07:45:02 +0100 (BST) Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 81.49.25543.7FB2FD35; Mon, 04 Aug 2014 07:45:11 +0100 (BST) Received: from [106.109.9.145] by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N9R002RAS38O650@eusync4.samsung.com>; Mon, 04 Aug 2014 07:45:11 +0100 (BST) Message-id: <53DF2BF4.8090806@samsung.com> Date: Mon, 04 Aug 2014 06:45:00 -0000 From: Yury Gribov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-version: 1.0 To: Tom de Vries , Diego Novillo Cc: Geoff Keating , GCC Patches , Trevor Saunders Subject: Re: [PATCH] Keep patch file permissions in mklog References: <5389890F.2050501@mentor.com> <53DB15C5.6070206@samsung.com> <53DB391C.7050808@mentor.com> <53DB3F2A.5070800@samsung.com> <53DD3AB2.9040901@mentor.com> In-reply-to: <53DD3AB2.9040901@mentor.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00200.txt.bz2 Thanks! My 2 (actually 4) cents below. > +if ($#ARGV == 1 && ("$ARGV[0]" eq "-i" || "$ARGV[0]" eq "--inline")) { > + $diff = $ARGV[1]; Can we shift here and then just set $diff to $ARGV[0] unconditionally? > + if ($diff eq "-") { > + die "Reading from - and using -i are not compatible"; > + } Hm, can't we dump ChangeLog to stdout in that case? The limitation looks rather strange. > + open (FILE1, '>', $tmp) or die "Could not open temp file"; Could we use more descriptive name? > + system ("cat $diff >>$tmp") == 0 > + or die "Could not append patch to temp file"; > ... > + unlink ($tmp) == 1 or die "Could not remove temp file"; The checks look like an overkill given that we don't check for result of mktemp... -Y