/** @file
Main file for Unload shell Driver1 function.
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
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "UefiShellDriver1CommandsLib.h"
/**
Function to translate the EFI_MEMORY_TYPE into a string.
@param[in] Memory The memory type.
@retval A string representation of the type allocated from BS Pool.
**/
)
{
switch (Memory) {
case EfiMemoryMappedIOPortSpace: StrnCatGrow(&RetVal, NULL, L"EfiMemoryMappedIOPortSpace", 0); break;
}
return (RetVal);
}
/**
Function to dump LoadedImage info from TheHandle.
@param[in] TheHandle The handle to dump info from.
@retval EFI_SUCCESS The info was dumped.
@retval EFI_INVALID_PARAMETER The handle did not have LoadedImage
**/
)
{
Status = gBS->OpenProtocol(TheHandle, &gEfiLoadedImageProtocolGuid, (VOID**)&Image, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
return (EFI_INVALID_PARAMETER);
}
NULL,
(VOID**)&DevicePathToText);
//
// we now have the device path to text protocol
//
} else {
}
);
return (EFI_SUCCESS);
}
{L"-n", TypeFlag},
{L"-v", TypeFlag},
{L"-verbose", TypeFlag},
};
/**
Function for 'unload' command.
@param[in] ImageHandle Handle to the Image (NULL if Internal).
@param[in] SystemTable Pointer to the System Table (NULL if Internal).
**/
)
{
Value = 0;
//
// initialize the shell lib (we must be in non-auto-init...)
//
Status = ShellInitialize();
//
// parse the command line
//
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, ProblemParam);
} else {
}
} else {
//
// error for too many parameters
//
} else {
}
} else {
}
Status = ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_UNLOAD_CONF), gShellDriver1HiiHandle, (UINTN)TheHandle);
}
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_HANDLE_RESULT), gShellDriver1HiiHandle, L"Unload", (UINTN)TheHandle, Status);
}
}
}
}
if (ShellStatus == SHELL_SUCCESS) {
if (Status == EFI_SECURITY_VIOLATION) {
} else if (Status == EFI_INVALID_PARAMETER) {
}
}
}
return (ShellStatus);
}