From nobody Sat Nov 2 10:27:47 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1491555038256662.0345540866374; Fri, 7 Apr 2017 01:50:38 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1E13B21942349; Fri, 7 Apr 2017 01:50:36 -0700 (PDT) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 851C72194233D for ; Fri, 7 Apr 2017 01:50:34 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2017 01:50:34 -0700 Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 07 Apr 2017 01:50:34 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 7 Apr 2017 01:50:33 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.193]) with mapi id 14.03.0319.002; Fri, 7 Apr 2017 16:50:32 +0800 X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491555034; x=1523091034; h=from:to:cc:subject:date:message-id:mime-version; bh=7ALS4ZUpB4aOGYmt2XFx0AOxYN9ulcsnFez9L0CSS3s=; b=G4nB4IvH2FxHyTW2TObc5y9LcI+hMyP922ldSXMc3TapBV/Khtffur8N tXFvtNK7MCMYxoEqZf3l9sZ1CIZecg==; X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,164,1488873600"; d="dat'59?scan'59,208,59";a="843191097" From: "Song, BinX" To: "edk2-devel@lists.01.org" Thread-Topic: [PATCH] BaseTools: Add --version option in Brotli and BrotliCompress Thread-Index: AdKvfALL/6qmxoS1TD2taIbw2hC2dQ== Date: Fri, 7 Apr 2017 08:50:30 +0000 Message-ID: <559D2DF22BC9A3468B4FA1AA547F0EF10255ACCB@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: <559D2DF22BC9A3468B4FA1AA547F0EF10255ACCB@shsmsx102.ccr.corp.intel.com> x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: [edk2] [PATCH] BaseTools: Add --version option in Brotli and BrotliCompress X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Gao, Liming" Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D464 - Add --version option in Brotli and BrotliCompress Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bell Song --- BaseTools/BinWrappers/PosixLike/BrotliCompress | 3 +++ BaseTools/Source/C/BrotliCompress/BrotliCompress.bat | 6 ++++++ BaseTools/Source/C/BrotliCompress/tools/bro.c | 8 +++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/BaseTools/BinWrappers/PosixLike/BrotliCompress b/BaseTools/Bin= Wrappers/PosixLike/BrotliCompress index 59c6465..f7a2079 100755 --- a/BaseTools/BinWrappers/PosixLike/BrotliCompress +++ b/BaseTools/BinWrappers/PosixLike/BrotliCompress @@ -32,6 +32,9 @@ while [ $# !=3D 0 ];do ARGS+=3D"--output $2 " shift ;; + --version) + ARGS+=3D"$1 " + ;; *) ARGS+=3D"--input $1 " esac diff --git a/BaseTools/Source/C/BrotliCompress/BrotliCompress.bat b/BaseToo= ls/Source/C/BrotliCompress/BrotliCompress.bat index 257bf1e..5949782 100644 --- a/BaseTools/Source/C/BrotliCompress/BrotliCompress.bat +++ b/BaseTools/Source/C/BrotliCompress/BrotliCompress.bat @@ -52,6 +52,12 @@ if "%1"=3D=3D"-o" ( goto Begin ) =20 +if "%1"=3D=3D"--version" ( + set ARGS=3D%ARGS% %1 + shift + goto Begin +) + set ARGS=3D%ARGS% --input %1 shift goto Begin diff --git a/BaseTools/Source/C/BrotliCompress/tools/bro.c b/BaseTools/Sour= ce/C/BrotliCompress/tools/bro.c index 2fa9f05..df54738 100644 --- a/BaseTools/Source/C/BrotliCompress/tools/bro.c +++ b/BaseTools/Source/C/BrotliCompress/tools/bro.c @@ -67,6 +67,8 @@ static int ParseQuality(const char* s, int* quality) { return 0; } =20 +#define BRO_VER "0.5.2" + static void ParseArgv(int argc, char **argv, char **input_path, char **output_path, @@ -110,6 +112,9 @@ static void ParseArgv(int argc, char **argv, } *verbose =3D 1; continue; + } else if (!strcmp("--version", argv[k])) { + fprintf(stderr, "Brotli Version %s\n", BRO_VER); + exit(1); } if (k < argc - 1) { if (!strcmp("--input", argv[k]) || @@ -177,7 +182,8 @@ error: fprintf(stderr, "Usage: %s [--force] [--quality n] [--gap n] [--decompress]" " [--input filename] [--output filename] [--repeat iters]" - " [--verbose] [--window n] [--custom-dictionary filename]\n", + " [--verbose] [--window n] [--custom-dictionary filename]" + " [--version]\n", argv[0]); exit(1); } --=20 2.10.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel