Revision: 17978
http://sourceforge.net/p/edk2/code/17978
Author: jcarsey
Date: 2015-07-14 17:54:12 +0000 (Tue, 14 Jul 2015)
Log Message:
-----------
ShellPkg: decode serial console attribute set failure status when used thru
sermode command
Serial console driver may not support all databits / stopbits attribute values.
But ?\226?\128?\152sermode?\226?\128?\153 command only displays a general error
indicating operation failure.
Instead it should decode error status and report more accurate error message.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>
Modified Paths:
--------------
trunk/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/SerMode.c
trunk/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
Modified: trunk/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/SerMode.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/SerMode.c
2015-07-14 16:07:02 UTC (rev 17977)
+++ trunk/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/SerMode.c
2015-07-14 17:54:12 UTC (rev 17978)
@@ -337,8 +337,16 @@
StopBits
);
if (EFI_ERROR (Status)) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_FAIL),
gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
- ShellStatus = SHELL_ACCESS_DENIED;
+ if (Status == EFI_INVALID_PARAMETER) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN
(STR_SERMODE_SET_UNSUPPORTED), gShellDebug1HiiHandle, L"sermode",
ConvertHandleToHandleIndex(Handles[Index]));
+ ShellStatus = SHELL_UNSUPPORTED;
+ } else if (Status == EFI_DEVICE_ERROR) {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN
(STR_SERMODE_SET_DEV_ERROR), gShellDebug1HiiHandle, L"sermode",
ConvertHandleToHandleIndex(Handles[Index]));
+ ShellStatus = SHELL_ACCESS_DENIED;
+ } else {
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN
(STR_SERMODE_SET_FAIL), gShellDebug1HiiHandle, L"sermode",
ConvertHandleToHandleIndex(Handles[Index]));
+ ShellStatus = SHELL_ACCESS_DENIED;
+ }
} else {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN
(STR_SERMODE_SET_HANDLE), gShellDebug1HiiHandle,
ConvertHandleToHandleIndex(Handles[Index]));
}
Modified:
trunk/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
===================================================================
---
trunk/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
2015-07-14 16:07:02 UTC (rev 17977)
+++
trunk/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
2015-07-14 17:54:12 UTC (rev 17978)
@@ -346,6 +346,10 @@
++
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits