From: "Zhang, Lubo" <lubo.zhang@intel.com>
To: "Ye, Ting" <ting.ye@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Fu, Siyuan" <siyuan.fu@intel.com>, "Wu, Jiaxin" <jiaxin.wu@intel.com>
Subject: Re: [patch] ShellPkg: Add error prompt message in Ifconfig6 command.
Date: Mon, 28 Nov 2016 07:43:33 +0000 [thread overview]
Message-ID: <7619447B08B8F74DA4FF2A813B79803B378FD86C@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <BC0C045B0E2A584CA4575E779FA2C12A17EAFB44@SHSMSX103.ccr.corp.intel.com>
Yes, it seems more readable. I will send updated patch later
Thanks
Lubo
> -----Original Message-----
> From: Ye, Ting
> Sent: Monday, November 28, 2016 3:03 PM
> To: Zhang, Lubo <lubo.zhang@intel.com>; edk2-devel@lists.01.org
> Cc: Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
> Subject: RE: [edk2] [patch] ShellPkg: Add error prompt message in Ifconfig6
> command.
>
> Hi Lubo,
>
> I suggest to change below error messages to be more user friendly:
> Don't support to change the IP address manual if the policy is set to auto. Set IP
> address fail.
> Don't support to change the IP address manual if the policy is set to auto. Set
> Getway fail.\ Don't support to change the IP address manual if the policy is set
> to auto. Set DNS fail.
>
> For example, update to:
> The gateway address is not configurable when the policy is
> Ip6ConfigPolicyAutomatic.
>
> Best Regards,
> Ting
>
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Zhang
> Lubo
> Sent: Monday, November 28, 2016 1:43 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>
> Subject: [edk2] [patch] ShellPkg: Add error prompt message in Ifconfig6
> command.
>
> It should display error prompt message when Ifconfig6 can not configure
> correctly.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
> Cc: Ye Ting <ting.ye@intel.com>
> Cc: Fu Siyuan <siyuan.fu@intel.com>
> Cc: Wu Jiaxin <jiaxin.wu@intel.com>
> ---
> ShellPkg/Library/UefiShellNetwork2CommandsLib/Ifconfig6.c | 15
> +++++++++++++++
> .../UefiShellNetwork2CommandsLib.uni | 9 +++++++++
> 2 files changed, 24 insertions(+)
>
> 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;
> }
>
> VarArg= VarArg->Next;
>
> + if (StrCmp (VarArg->Arg, L"host") == 0) {
> + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
> (STR_IFCONFIG6_ERR_INVALID_IP_CONFIG), gShellNetwork2HiiHandle, Status);
> + ShellStatus = EFI_INVALID_PARAMETER;
> + goto ON_EXIT;
> + } else if (StrCmp (VarArg->Arg, L"gw") == 0) {
> + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
> (STR_IFCONFIG6_ERR_INVALID_GW_CONFIG), gShellNetwork2HiiHandle,
> Status);
> + ShellStatus = EFI_INVALID_PARAMETER;
> + goto ON_EXIT;
> + } else if (StrCmp (VarArg->Arg, L"dns") == 0) {
> + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
> (STR_IFCONFIG6_ERR_INVALID_DNS_CONFIG), gShellNetwork2HiiHandle,
> Status);
> + ShellStatus = EFI_INVALID_PARAMETER;
> + goto ON_EXIT;
> + }
> +
> } else if (StrCmp (VarArg->Arg, L"man") == 0) {
> //
> // Set manual config policy.
> //
> Policy = Ip6ConfigPolicyManual;
> @@ -1509,10 +1523,11 @@ IfConfig6SetInterfaceInfo (
> CfgAddr
> );
>
> if (EFI_ERROR (Status)) {
> ShellStatus = SHELL_ACCESS_DENIED;
> + ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
> + (STR_IFCONFIG6_ERR_MAN_GW), gShellNetwork2HiiHandle, Status);
> goto ON_EXIT;
> }
>
> } else if (StrCmp (VarArg->Arg, L"dns") == 0) {
> //
> diff --git
> a/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2Comma
> ndsLib.uni
> b/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2Comma
> ndsLib.uni
> index c3445bb..66ff05c 100644
> ---
> a/ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2Comma
> ndsLib.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 "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 "Don't
> support to change the IP address manual if the policy is set to auto. Set IP
> address fail.\r\n"
> +
> +#string STR_IFCONFIG6_ERR_INVALID_GW_CONFIG #language en-US
> "Don't support to change the IP address manual if the policy is set to auto. Set
> Getway fail.\r\n"
> +
> +#string STR_IFCONFIG6_ERR_INVALID_DNS_CONFIG #language en-US
> "Don't support to change the IP address manual if the policy is set to auto. Set
> DNS fail.\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
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
prev parent reply other threads:[~2016-11-28 7:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-28 5:43 [patch] ShellPkg: Add error prompt message in Ifconfig6 command Zhang Lubo
2016-11-28 5:54 ` Fu, Siyuan
2016-11-28 7:02 ` Ye, Ting
2016-11-28 7:43 ` Zhang, Lubo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7619447B08B8F74DA4FF2A813B79803B378FD86C@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox