34 SHELL_FILE_HANDLE ShellFileHandle;
65 Status = gEfiShellProtocol->OpenFileByName (
68 Name !=
NULL ? EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE : EFI_FILE_MODE_READ
71 if (EFI_ERROR (Status) || (ShellFileHandle ==
NULL)) {
82 Status = EfiFpHandle->GetInfo (
84 &gEfiFileSystemInfoGuid,
89 if (Status == EFI_BUFFER_TOO_SMALL) {
91 if (SysInfo ==
NULL) {
97 Status = EfiFpHandle->GetInfo (
99 &gEfiFileSystemInfoGuid,
108 Status = EfiFpHandle->SetInfo (
110 &gEfiFileSystemInfoGuid,
114 }
else if (Name !=
NULL) {
119 if (SysInfo ==
NULL) {
125 if (SysInfo !=
NULL) {
128 (Size1 > Size2 ? Size1/sizeof (CHAR16) : Size2/
sizeof (CHAR16)),
132 Status = EfiFpHandle->SetInfo (
134 &gEfiFileSystemInfoGuid,
143 if (Delete || (Name !=
NULL)) {
144 if (EFI_ERROR (Status)) {
153 Status = EfiFpHandle->GetInfo (
155 &gEfiFileSystemInfoGuid,
160 if (Status == EFI_BUFFER_TOO_SMALL) {
162 if (SysInfo ==
NULL) {
167 Status = EfiFpHandle->GetInfo (
169 &gEfiFileSystemInfoGuid,
175 gEfiShellProtocol->CloseFile (ShellFileHandle);
177 ASSERT (SysInfo !=
NULL);
179 if (SysInfo !=
NULL) {
188 gShellLevel2HiiHandle,
195 SHELL_FREE_NON_NULL (SysInfo);
198 return (ShellStatus);
222 CHAR16 *ProblemParam;
224 CONST CHAR16 *PathName;
225 CONST CHAR16 *CurDir;
230 CONST CHAR16 *NewName;
255 if (EFI_ERROR (Status)) {
256 if ((Status == EFI_VOLUME_CORRUPTED) && (ProblemParam !=
NULL)) {
276 if (PathName ==
NULL) {
277 CurDir = gEfiShellProtocol->GetCurDir (
NULL);
278 if (CurDir ==
NULL) {
286 if (PathName !=
NULL) {
287 TempSpot =
StrStr (PathName, L
":");
288 if (TempSpot !=
NULL) {
289 *TempSpot = CHAR_NULL;
292 TempSpot =
StrStr (PathName, L
"\\");
293 if (TempSpot !=
NULL) {
294 *TempSpot = CHAR_NULL;
307 }
else if ((NewName !=
NULL) && (
StrLen (NewName) > 11)) {
321 SHELL_FREE_NON_NULL (FullPath);
328 return (ShellStatus);
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
RETURN_STATUS EFIAPI StrCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
CHAR16 *EFIAPI StrStr(IN CONST CHAR16 *String, IN CONST CHAR16 *SearchString)
VOID *EFIAPI ReallocatePool(IN UINTN OldSize, IN UINTN NewSize, IN VOID *OldBuffer OPTIONAL)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define SIZE_OF_EFI_FILE_SYSTEM_INFO
#define ASSERT_EFI_ERROR(StatusParameter)
@ SHELL_INVALID_PARAMETER
EFI_STATUS EFIAPI CommandInit(VOID)
EFI_FILE_PROTOCOL *EFIAPI ConvertShellHandleToEfiFileProtocol(IN CONST SHELL_FILE_HANDLE Handle)
CONST CHAR16 *EFIAPI ShellCommandLineGetValue(IN CONST LIST_ENTRY *CheckPackage, IN CHAR16 *KeyString)
#define ShellCommandLineParse(CheckList, CheckPackage, ProblemParam, AutoPageBreak)
Make it easy to upgrade from older versions of the shell library.
EFI_STATUS EFIAPI ShellPrintHiiEx(IN INT32 Col OPTIONAL, IN INT32 Row OPTIONAL, IN CONST CHAR8 *Language OPTIONAL, IN CONST EFI_STRING_ID HiiFormatStringId, IN CONST EFI_HII_HANDLE HiiFormatHandle,...)
BOOLEAN EFIAPI ShellCommandLineGetFlag(IN CONST LIST_ENTRY *CONST CheckPackage, IN CONST CHAR16 *CONST KeyString)
@ TypeValue
A flag that has some data following it with a space (IE "-a 1").
@ TypeFlag
A flag that is present or not present only (IE "-a").
CHAR16 *EFIAPI StrnCatGrow(IN OUT CHAR16 **Destination, IN OUT UINTN *CurrentSize, IN CONST CHAR16 *Source, IN UINTN Count)
VOID EFIAPI ShellCommandLineFreeVarList(IN LIST_ENTRY *CheckPackage)
EFI_STATUS EFIAPI ShellInitialize(VOID)
CONST CHAR16 *EFIAPI ShellCommandLineGetRawValue(IN CONST LIST_ENTRY *CONST CheckPackage, IN UINTN Position)
UINTN EFIAPI ShellCommandLineGetCount(IN CONST LIST_ENTRY *CheckPackage)
SHELL_STATUS HandleVol(IN CONST CHAR16 *Path, IN CONST BOOLEAN Delete, IN CONST CHAR16 *Name OPTIONAL)
SHELL_STATUS EFIAPI ShellCommandRunVol(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_SIMPLE_TEXT_OUTPUT_MODE * Mode
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * ConOut