From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on071f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe46::71f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6257581C9A for ; Mon, 28 Nov 2016 19:59:31 -0800 (PST) Received: from CS1PR84MB0037.NAMPRD84.PROD.OUTLOOK.COM (10.162.189.143) by CS1PR84MB0039.NAMPRD84.PROD.OUTLOOK.COM (10.162.189.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.13; Tue, 29 Nov 2016 03:59:29 +0000 Received: from CS1PR84MB0037.NAMPRD84.PROD.OUTLOOK.COM ([10.162.189.143]) by CS1PR84MB0037.NAMPRD84.PROD.OUTLOOK.COM ([10.162.189.143]) with mapi id 15.01.0747.015; Tue, 29 Nov 2016 03:59:29 +0000 From: "Hegde, Nagaraj P" To: Zhang Lubo , "edk2-devel@lists.01.org" CC: Ye Ting , Fu Siyuan , Wu Jiaxin Thread-Topic: [edk2] [PATCH v2] ShellPkg: Add error prompt message in Ifconfig6 command. Thread-Index: AQHSSex9SzL7HvjxlEmdIYXUhYGQsqDvVYsw Date: Tue, 29 Nov 2016 03:59:28 +0000 Message-ID: References: <1480388290-13564-1-git-send-email-lubo.zhang@intel.com> In-Reply-To: <1480388290-13564-1-git-send-email-lubo.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=nagaraj-p.hegde@hpe.com; x-originating-ip: [15.219.195.6] x-ms-office365-filtering-correlation-id: d6715ded-e1fa-49ed-a595-08d4180c1e45 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CS1PR84MB0039; x-microsoft-exchange-diagnostics: 1; CS1PR84MB0039; 7:zAnxwzLBBdkQ+y738p8hnHAfzR8r5jxh9P7UREYihuLCJRA/Ey82rU5K0KD1AFNModDoXn6e/uLHXabkRAd99pSv8KntLur9NdAhg51M2xVAQ9WIJtMHVZQtgW3EB/bbJGNjd6uz8aKvPSSg+yWVKCkrHNh3ThJWmFhkAm0mQ9eZgIIJqB//IDaPY6foxrxPajBzYCi51LEioya3jSbNvRS8isi3hxtHaOoS3LkYL3Smdy/EimFI7Y8s2h0TXCIVACEYx/0dR+Dt2BBfdhyDm/iBHI6VbFuKIc/3WI+B3WFoqat/jH6I3Uq7uEPCu6QL41ZkP9k6ii0X/A0X1nMnZesIIJiH2YHCsFUVf4MTGgdhKyGNteCHAq3Ep66HmP/LLiCCxegzfJFu4sYKfunyhY/FsEEmBoR8w+hDEc2mKYRsA3YOWQhQKajqXC7spW4xXjUsrNyERuk0CXC92Dr7zA== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(158342451672863)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6060326)(6040361)(6045199)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6061324)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025); SRVR:CS1PR84MB0039; BCL:0; PCL:0; RULEID:; SRVR:CS1PR84MB0039; x-forefront-prvs: 01415BB535 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(199003)(13464003)(377454003)(189002)(2900100001)(86362001)(5660300001)(6506003)(39400400001)(7696004)(38730400001)(122556002)(305945005)(7846002)(7736002)(2950100002)(77096006)(229853002)(39410400001)(39380400001)(66066001)(39450400002)(74316002)(2501003)(15650500001)(8676002)(8936002)(81166006)(2906002)(68736007)(9686002)(3280700002)(92566002)(33656002)(81156014)(102836003)(6116002)(189998001)(105586002)(99286002)(3846002)(106116001)(106356001)(5001770100001)(50986999)(76176999)(54356999)(4326007)(97736004)(101416001)(3660700001)(19627235001); DIR:OUT; SFP:1102; SCL:1; SRVR:CS1PR84MB0039; H:CS1PR84MB0037.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2016 03:59:28.9955 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR84MB0039 Subject: Re: [PATCH v2] ShellPkg: Add error prompt message in Ifconfig6 command. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2016 03:59:31 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Spelling correction in the uni file for STR_IFCONFIG6_ERR_MAN_GW. Should be= "Gateway" instead of "Getway". Reviewed-by: Hegde, Nagaraj P -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Zhan= g Lubo Sent: Tuesday, November 29, 2016 8:28 AM To: edk2-devel@lists.01.org Cc: Ye Ting ; Fu Siyuan ; Wu Jiaxin= Subject: [edk2] [PATCH v2] ShellPkg: Add error prompt message in Ifconfig6 = command. v2: update the prompt message more readable. It should display error prompt message when Ifconfig6 can not configure cor= rectly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo Cc: Ye Ting Cc: Fu Siyuan Cc: Wu Jiaxin --- ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c | 15 +++++++++++= ++++ .../UefiShellNetwork2CommandsLib.uni | 9 +++++++++ 2 files changed, 24 insertions(+) diff --git a/ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c b/Sh= ellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c index 32dd284..fb308cc 100644 --- a/ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c +++ b/ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c @@ -1315,10 +1315,24 @@ IfConfig6SetInterfaceInfo ( goto ON_EXIT; } =20 VarArg=3D VarArg->Next; =20 + if (StrCmp (VarArg->Arg, L"host") =3D=3D 0) { + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IFCONFIG6_ERR_INV= ALID_IP_CONFIG), gShellNetwork2HiiHandle, Status); + ShellStatus =3D EFI_INVALID_PARAMETER; + goto ON_EXIT; + } else if (StrCmp (VarArg->Arg, L"gw") =3D=3D 0) { + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IFCONFIG6_ERR_INV= ALID_GW_CONFIG), gShellNetwork2HiiHandle, Status); + ShellStatus =3D EFI_INVALID_PARAMETER; + goto ON_EXIT; + } else if (StrCmp (VarArg->Arg, L"dns") =3D=3D 0) { + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IFCONFIG6_ERR_INV= ALID_DNS_CONFIG), gShellNetwork2HiiHandle, Status); + ShellStatus =3D EFI_INVALID_PARAMETER; + goto ON_EXIT; + } + } else if (StrCmp (VarArg->Arg, L"man") =3D=3D 0) { // // Set manual config policy. // Policy =3D Ip6ConfigPolicyManual; @@ -1509,10 +1523,11 @@ IfConfig6SetInterfaceInfo ( CfgAddr ); =20 if (EFI_ERROR (Status)) { ShellStatus =3D SHELL_ACCESS_DENIED; + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN=20 + (STR_IFCONFIG6_ERR_MAN_GW), gShellNetwork2HiiHandle, Status); goto ON_EXIT; } =20 } else if (StrCmp (VarArg->Arg, L"dns") =3D=3D 0) { // diff --git a/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork= 2CommandsLib.uni b/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellN= etwork2CommandsLib.uni index c3445bb..79af7f9 100644 --- a/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2Comman= dsLib.uni +++ b/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2Com +++ mandsLib.uni @@ -75,10 +75,19 @@ #string STR_IFCONFIG6_ERR_LACK_ARGUMENTS #language en-US "Lack ar= guments. Bad command %H%s%N is skipped.\r\n" "Hint: P= lease type 'IfConfig6 -?' for help info.\r\n" #string STR_IFCONFIG6_ERR_LACK_OPTION #language en-US "Lack op= tions.\r\n" "Hint: P= lease type 'IfConfig6 -?' for help info.\r\n" #string STR_IFCONFIG6_ERR_MAN_HOST #language en-US "Manual = address configuration failed. Please retry.\r\n" + +#string STR_IFCONFIG6_ERR_MAN_GW #language en-US "Getway = address configuration failed. Please check the argument.\r\n" + +#string STR_IFCONFIG6_ERR_INVALID_IP_CONFIG #language en-US "The IP = address is not configurable when the policy is Ip6ConfigPolicyAutomatic.\r\= n" + +#string STR_IFCONFIG6_ERR_INVALID_GW_CONFIG #language en-US "The gat= eway address is not configurable when the policy is Ip6ConfigPolicyAutomati= c.\r\n" + +#string STR_IFCONFIG6_ERR_INVALID_DNS_CONFIG #language en-US "The DNS= server address is not configurable when the policy is Ip6ConfigPolicyAutom= atic.\r\n" + #string STR_IFCONFIG6_ERR_DUPLICATE_COMMAND #language en-US "Duplica= te commands. Bad command %H%s%N is skipped.\r\n" "Hint: P= lease type 'IfConfig6 -?' for help info.\r\n" #string STR_IFCONFIG6_ERR_CONFLICT_COMMAND #language en-US "Conflic= t commands. Bad command %H%s%N is skipped.\r\n" "Hint: P= lease type 'IfConfig6 -?' for help info.\r\n" #string STR_IFCONFIG6_ERR_UNKNOWN_COMMAND #language en-US "Unknown= commands. Bad command %H%s%N is skipped.\r\n" -- 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel