diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-03-25 21:13:43 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-03-25 21:13:43 +0000 |
commit | 361a8267362f755cca29495afa79efa0e9fd9714 (patch) | |
tree | 2fe16e35f4813ccc25263498f73060e2bbf2f3cb /ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c | |
parent | 1a63ec8f82705d4fb97e4034c1471c8e2a5c9cc5 (diff) | |
download | edk2-platforms-361a8267362f755cca29495afa79efa0e9fd9714.tar.xz |
connect - add comments and add input verification
devices - add comments and add input verification
devtree - add comments and add input verification
dh - add comments, add input verification, add support for "-d"
disconnect - add comments and add input verification
drivers - add comments
drvcfg - add comment
drvdiag - add comments, add input verification, and fix language use
openinfo - add comments and add input verification
reconnect - add comment
unload - add input verification.
main library files: add comments, #define protection, and more output to the user.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11434 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c')
-rw-r--r-- | ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c index 8a5c79b8cb..a66bdec06b 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/DevTree.c @@ -1,7 +1,7 @@ /** @file
Main file for DevTree shell Driver1 function.
- Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -20,6 +20,18 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] = { {NULL, TypeMax}
};
+/**
+ Display a tree starting from this handle.
+
+ @param[in] TheHandle The handle to start with.
+ @param[in] Lang Optionally, a UEFI defined language code.
+ @param[in] UseDevPaths TRUE to display info from DevPath as identifiers.
+ FALSE will use component name protocol instead.
+ @param[in] IndentCharCount How many characters to indent (allows for recursion).
+ @param[in] HiiString The string from HII to use for output.
+
+ @retval SHELL_SUCCESS The operation was successful.
+**/
SHELL_STATUS
EFIAPI
DoDevTreeForHandle(
@@ -156,6 +168,7 @@ ShellCommandRunDevTree ( UINTN LoopVar;
EFI_HANDLE TheHandle;
BOOLEAN FlagD;
+ UINT64 Intermediate;
ShellStatus = SHELL_SUCCESS;
Status = EFI_SUCCESS;
@@ -216,11 +229,12 @@ ShellCommandRunDevTree ( ShellStatus = DoDevTreeForHandle(TheHandle, Language, FlagD, 0, HiiString);
}
} else {
- if (!ShellIsHexOrDecimalNumber(Lang, TRUE, FALSE) || ConvertHandleIndexToHandle(StrHexToUintn(Lang)) == NULL) {
+ Status = ShellConvertStringToUint64(Lang, &Intermediate, TRUE, FALSE);
+ if (EFI_ERROR(Status) || ConvertHandleIndexToHandle((UINTN)Intermediate) == NULL) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, Lang);
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
- ShellStatus = DoDevTreeForHandle(ConvertHandleIndexToHandle(StrHexToUintn(Lang)), Language, FlagD, 0, HiiString);
+ ShellStatus = DoDevTreeForHandle(ConvertHandleIndexToHandle((UINTN)Intermediate), Language, FlagD, 0, HiiString);
}
}
|