From patchwork Sun Dec 14 05:31:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 420828 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 0FA72140082 for ; Sun, 14 Dec 2014 16:31:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5188DA742C; Sun, 14 Dec 2014 06:31:24 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SOubx4l6MPwj; Sun, 14 Dec 2014 06:31:24 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A7FE6A741B; Sun, 14 Dec 2014 06:31:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C028CA741B for ; Sun, 14 Dec 2014 06:31:18 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yASvBiZhH2hL for ; Sun, 14 Dec 2014 06:31:18 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-oi0-f73.google.com (mail-oi0-f73.google.com [209.85.218.73]) by theia.denx.de (Postfix) with ESMTPS id 62B43A740F for ; Sun, 14 Dec 2014 06:31:15 +0100 (CET) Received: by mail-oi0-f73.google.com with SMTP id a141so1112017oig.2 for ; Sat, 13 Dec 2014 21:31:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pkoyOrVA0ylOeD162LMP6fU+K0Pd7tVfUPT3ZElKq3Y=; b=MaOkhCZoSnohBDCYlKnRXkq23Iram89t2POrDTfPOMhs6Y81rGCd7d5MGBXPV3qNHA 8MN1z0A1Z77I4Lx/c1UY/BrHIeakpy4dHRI6EYGI4IcxAjI4ub9val5Rp1eu9hNDNQUD /LfwktwHprYzguqWruR/ZFUaRbhXVGCOYRHxM+wSsHns3Sl8ih9FOsw9Lk4iPvQd2RrS lk7JTESANiMzCWKdwh3PGrqaV+tZljWRDjeRfoIyqHAZo8BfsiBPWl5QANnotP/MRxvk uIH9Iv+3x61HOlI2yGfHJMpVJiYm32xAlhdq7d6vikWm2rviRNK22aiU0GtArUUkuXb1 po1g== X-Gm-Message-State: ALoCoQn0uYspTNxOLrcjFH3InXKH+qWx9Mlja7+M8OqIqhFE2e7avk1OI9WevTm3W78QZXL7Z0pj X-Received: by 10.182.33.7 with SMTP id n7mr20814025obi.19.1418535073721; Sat, 13 Dec 2014 21:31:13 -0800 (PST) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id 5si313389yhd.6.2014.12.13.21.31.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Dec 2014 21:31:13 -0800 (PST) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id 4sCOQppF.1; Sat, 13 Dec 2014 21:31:13 -0800 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id ED040220A03; Sat, 13 Dec 2014 22:31:12 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Sat, 13 Dec 2014 22:31:03 -0700 Message-Id: <1418535063-5580-1-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c Cc: Graeme Russ Subject: [U-Boot] [PATCH] x86: ifdtool: Separate out filenames for -D and -i X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de To allow these options to be specified together, separate them out. Signed-off-by: Simon Glass --- tools/ifdtool.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/ifdtool.c b/tools/ifdtool.c index a4b481f..09f33a8 100644 --- a/tools/ifdtool.c +++ b/tools/ifdtool.c @@ -778,8 +778,8 @@ int main(int argc, char *argv[]) int mode_spifreq = 0, mode_em100 = 0, mode_locked = 0; int mode_unlocked = 0, mode_write = 0, mode_write_descriptor = 0; int create = 0; - char *region_type_string = NULL, *src_fname = NULL; - char *addr_str = NULL; + char *region_type_string = NULL, *inject_fname = NULL; + char *desc_fname = NULL, *addr_str = NULL; int region_type = -1, inputfreq = 0; enum spi_frequency spifreq = SPI_FREQUENCY_20MHZ; unsigned int addr = 0; @@ -820,14 +820,14 @@ int main(int argc, char *argv[]) break; case 'D': mode_write_descriptor = 1; - src_fname = optarg; + desc_fname = optarg; break; case 'e': mode_em100 = 1; break; case 'i': if (get_two_words(optarg, ®ion_type_string, - &src_fname)) { + &inject_fname)) { print_usage(argv[0]); exit(EXIT_FAILURE); } @@ -997,10 +997,10 @@ int main(int argc, char *argv[]) } if (mode_write_descriptor) - ret = write_data(image, size, -size, src_fname); + ret = write_data(image, size, -size, desc_fname); if (mode_inject) - ret = inject_region(image, size, region_type, src_fname); + ret = inject_region(image, size, region_type, inject_fname); if (mode_write) ret = write_data(image, size, addr, src_fname);