Revision: 15354
http://sourceforge.net/p/edk2/code/15354
Author: jcarsey
Date: 2014-03-20 17:12:30 +0000 (Thu, 20 Mar 2014)
Log Message:
-----------
ShellPkg: remove redudant code. call existing API.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <[email protected]>
Reviewed-by: Erik Bjorge <[email protected]>
Modified Paths:
--------------
trunk/edk2/ShellPkg/Library/UefiShellDriver1CommandsLib/Unload.c
Modified: trunk/edk2/ShellPkg/Library/UefiShellDriver1CommandsLib/Unload.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellDriver1CommandsLib/Unload.c
2014-03-20 17:11:52 UTC (rev 15353)
+++ trunk/edk2/ShellPkg/Library/UefiShellDriver1CommandsLib/Unload.c
2014-03-20 17:12:30 UTC (rev 15354)
@@ -1,7 +1,7 @@
/** @file
Main file for Unload shell Driver1 function.
- Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2014, 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
@@ -28,42 +28,14 @@
IN EFI_HANDLE TheHandle
)
{
- EFI_LOADED_IMAGE_PROTOCOL *Image;
- EFI_STATUS Status;
- CHAR16 *DevicePathText;
- CHAR16 *CodeTypeText;
- CHAR16 *DataTypeText;
- CHAR8 *PdbPointer;
+ CHAR16 *TheString;
- Image = NULL;
+ TheString = GetProtocolInformationDump(TheHandle,
&gEfiLoadedImageProtocolGuid, TRUE);
+
+ ShellPrintEx(-1, -1, L"%s", TheString);
- Status = gBS->OpenProtocol(TheHandle, &gEfiLoadedImageProtocolGuid,
(VOID**)&Image, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
- if (EFI_ERROR(Status)) {
- return (EFI_INVALID_PARAMETER);
- }
- DevicePathText = ConvertDevicePathToText(Image->FilePath, TRUE, TRUE);
- CodeTypeText = ConvertMemoryType(Image->ImageCodeType);
- DataTypeText = ConvertMemoryType(Image->ImageDataType);
- PdbPointer = (CHAR8*)PeCoffLoaderGetPdbPointer(Image->ImageBase);
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_UNLOAD_VERBOSE),
gShellDriver1HiiHandle,
- ConvertHandleToHandleIndex(TheHandle),
- TheHandle,
- Image,
- Image->ParentHandle,
- Image->SystemTable,
- Image->DeviceHandle,
- DevicePathText,
- PdbPointer,
- Image->ImageBase,
- Image->ImageSize,
- CodeTypeText,
- DataTypeText
- );
-
- SHELL_FREE_NON_NULL(DevicePathText);
- SHELL_FREE_NON_NULL(CodeTypeText);
- SHELL_FREE_NON_NULL(DataTypeText);
-
+ SHELL_FREE_NON_NULL(TheString);
+
return (EFI_SUCCESS);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits