From patchwork Wed Nov 23 23:53:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Graunke X-Patchwork-Id: 9444507 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 23806600BA for ; Thu, 24 Nov 2016 00:01:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FF1A27D7F for ; Thu, 24 Nov 2016 00:01:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 11F7827DF9; Thu, 24 Nov 2016 00:01:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CDADC27D7F for ; Thu, 24 Nov 2016 00:01:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F299D89FC5; Thu, 24 Nov 2016 00:01:41 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org X-Greylist: delayed 482 seconds by postgrey-1.35 at gabe; Thu, 24 Nov 2016 00:01:40 UTC Received: from smtp65.iad3a.emailsrvr.com (smtp65.iad3a.emailsrvr.com [173.203.187.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id D47B089FC5 for ; Thu, 24 Nov 2016 00:01:40 +0000 (UTC) Received: from smtp1.relay.iad3a.emailsrvr.com (localhost [127.0.0.1]) by smtp1.relay.iad3a.emailsrvr.com (SMTP Server) with ESMTP id 26CA5628A; Wed, 23 Nov 2016 18:53:38 -0500 (EST) X-Auth-ID: kenneth@whitecape.org Received: by smtp1.relay.iad3a.emailsrvr.com (Authenticated sender: kenneth-AT-whitecape.org) with ESMTPSA id A316D5E14; Wed, 23 Nov 2016 18:53:37 -0500 (EST) X-Sender-Id: kenneth@whitecape.org Received: from eiger.amr.corp.intel.com ([UNAVAILABLE]. [170.173.8.12]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256) by 0.0.0.0:465 (trex/5.7.12); Wed, 23 Nov 2016 18:53:38 -0500 From: Kenneth Graunke To: intel-gfx@lists.freedesktop.org Date: Wed, 23 Nov 2016 15:53:33 -0800 Message-Id: <20161123235333.32296-1-kenneth@whitecape.org> X-Mailer: git-send-email 2.10.2 Cc: Kenneth Graunke Subject: [Intel-gfx] [PATCH] aubdump: Fix intel_aubdump -o X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP This looks like a mistake in 1f43677f895a88ae880b35f9b18cc7e6869d0ca6. --- tools/intel_aubdump.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) This code still looks really weird. ${foo:bar} means "the value of $foo, unless it's unset/empty, in which case 'bar'. But if $file is empty... then we process $file? Maybe I'm not reading it right. diff --git a/tools/intel_aubdump.in b/tools/intel_aubdump.in index 343dc29..977fe95 100644 --- a/tools/intel_aubdump.in +++ b/tools/intel_aubdump.in @@ -36,31 +36,31 @@ function add_arg() { function build_command () { command="" for i in $1; do if [ -z $command ]; then command=$i else command="$command,$i" fi; done } while true; do case "$1" in -o) file=$2 - add_arg "file=${f:-$(basename ${f}).aub}" + add_arg "file=${file:-$(basename ${file}).aub}" shift 2 ;; -v) add_arg "verbose=1" shift 1 ;; -o*) file=${1##-o} add_arg "file=${file:-$(basename ${file}).aub}" shift ;; --output=*) file=${1##--output=} add_arg "file=${file:-$(basename ${file}).aub}" shift