TianoCore EDK2 master
|
#include "UefiShellLevel2CommandsLib.h"
#include <Protocol/SimpleFileSystem.h>
#include <Protocol/BlockIo.h>
#include <Library/DevicePathLib.h>
#include <Library/HandleParsingLib.h>
#include <Library/SortLib.h>
Go to the source code of this file.
Functions | |
BOOLEAN | IsNumberLetterOnly (IN CONST CHAR16 *String, IN CONST UINTN Len) |
BOOLEAN | SearchList (IN CONST CHAR16 *List, IN CONST CHAR16 *MetaTarget, OUT CHAR16 **FullName OPTIONAL, IN CONST BOOLEAN Meta, IN CONST BOOLEAN SkipTrailingNumbers, IN CONST CHAR16 *Target) |
CHAR16 * | GetDeviceMediaType (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath) |
BOOLEAN | IsRemoveableDevice (IN EFI_DEVICE_PATH_PROTOCOL *DevicePath) |
BOOLEAN | MappingListHasType (IN CONST CHAR16 *MapList, IN CONST CHAR16 *Specific, IN CONST CHAR16 *TypeString, IN CONST BOOLEAN Normal, IN CONST BOOLEAN Consist) |
EFI_STATUS | PerformSingleMappingDisplay (IN CONST BOOLEAN Verbose, IN CONST BOOLEAN Consist, IN CONST BOOLEAN Normal, IN CONST CHAR16 *TypeString, IN CONST BOOLEAN SFO, IN CONST CHAR16 *Specific OPTIONAL, IN CONST EFI_HANDLE Handle) |
EFI_STATUS | PerformSingleMappingDelete (IN CONST CHAR16 *Specific, IN CONST EFI_HANDLE Handle) |
SHELL_STATUS | PerformMappingDisplay (IN CONST BOOLEAN Verbose, IN CONST BOOLEAN Consist, IN CONST BOOLEAN Normal, IN CONST CHAR16 *TypeString, IN CONST BOOLEAN SFO, IN CONST CHAR16 *Specific OPTIONAL, IN CONST BOOLEAN Header) |
SHELL_STATUS | PerformMappingDisplay2 (IN CONST BOOLEAN Verbose, IN CONST BOOLEAN Consist, IN CONST BOOLEAN Normal, IN CONST CHAR16 *TypeString, IN CONST BOOLEAN SFO, IN CONST CHAR16 *Specific OPTIONAL) |
EFI_STATUS | PerformMappingDelete (IN CONST CHAR16 *Specific) |
SHELL_STATUS | AddMappingFromMapping (IN CONST CHAR16 *Map, IN CONST CHAR16 *SName) |
SHELL_STATUS | AddMappingFromHandle (IN CONST EFI_HANDLE Handle, IN CONST CHAR16 *SName) |
VOID | ProbeForMediaChange (VOID) |
SHELL_STATUS EFIAPI | ShellCommandRunMap (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
CONST CHAR16 | Cd [] = L"cd*" |
CONST CHAR16 | Hd [] = L"hd*" |
CONST CHAR16 | Fp [] = L"fp*" |
CONST CHAR16 | AnyF [] = L"F*" |
STATIC CONST SHELL_PARAM_ITEM | MapParamList [] |
Main file for map shell level 2 command.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Map.c.
SHELL_STATUS AddMappingFromHandle | ( | IN CONST EFI_HANDLE | Handle, |
IN CONST CHAR16 * | SName | ||
) |
function to add a mapping from an EFI_HANDLE.
This function will get the device path associated with the Handle and call SetMap.
[in] | Handle | The handle to add a mapping for |
[in] | SName | The name of the new mapping |
SHELL_SUCCESS | the mapping was added |
SHELL_INVALID_PARAMETER | SName was not valid for a map name. |
SHELL_STATUS AddMappingFromMapping | ( | IN CONST CHAR16 * | Map, |
IN CONST CHAR16 * | SName | ||
) |
function to add a mapping from mapping.
This function will get the device path associated with the mapping and call SetMap.
[in] | Map | The Map to add a mapping for |
[in] | SName | The name of the new mapping |
SHELL_SUCCESS | the mapping was added |
SHELL_INVALID_PARAMETER | the device path for Map could not be retrieved. |
CHAR16 * GetDeviceMediaType | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath | ) |
Determine what type of device is represented and return it's string. The string is in allocated memory and must be callee freed. The HII is is listed below. The actual string cannot be determined.
[in] | DevicePath | The device to analyze. |
STR_MAP_MEDIA_UNKNOWN | The media type is unknown. |
STR_MAP_MEDIA_HARDDISK | The media is a hard drive. |
STR_MAP_MEDIA_CDROM | The media is a CD ROM. |
STR_MAP_MEDIA_FLOPPY | The media is a floppy drive. |
Determine if a string has only numbers and letters.
This is useful for such things as Map names which can only be letters and numbers.
[in] | String | pointer to the string to analyze, |
[in] | Len | Number of characters to analyze. |
TRUE | String has only numbers and letters |
FALSE | String has at least one other character. |
BOOLEAN IsRemoveableDevice | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath | ) |
BOOLEAN MappingListHasType | ( | IN CONST CHAR16 * | MapList, |
IN CONST CHAR16 * | Specific, | ||
IN CONST CHAR16 * | TypeString, | ||
IN CONST BOOLEAN | Normal, | ||
IN CONST BOOLEAN | Consist | ||
) |
Function to detemine if a something on the map list matches.
[in] | MapList | The pointer to the list to test. |
[in] | Specific | The pointer to a specific name to test for. |
[in] | TypeString | The pointer to the list of types. |
[in] | Normal | Always show normal mappings. |
[in] | Consist | Always show consistent mappings. |
TRUE | The map should be displayed. |
FALSE | The map should not be displayed. |
EFI_STATUS PerformMappingDelete | ( | IN CONST CHAR16 * | Specific | ) |
SHELL_STATUS PerformMappingDisplay | ( | IN CONST BOOLEAN | Verbose, |
IN CONST BOOLEAN | Consist, | ||
IN CONST BOOLEAN | Normal, | ||
IN CONST CHAR16 * | TypeString, | ||
IN CONST BOOLEAN | SFO, | ||
IN CONST CHAR16 *Specific | OPTIONAL, | ||
IN CONST BOOLEAN | Header | ||
) |
Function to display mapping information to the user.
If Specific is specified then Consist and Normal will be ignored since information will be printed for the specific item only.
[in] | Verbose | TRUE to display (extra) verbose information. |
[in] | Consist | TRUE to display consistent mappings. |
[in] | Normal | TRUE to display normal (not consist) mappings. |
[in] | TypeString | Pointer to string of filter types. |
[in] | SFO | TRUE to display output in Standard Output Format. |
[in] | Specific | Pointer to string for specific map to display. |
[in] | Header | TRUE to print the header block. |
SHELL_SUCCESS | The display was printed. |
SHELL_INVALID_PARAMETER | One of Consist or Normal must be TRUE if no Specific. |
SHELL_STATUS PerformMappingDisplay2 | ( | IN CONST BOOLEAN | Verbose, |
IN CONST BOOLEAN | Consist, | ||
IN CONST BOOLEAN | Normal, | ||
IN CONST CHAR16 * | TypeString, | ||
IN CONST BOOLEAN | SFO, | ||
IN CONST CHAR16 *Specific | OPTIONAL | ||
) |
Perform a mapping display and parse for multiple types in the TypeString.
[in] | Verbose | TRUE to use verbose output. |
[in] | Consist | TRUE to display consistent names. |
[in] | Normal | TRUE to display normal names. |
[in] | TypeString | An optional comma-delimited list of types. |
[in] | SFO | TRUE to display in SFO format. See Spec. |
[in] | Specific | An optional specific map name to display alone. |
SHELL_INVALID_PARAMETER | A parameter was invalid. |
SHELL_SUCCESS | The display was successful. |
EFI_STATUS PerformSingleMappingDelete | ( | IN CONST CHAR16 * | Specific, |
IN CONST EFI_HANDLE | Handle | ||
) |
EFI_STATUS PerformSingleMappingDisplay | ( | IN CONST BOOLEAN | Verbose, |
IN CONST BOOLEAN | Consist, | ||
IN CONST BOOLEAN | Normal, | ||
IN CONST CHAR16 * | TypeString, | ||
IN CONST BOOLEAN | SFO, | ||
IN CONST CHAR16 *Specific | OPTIONAL, | ||
IN CONST EFI_HANDLE | Handle | ||
) |
Display a single map line for device Handle if conditions are met.
[in] | Verbose | TRUE to display (extra) verbose information. |
[in] | Consist | TRUE to display consistent mappings. |
[in] | Normal | TRUE to display normal (not consist) mappings. |
[in] | TypeString | pointer to string of filter types. |
[in] | SFO | TRUE to display output in Standard Output Format. |
[in] | Specific | pointer to string for specific map to display. |
[in] | Handle | The handle to display from. |
EFI_SUCCESS | The mapping was displayed. |
VOID ProbeForMediaChange | ( | VOID | ) |
BOOLEAN SearchList | ( | IN CONST CHAR16 * | List, |
IN CONST CHAR16 * | MetaTarget, | ||
OUT CHAR16 **FullName | OPTIONAL, | ||
IN CONST BOOLEAN | Meta, | ||
IN CONST BOOLEAN | SkipTrailingNumbers, | ||
IN CONST CHAR16 * | Target | ||
) |
Do a search in the Target delimited list.
[in] | List | The list to seatch in. |
[in] | MetaTarget | The item to search for. MetaMatching supported. |
[out] | FullName | Optional pointer to an allocated buffer containing the match. |
[in] | Meta | TRUE to use MetaMatching. |
[in] | SkipTrailingNumbers | TRUE to allow for numbers after the MetaTarget. |
[in] | Target | The single character that delimits list items (";" normally). |
SHELL_STATUS EFIAPI ShellCommandRunMap | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
STATIC CONST SHELL_PARAM_ITEM MapParamList[] |