From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 17FF881C5B for ; Tue, 29 Nov 2016 21:54:59 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP; 29 Nov 2016 21:54:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,720,1473145200"; d="scan'208";a="1092427068" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 29 Nov 2016 21:54:56 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 29 Nov 2016 21:54:56 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 29 Nov 2016 21:54:55 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.96]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.96]) with mapi id 14.03.0248.002; Wed, 30 Nov 2016 13:54:52 +0800 From: "Wu, Jiaxin" To: "Zhang, Lubo" , "edk2-devel@lists.01.org" CC: "Ye, Ting" , "Fu, Siyuan" Thread-Topic: [edk2] [PATCH v2] ShellPkg: Add error prompt message in Ifconfig6 command. Thread-Index: AQHSSex5aPClCtza7k2gSb47DpkEeKDxCJuQ Date: Wed, 30 Nov 2016 05:54:51 +0000 Message-ID: <895558F6EA4E3B41AC93A00D163B7274138B66ED@SHSMSX103.ccr.corp.intel.com> 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: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjYyNjVhMTMtNTJiNi00YzYwLWFmMDItNGJhODNiNzUwOWRmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Im4wSEUwQnJXY3dOVXRXd250bEtIM20rM3dEM0ZPakRjMjBWNFRHRzRPdnM9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 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: Wed, 30 Nov 2016 05:54:59 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed by : Wu Jiaxin > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Zhang Lubo > Sent: Tuesday, November 29, 2016 10:58 AM > To: edk2-devel@lists.01.org > Cc: Ye, Ting ; Fu, Siyuan ; Wu, > Jiaxin > Subject: [edk2] [PATCH v2] ShellPkg: Add error prompt message in Ifconfig= 6 > command. >=20 > v2: update the prompt message more readable. >=20 > It should display error prompt message when Ifconfig6 can not configure > correctly. >=20 > 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(+) >=20 > diff --git a/ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c > b/ShellPkg/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_INVALID_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_INVALID_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_INVALID_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 > + (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/UefiShellNetwork2Com > mandsLib.uni > b/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2Com > mandsLib.uni > index c3445bb..79af7f9 100644 > --- > a/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2Com > mandsLib.uni > +++ > b/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2Com > +++ mandsLib.uni > @@ -75,10 +75,19 @@ > #string STR_IFCONFIG6_ERR_LACK_ARGUMENTS #language en-US > "Lack arguments. Bad command %H%s%N is skipped.\r\n" > "Hint:= Please type 'IfConfig6 -?' for help > info.\r\n" > #string STR_IFCONFIG6_ERR_LACK_OPTION #language en-US "Lack > options.\r\n" > "Hint:= Please type 'IfConfig6 -?' for help > info.\r\n" > #string STR_IFCONFIG6_ERR_MAN_HOST #language en-US "Manua= l > address configuration failed. Please retry.\r\n" > + > +#string STR_IFCONFIG6_ERR_MAN_GW #language en-US "Getwa= y > 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 gateway address is not configurable when the policy is > Ip6ConfigPolicyAutomatic.\r\n" > + > +#string STR_IFCONFIG6_ERR_INVALID_DNS_CONFIG #language en-US > "The DNS server address is not configurable when the policy is > Ip6ConfigPolicyAutomatic.\r\n" > + > #string STR_IFCONFIG6_ERR_DUPLICATE_COMMAND #language en-US > "Duplicate commands. Bad command %H%s%N is skipped.\r\n" > "Hint:= Please type 'IfConfig6 -?' for help > info.\r\n" > #string STR_IFCONFIG6_ERR_CONFLICT_COMMAND #language en-US > "Conflict commands. Bad command %H%s%N is skipped.\r\n" > "Hint:= Please 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 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel