mirror of https://github.com/acidanthera/audk.git
fixed license header / copyright date on all files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9810 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
b4d856a6b5
commit
1e6e84c7af
|
@ -1,15 +1,15 @@
|
||||||
/** @file
|
/** @file
|
||||||
This is a test application that demonstrates how to use the C-style entry point
|
This is a test application that demonstrates how to use the C-style entry point
|
||||||
for a shell application.
|
for a shell application.
|
||||||
|
|
||||||
Copyright (c) 2009, Intel Corporation
|
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -32,10 +32,10 @@
|
||||||
@retval Other An error occurred.
|
@retval Other An error occurred.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
INTN
|
INTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ShellAppMain (
|
ShellAppMain (
|
||||||
IN UINTN Argc,
|
IN UINTN Argc,
|
||||||
IN CHAR16 **Argv
|
IN CHAR16 **Argv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#/** @file
|
#/** @file
|
||||||
# This is the shell application
|
# This is the shell application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009, Intel Corporation.
|
# Copyright (c) 2009-2010, Intel Corporation. All rights reserved. <BR>
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
@ -33,11 +33,11 @@
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
ShellPkg/ShellPkg.dec
|
ShellPkg/ShellPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
ShellCEntryLib
|
ShellCEntryLib
|
||||||
UefiLib
|
UefiLib
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
/** @file
|
/** @file
|
||||||
This is a simple shell application
|
This is a simple shell application
|
||||||
|
|
||||||
Copyright (c) 2008, Intel Corporation
|
Copyright (c) 2008-2010, Intel Corporation. All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@
|
||||||
/**
|
/**
|
||||||
as the real entry point for the application.
|
as the real entry point for the application.
|
||||||
|
|
||||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||||
@param[in] SystemTable A pointer to the EFI System Table.
|
@param[in] SystemTable A pointer to the EFI System Table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||||
@retval other Some error occurs when executing this entry point.
|
@retval other Some error occurs when executing this entry point.
|
||||||
|
|
||||||
|
@ -33,6 +33,6 @@ UefiMain (
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Print(L"ShellExecute - Pass");
|
Print(L"ShellExecute - Pass");
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
#
|
#
|
||||||
# This is a simple shell application
|
# This is a simple shell application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009, Intel Corporation.
|
# Copyright (c) 2009-2010, Intel Corporation. All rights reserved. <BR>
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
@ -34,11 +34,11 @@
|
||||||
|
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
UefiApplicationEntryPoint
|
UefiApplicationEntryPoint
|
||||||
UefiLib
|
UefiLib
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
|
|
||||||
[Ppis]
|
[Ppis]
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
#
|
#
|
||||||
# This is a simple shell application
|
# This is a simple shell application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009, Intel Corporation.
|
# Copyright (c) 2009-2010, Intel Corporation. All rights reserved. <BR>
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
@ -35,14 +35,14 @@
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
ShellPkg/ShellPkg.dec
|
ShellPkg/ShellPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
UefiApplicationEntryPoint
|
UefiApplicationEntryPoint
|
||||||
UefiLib
|
UefiLib
|
||||||
ShellLib
|
ShellLib
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
DebugLib
|
DebugLib
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
|
|
||||||
[Ppis]
|
[Ppis]
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
|
|
||||||
This should be executed with "/Param2 Val1" and "/Param1" as the 2 command line options!
|
This should be executed with "/Param2 Val1" and "/Param1" as the 2 command line options!
|
||||||
|
|
||||||
Copyright (c) 2008-2009, Intel Corporation
|
Copyright (c) 2008-2010, Intel Corporation. All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -38,9 +38,9 @@ SHELL_PARAM_ITEM ParamList[] = {
|
||||||
/**
|
/**
|
||||||
as the real entry point for the application.
|
as the real entry point for the application.
|
||||||
|
|
||||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||||
@param[in] SystemTable A pointer to the EFI System Table.
|
@param[in] SystemTable A pointer to the EFI System Table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||||
@retval other Some error occurs when executing this entry point.
|
@retval other Some error occurs when executing this entry point.
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ UefiMain (
|
||||||
EFI_SHELL_FILE_INFO *pShellFileInfo;
|
EFI_SHELL_FILE_INFO *pShellFileInfo;
|
||||||
LIST_ENTRY *List;
|
LIST_ENTRY *List;
|
||||||
// CONST CHAR16 *Tester;
|
// CONST CHAR16 *Tester;
|
||||||
|
|
||||||
FileHandle = NULL;
|
FileHandle = NULL;
|
||||||
StrCpy(FileName, L"testfile.txt");
|
StrCpy(FileName, L"testfile.txt");
|
||||||
// Position = 0;
|
// Position = 0;
|
||||||
|
@ -100,9 +100,9 @@ UefiMain (
|
||||||
|
|
||||||
ShellSetPageBreakMode(TRUE);
|
ShellSetPageBreakMode(TRUE);
|
||||||
|
|
||||||
Status = ShellOpenFileByName(FileName,
|
Status = ShellOpenFileByName(FileName,
|
||||||
&FileHandle,
|
&FileHandle,
|
||||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
|
@ -130,9 +130,9 @@ UefiMain (
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
Print(L"read, write, create, getinfo - pass\r\n");
|
Print(L"read, write, create, getinfo - pass\r\n");
|
||||||
|
|
||||||
Status = ShellOpenFileByName(FileName,
|
Status = ShellOpenFileByName(FileName,
|
||||||
&FileHandle,
|
&FileHandle,
|
||||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
|
@ -141,7 +141,7 @@ UefiMain (
|
||||||
pFileInfo->FileSize = 0x20;
|
pFileInfo->FileSize = 0x20;
|
||||||
Status = ShellSetFileInfo(FileHandle, pFileInfo);
|
Status = ShellSetFileInfo(FileHandle, pFileInfo);
|
||||||
FreePool(pFileInfo);
|
FreePool(pFileInfo);
|
||||||
pFileInfo = NULL;
|
pFileInfo = NULL;
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
pFileInfo = ShellGetFileInfo(FileHandle);
|
pFileInfo = ShellGetFileInfo(FileHandle);
|
||||||
ASSERT(pFileInfo != NULL);
|
ASSERT(pFileInfo != NULL);
|
||||||
|
@ -156,10 +156,10 @@ UefiMain (
|
||||||
Status = ShellCloseFile(&FileHandle);
|
Status = ShellCloseFile(&FileHandle);
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
Print(L"setinfo and change size, getsize - pass\r\n");
|
Print(L"setinfo and change size, getsize - pass\r\n");
|
||||||
|
|
||||||
Status = ShellOpenFileByName(FileName,
|
Status = ShellOpenFileByName(FileName,
|
||||||
&FileHandle,
|
&FileHandle,
|
||||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
|
@ -171,14 +171,14 @@ UefiMain (
|
||||||
ASSERT(pFileInfo->FileSize == 0x20);
|
ASSERT(pFileInfo->FileSize == 0x20);
|
||||||
ASSERT((pFileInfo->Attribute&EFI_FILE_DIRECTORY)==0);
|
ASSERT((pFileInfo->Attribute&EFI_FILE_DIRECTORY)==0);
|
||||||
FreePool(pFileInfo);
|
FreePool(pFileInfo);
|
||||||
pFileInfo = NULL;
|
pFileInfo = NULL;
|
||||||
Status = ShellDeleteFile(&FileHandle);
|
Status = ShellDeleteFile(&FileHandle);
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
Print(L"reopen file - pass\r\n");
|
Print(L"reopen file - pass\r\n");
|
||||||
|
|
||||||
Status = ShellOpenFileByName(FileName,
|
Status = ShellOpenFileByName(FileName,
|
||||||
&FileHandle,
|
&FileHandle,
|
||||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
|
@ -193,9 +193,9 @@ UefiMain (
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
Print(L"size of empty - pass\r\n");
|
Print(L"size of empty - pass\r\n");
|
||||||
|
|
||||||
Status = ShellOpenFileByName(FileName,
|
Status = ShellOpenFileByName(FileName,
|
||||||
&FileHandle,
|
&FileHandle,
|
||||||
EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
ASSERT(Status == EFI_NOT_FOUND);
|
ASSERT(Status == EFI_NOT_FOUND);
|
||||||
|
@ -211,23 +211,23 @@ UefiMain (
|
||||||
Status = ShellDeleteFile(&FileHandle);
|
Status = ShellDeleteFile(&FileHandle);
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
Print(L"Directory create - pass\r\n");
|
Print(L"Directory create - pass\r\n");
|
||||||
|
|
||||||
// FindFirst and FindNext
|
// FindFirst and FindNext
|
||||||
StrCpy(FileName, L"testDir");
|
StrCpy(FileName, L"testDir");
|
||||||
Status = ShellCreateDirectory(FileName, &FileHandle);
|
Status = ShellCreateDirectory(FileName, &FileHandle);
|
||||||
Status = ShellCloseFile(&FileHandle);
|
Status = ShellCloseFile(&FileHandle);
|
||||||
StrCat(FileName, L"\\File.txt");
|
StrCat(FileName, L"\\File.txt");
|
||||||
Status = ShellOpenFileByName(FileName,
|
Status = ShellOpenFileByName(FileName,
|
||||||
&FileHandle,
|
&FileHandle,
|
||||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
Status = ShellCloseFile(&FileHandle);
|
Status = ShellCloseFile(&FileHandle);
|
||||||
StrCpy(FileName, L"testDir");
|
StrCpy(FileName, L"testDir");
|
||||||
Status = ShellOpenFileByName(FileName,
|
Status = ShellOpenFileByName(FileName,
|
||||||
&FileHandle,
|
&FileHandle,
|
||||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
|
@ -264,18 +264,18 @@ UefiMain (
|
||||||
|
|
||||||
// now delete that file and that directory
|
// now delete that file and that directory
|
||||||
StrCat(FileName, L"\\File.txt");
|
StrCat(FileName, L"\\File.txt");
|
||||||
Status = ShellOpenFileByName(FileName,
|
Status = ShellOpenFileByName(FileName,
|
||||||
&FileHandle,
|
&FileHandle,
|
||||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
Status = ShellDeleteFile(&FileHandle);
|
Status = ShellDeleteFile(&FileHandle);
|
||||||
StrCpy(FileName, L"testDir");
|
StrCpy(FileName, L"testDir");
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
Status = ShellOpenFileByName(FileName,
|
Status = ShellOpenFileByName(FileName,
|
||||||
&FileHandle,
|
&FileHandle,
|
||||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
Status = ShellDeleteFile(&FileHandle);
|
Status = ShellDeleteFile(&FileHandle);
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
/** @file
|
/** @file
|
||||||
This is a test application that demonstrates how to use the sorting functions.
|
This is a test application that demonstrates how to use the sorting functions.
|
||||||
|
|
||||||
Copyright (c) 2009, Intel Corporation
|
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -43,10 +43,10 @@ INTN Test(CONST VOID*b1, CONST VOID*b2)
|
||||||
@retval Other An error occurred.
|
@retval Other An error occurred.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
INTN
|
INTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ShellAppMain (
|
ShellAppMain (
|
||||||
IN UINTN Argc,
|
IN UINTN Argc,
|
||||||
IN CHAR16 **Argv
|
IN CHAR16 **Argv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#/** @file
|
#/** @file
|
||||||
# This is the shell sorting testing application
|
# This is the shell sorting testing application
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009, Intel Corporation.
|
# Copyright (c) 2009-2010, Intel Corporation.All rights reserved. <BR>
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
@ -33,12 +33,12 @@
|
||||||
[Packages]
|
[Packages]
|
||||||
MdePkg/MdePkg.dec
|
MdePkg/MdePkg.dec
|
||||||
ShellPkg/ShellPkg.dec
|
ShellPkg/ShellPkg.dec
|
||||||
|
|
||||||
[LibraryClasses]
|
[LibraryClasses]
|
||||||
ShellCEntryLib
|
ShellCEntryLib
|
||||||
UefiLib
|
UefiLib
|
||||||
SortLib
|
SortLib
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/** @file
|
/** @file
|
||||||
GUID for EFI shell Environment2 Extension
|
GUID for EFI shell Environment2 Extension
|
||||||
|
|
||||||
Copyright (c) 2009, Intel Corporation<BR>
|
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/** @file
|
/** @file
|
||||||
GUID for ShellPkg PCD Token Space.
|
GUID for ShellPkg PCD Token Space.
|
||||||
|
|
||||||
Copyright (c) 2009, Intel Corporation<BR>
|
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/** @file
|
/** @file
|
||||||
Provides interface to EFI_FILE_HANDLE functionality.
|
Provides interface to EFI_FILE_HANDLE functionality.
|
||||||
|
|
||||||
Copyright (c) 2009, Intel Corporation<BR>
|
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
@ -22,13 +22,13 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function will retrieve the information about the file for the handle
|
This function will retrieve the information about the file for the handle
|
||||||
specified and store it in allocated pool memory.
|
specified and store it in allocated pool memory.
|
||||||
|
|
||||||
This function allocates a buffer to store the file's information. It is the
|
This function allocates a buffer to store the file's information. It is the
|
||||||
caller's responsibility to free the buffer.
|
caller's responsibility to free the buffer.
|
||||||
|
|
||||||
@param FileHandle The file handle of the file for which information is
|
@param FileHandle The file handle of the file for which information is
|
||||||
being requested.
|
being requested.
|
||||||
|
|
||||||
@retval NULL information could not be retrieved.
|
@retval NULL information could not be retrieved.
|
||||||
|
@ -42,15 +42,16 @@ FileHandleGetInfo (
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function will set the information about the file for the opened handle
|
This function will set the information about the file for the opened handle
|
||||||
specified.
|
specified.
|
||||||
|
|
||||||
@param FileHandle The file handle of the file for which information
|
@param FileHandle The file handle of the file for which information
|
||||||
is being set.
|
is being set.
|
||||||
|
|
||||||
@param FileInfo The information to set.
|
@param FileInfo The information to set.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The information was set.
|
@retval EFI_SUCCESS The information was set.
|
||||||
|
@retval EFI_INVALID_PARAMETER A Parameter was out of range or invalid.
|
||||||
@retval EFI_UNSUPPORTED The FileHandle does not support FileInfo.
|
@retval EFI_UNSUPPORTED The FileHandle does not support FileInfo.
|
||||||
@retval EFI_NO_MEDIA The device has no medium.
|
@retval EFI_NO_MEDIA The device has no medium.
|
||||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||||
|
@ -69,21 +70,21 @@ FileHandleSetInfo (
|
||||||
/**
|
/**
|
||||||
This function reads information from an opened file.
|
This function reads information from an opened file.
|
||||||
|
|
||||||
If FileHandle is not a directory, the function reads the requested number of
|
If FileHandle is not a directory, the function reads the requested number of
|
||||||
bytes from the file at the file's current position and returns them in Buffer.
|
bytes from the file at the file's current position and returns them in Buffer.
|
||||||
If the read goes beyond the end of the file, the read length is truncated to the
|
If the read goes beyond the end of the file, the read length is truncated to the
|
||||||
end of the file. The file's current position is increased by the number of bytes
|
end of the file. The file's current position is increased by the number of bytes
|
||||||
returned. If FileHandle is a directory, the function reads the directory entry
|
returned. If FileHandle is a directory, the function reads the directory entry
|
||||||
at the file's current position and returns the entry in Buffer. If the Buffer
|
at the file's current position and returns the entry in Buffer. If the Buffer
|
||||||
is not large enough to hold the current directory entry, then
|
is not large enough to hold the current directory entry, then
|
||||||
EFI_BUFFER_TOO_SMALL is returned and the current file position is not updated.
|
EFI_BUFFER_TOO_SMALL is returned and the current file position is not updated.
|
||||||
BufferSize is set to be the size of the buffer needed to read the entry. On
|
BufferSize is set to be the size of the buffer needed to read the entry. On
|
||||||
success, the current position is updated to the next directory entry. If there
|
success, the current position is updated to the next directory entry. If there
|
||||||
are no more directory entries, the read returns a zero-length buffer.
|
are no more directory entries, the read returns a zero-length buffer.
|
||||||
EFI_FILE_INFO is the structure returned as the directory entry.
|
EFI_FILE_INFO is the structure returned as the directory entry.
|
||||||
|
|
||||||
@param FileHandle The opened file handle.
|
@param FileHandle The opened file handle.
|
||||||
@param BufferSize On input the size of buffer in bytes. On return
|
@param BufferSize On input the size of buffer in bytes. On return
|
||||||
the number of bytes written.
|
the number of bytes written.
|
||||||
@param Buffer The buffer to put read data into.
|
@param Buffer The buffer to put read data into.
|
||||||
|
|
||||||
|
@ -91,7 +92,7 @@ FileHandleSetInfo (
|
||||||
@retval EFI_NO_MEDIA The device has no media.
|
@retval EFI_NO_MEDIA The device has no media.
|
||||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||||
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
||||||
@retval EFI_BUFFER_TO_SMALL Buffer is too small. ReadSize contains required
|
@retval EFI_BUFFER_TO_SMALL Buffer is too small. ReadSize contains required
|
||||||
size.
|
size.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -106,11 +107,11 @@ FileHandleRead(
|
||||||
/**
|
/**
|
||||||
Write data to a file.
|
Write data to a file.
|
||||||
|
|
||||||
This function writes the specified number of bytes to the file at the current
|
This function writes the specified number of bytes to the file at the current
|
||||||
file position. The current file position is advanced the actual number of bytes
|
file position. The current file position is advanced the actual number of bytes
|
||||||
written, which is returned in BufferSize. Partial writes only occur when there
|
written, which is returned in BufferSize. Partial writes only occur when there
|
||||||
has been a data error during the write attempt (such as "volume space full").
|
has been a data error during the write attempt (such as "volume space full").
|
||||||
The file is automatically grown to hold the data if required. Direct writes to
|
The file is automatically grown to hold the data if required. Direct writes to
|
||||||
opened directories are not supported.
|
opened directories are not supported.
|
||||||
|
|
||||||
@param FileHandle The opened file for writing
|
@param FileHandle The opened file for writing
|
||||||
|
@ -135,11 +136,11 @@ FileHandleWrite(
|
||||||
IN VOID *Buffer
|
IN VOID *Buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Close an open file handle.
|
Close an open file handle.
|
||||||
|
|
||||||
This function closes a specified file handle. All "dirty" cached file data is
|
This function closes a specified file handle. All "dirty" cached file data is
|
||||||
flushed to the device, and the file is closed. In all cases the handle is
|
flushed to the device, and the file is closed. In all cases the handle is
|
||||||
closed.
|
closed.
|
||||||
|
|
||||||
@param FileHandle The file handle to close.
|
@param FileHandle The file handle to close.
|
||||||
|
@ -156,13 +157,13 @@ FileHandleClose (
|
||||||
Delete a file and close the handle.
|
Delete a file and close the handle.
|
||||||
|
|
||||||
This function closes and deletes a file. In all cases the file handle is closed.
|
This function closes and deletes a file. In all cases the file handle is closed.
|
||||||
If the file cannot be deleted, the warning code EFI_WARN_DELETE_FAILURE is
|
If the file cannot be deleted, the warning code EFI_WARN_DELETE_FAILURE is
|
||||||
returned, but the handle is still closed.
|
returned, but the handle is still closed.
|
||||||
|
|
||||||
@param FileHandle The file handle to delete.
|
@param FileHandle The file handle to delete.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The file was closed sucessfully.
|
@retval EFI_SUCCESS The file was closed sucessfully.
|
||||||
@retval EFI_WARN_DELETE_FAILURE the handle was closed, but the file was not
|
@retval EFI_WARN_DELETE_FAILURE the handle was closed, but the file was not
|
||||||
deleted
|
deleted
|
||||||
@retval INVALID_PARAMETER One of the parameters has an invalid value.
|
@retval INVALID_PARAMETER One of the parameters has an invalid value.
|
||||||
**/
|
**/
|
||||||
|
@ -175,19 +176,19 @@ FileHandleDelete (
|
||||||
/**
|
/**
|
||||||
Set the current position in a file.
|
Set the current position in a file.
|
||||||
|
|
||||||
This function sets the current file position for the handle to the position
|
This function sets the current file position for the handle to the position
|
||||||
supplied. With the exception of seeking to position 0xFFFFFFFFFFFFFFFF, only
|
supplied. With the exception of seeking to position 0xFFFFFFFFFFFFFFFF, only
|
||||||
absolute positioning is supported, and seeking past the end of the file is
|
absolute positioning is supported, and seeking past the end of the file is
|
||||||
allowed (a subsequent write would grow the file). Seeking to position
|
allowed (a subsequent write would grow the file). Seeking to position
|
||||||
0xFFFFFFFFFFFFFFFF causes the current position to be set to the end of the file.
|
0xFFFFFFFFFFFFFFFF causes the current position to be set to the end of the file.
|
||||||
If FileHandle is a directory, the only position that may be set is zero. This
|
If FileHandle is a directory, the only position that may be set is zero. This
|
||||||
has the effect of starting the read process of the directory entries over.
|
has the effect of starting the read process of the directory entries over.
|
||||||
|
|
||||||
@param FileHandle The file handle on which the position is being set
|
@param FileHandle The file handle on which the position is being set
|
||||||
@param Position Byte position from begining of file
|
@param Position Byte position from begining of file
|
||||||
|
|
||||||
@retval EFI_SUCCESS Operation completed sucessfully.
|
@retval EFI_SUCCESS Operation completed sucessfully.
|
||||||
@retval EFI_UNSUPPORTED the seek request for non-zero is not valid on
|
@retval EFI_UNSUPPORTED the seek request for non-zero is not valid on
|
||||||
directories.
|
directories.
|
||||||
@retval INVALID_PARAMETER One of the parameters has an invalid value.
|
@retval INVALID_PARAMETER One of the parameters has an invalid value.
|
||||||
**/
|
**/
|
||||||
|
@ -198,11 +199,11 @@ FileHandleSetPosition (
|
||||||
IN UINT64 Position
|
IN UINT64 Position
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Gets a file's current position.
|
Gets a file's current position.
|
||||||
|
|
||||||
This function retrieves the current file position for the file handle. For
|
This function retrieves the current file position for the file handle. For
|
||||||
directories, the current file position has no meaning outside of the file
|
directories, the current file position has no meaning outside of the file
|
||||||
system driver and as such the operation is not supported. An error is returned
|
system driver and as such the operation is not supported. An error is returned
|
||||||
if FileHandle is a directory.
|
if FileHandle is a directory.
|
||||||
|
|
||||||
|
@ -221,7 +222,7 @@ FileHandleGetPosition (
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
Flushes data on a file.
|
Flushes data on a file.
|
||||||
|
|
||||||
This function flushes all modified data associated with a file to a device.
|
This function flushes all modified data associated with a file to a device.
|
||||||
|
|
||||||
@param FileHandle The file handle on which to flush data.
|
@param FileHandle The file handle on which to flush data.
|
||||||
|
@ -262,8 +263,8 @@ FileHandleIsDirectory (
|
||||||
/**
|
/**
|
||||||
Retrieves the first file from a directory.
|
Retrieves the first file from a directory.
|
||||||
|
|
||||||
This function opens a directory and gets the first file's info in the
|
This function opens a directory and gets the first file's info in the
|
||||||
directory. Caller can use FileHandleFindNextFile() to get other files. When
|
directory. Caller can use FileHandleFindNextFile() to get other files. When
|
||||||
complete the caller is responsible for calling FreePool() on *Buffer.
|
complete the caller is responsible for calling FreePool() on *Buffer.
|
||||||
|
|
||||||
@param DirHandle The file handle of the directory to search
|
@param DirHandle The file handle of the directory to search
|
||||||
|
@ -286,12 +287,12 @@ FileHandleFindFirstFile (
|
||||||
/**
|
/**
|
||||||
Retrieves the next file in a directory.
|
Retrieves the next file in a directory.
|
||||||
|
|
||||||
To use this function, caller must call the FileHandleFindFirstFile() to get the
|
To use this function, caller must call the FileHandleFindFirstFile() to get the
|
||||||
first file, and then use this function get other files. This function can be
|
first file, and then use this function get other files. This function can be
|
||||||
called for several times to get each file's information in the directory. If
|
called for several times to get each file's information in the directory. If
|
||||||
the call of FileHandleFindNextFile() got the last file in the directory, the next
|
the call of FileHandleFindNextFile() got the last file in the directory, the next
|
||||||
call of this function has no file to get. *NoFile will be set to TRUE and the
|
call of this function has no file to get. *NoFile will be set to TRUE and the
|
||||||
Buffer memory will be automatically freed.
|
Buffer memory will be automatically freed.
|
||||||
|
|
||||||
@param DirHandle the file handle of the directory
|
@param DirHandle the file handle of the directory
|
||||||
@param Buffer pointer to buffer for file's information
|
@param Buffer pointer to buffer for file's information
|
||||||
|
@ -316,7 +317,7 @@ FileHandleFindNextFile(
|
||||||
If FileHandle is NULL then ASSERT()
|
If FileHandle is NULL then ASSERT()
|
||||||
If Size is NULL then ASSERT()
|
If Size is NULL then ASSERT()
|
||||||
|
|
||||||
This function extracts the file size info from the FileHandle's EFI_FILE_INFO
|
This function extracts the file size info from the FileHandle's EFI_FILE_INFO
|
||||||
data.
|
data.
|
||||||
|
|
||||||
@param FileHandle The file handle from which size is retrieved.
|
@param FileHandle The file handle from which size is retrieved.
|
||||||
|
@ -333,11 +334,11 @@ FileHandleGetSize (
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Function to get a full filename given a EFI_FILE_HANDLE somewhere lower on the
|
Function to get a full filename given a EFI_FILE_HANDLE somewhere lower on the
|
||||||
directory 'stack'.
|
directory 'stack'.
|
||||||
|
|
||||||
@param[in] Handle Handle to the Directory or File to create path to.
|
@param[in] Handle Handle to the Directory or File to create path to.
|
||||||
@param[out] FullFileName Pointer to pointer to generated full file name. It
|
@param[out] FullFileName Pointer to pointer to generated full file name. It
|
||||||
is the responsibility of the caller to free this memory
|
is the responsibility of the caller to free this memory
|
||||||
with a call to FreePool().
|
with a call to FreePool().
|
||||||
@retval EFI_SUCCESS the operation was sucessful and the FullFileName is valid.
|
@retval EFI_SUCCESS the operation was sucessful and the FullFileName is valid.
|
||||||
|
@ -355,23 +356,23 @@ FileHandleGetFileName (
|
||||||
/**
|
/**
|
||||||
Function to read a single line (up to but not including the \n) from a file.
|
Function to read a single line (up to but not including the \n) from a file.
|
||||||
|
|
||||||
If the position upon start is 0, then the Ascii Boolean will be set. This should be
|
If the position upon start is 0, then the Ascii Boolean will be set. This should be
|
||||||
maintained and not changed for all operations with the same file.
|
maintained and not changed for all operations with the same file.
|
||||||
|
|
||||||
@param[in] Handle FileHandle to read from
|
@param[in] Handle FileHandle to read from
|
||||||
@param[in,out] Buffer pointer to buffer to read into
|
@param[in,out] Buffer pointer to buffer to read into
|
||||||
@param[in,out] Size pointer to number of bytes in buffer
|
@param[in,out] Size pointer to number of bytes in buffer
|
||||||
@param[in] Truncate if TRUE then allows for truncation of the line to fit.
|
@param[in] Truncate if TRUE then allows for truncation of the line to fit.
|
||||||
if FALSE will reset the position to the begining of the
|
if FALSE will reset the position to the begining of the
|
||||||
line if the buffer is not large enough.
|
line if the buffer is not large enough.
|
||||||
@param[in,out] Ascii Boolean value for indicating whether the file is
|
@param[in,out] Ascii Boolean value for indicating whether the file is
|
||||||
Ascii (TRUE) or UCS2 (FALSE);
|
Ascii (TRUE) or UCS2 (FALSE);
|
||||||
|
|
||||||
@retval EFI_SUCCESS the operation was sucessful. the line is stored in
|
@retval EFI_SUCCESS the operation was sucessful. the line is stored in
|
||||||
Buffer.
|
Buffer.
|
||||||
@retval EFI_INVALID_PARAMETER Handle was NULL.
|
@retval EFI_INVALID_PARAMETER Handle was NULL.
|
||||||
@retval EFI_INVALID_PARAMETER Size was NULL.
|
@retval EFI_INVALID_PARAMETER Size was NULL.
|
||||||
@retval EFI_BUFFER_TOO_SMALL Size was not enough space to store the line.
|
@retval EFI_BUFFER_TOO_SMALL Size was not enough space to store the line.
|
||||||
Size was updated to minimum space required.
|
Size was updated to minimum space required.
|
||||||
@sa FileHandleRead
|
@sa FileHandleRead
|
||||||
**/
|
**/
|
||||||
|
@ -386,10 +387,10 @@ FileHandleReadLine(
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Function to read a single line from a file. The \n is not included in the returned
|
Function to read a single line from a file. The \n is not included in the returned
|
||||||
buffer. The returned buffer must be callee freed.
|
buffer. The returned buffer must be callee freed.
|
||||||
|
|
||||||
If the position upon start is 0, then the Ascii Boolean will be set. This should be
|
If the position upon start is 0, then the Ascii Boolean will be set. This should be
|
||||||
maintained and not changed for all operations with the same file.
|
maintained and not changed for all operations with the same file.
|
||||||
|
|
||||||
@param[in] Handle FileHandle to read from.
|
@param[in] Handle FileHandle to read from.
|
||||||
|
@ -412,7 +413,7 @@ FileHandleReturnLine(
|
||||||
If Handle is NULL, ASSERT.
|
If Handle is NULL, ASSERT.
|
||||||
|
|
||||||
@param[in] Handle FileHandle to write to
|
@param[in] Handle FileHandle to write to
|
||||||
@param[in] Buffer Buffer to write, if NULL the function will
|
@param[in] Buffer Buffer to write, if NULL the function will
|
||||||
take no action and return EFI_SUCCESS.
|
take no action and return EFI_SUCCESS.
|
||||||
|
|
||||||
@retval EFI_SUCCESS the data was written.
|
@retval EFI_SUCCESS the data was written.
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
/** @file
|
/** @file
|
||||||
Provides application point extension for "C" style main funciton
|
Provides application point extension for "C" style main funciton
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation<BR>
|
Copyright (c) 2006-2010, Intel Corporation. All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
INTN
|
INTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ShellAppMain (
|
ShellAppMain (
|
||||||
IN UINTN Argc,
|
IN UINTN Argc,
|
||||||
IN CHAR16 **Argv
|
IN CHAR16 **Argv
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/** @file
|
/** @file
|
||||||
Provides interface to shell functionality for shell commands and applications.
|
Provides interface to shell functionality for shell commands and applications.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2010, Intel Corporation<BR>
|
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
@ -25,13 +25,13 @@
|
||||||
#include <Protocol/EfiShellParameters.h>
|
#include <Protocol/EfiShellParameters.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function will retrieve the information about the file for the handle
|
This function will retrieve the information about the file for the handle
|
||||||
specified and store it in allocated pool memory.
|
specified and store it in allocated pool memory.
|
||||||
|
|
||||||
This function allocates a buffer to store the file's information. It is the
|
This function allocates a buffer to store the file's information. It is the
|
||||||
caller's responsibility to free the buffer.
|
caller's responsibility to free the buffer.
|
||||||
|
|
||||||
@param[in] FileHandle The file handle of the file for which information is
|
@param[in] FileHandle The file handle of the file for which information is
|
||||||
being requested.
|
being requested.
|
||||||
|
|
||||||
@retval NULL Information could not be retrieved.
|
@retval NULL Information could not be retrieved.
|
||||||
|
@ -45,10 +45,10 @@ ShellGetFileInfo (
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function will set the information about the file for the opened handle
|
This function will set the information about the file for the opened handle
|
||||||
specified.
|
specified.
|
||||||
|
|
||||||
@param[in] FileHandle The file handle of the file for which information
|
@param[in] FileHandle The file handle of the file for which information
|
||||||
is being set.
|
is being set.
|
||||||
|
|
||||||
@param[in] FileInfo The infotmation to set.
|
@param[in] FileInfo The infotmation to set.
|
||||||
|
@ -72,10 +72,10 @@ ShellSetFileInfo (
|
||||||
/**
|
/**
|
||||||
This function will open a file or directory referenced by DevicePath.
|
This function will open a file or directory referenced by DevicePath.
|
||||||
|
|
||||||
This function opens a file with the open mode according to the file path. The
|
This function opens a file with the open mode according to the file path. The
|
||||||
Attributes is valid only for EFI_FILE_MODE_CREATE.
|
Attributes is valid only for EFI_FILE_MODE_CREATE.
|
||||||
|
|
||||||
@param[in] FilePath On input the device path to the file. On output
|
@param[in] FilePath On input the device path to the file. On output
|
||||||
the remaining device path.
|
the remaining device path.
|
||||||
@param[out] DeviceHandle Pointer to the system device handle.
|
@param[out] DeviceHandle Pointer to the system device handle.
|
||||||
@param[out] FileHandle Pointer to the file handle.
|
@param[out] FileHandle Pointer to the file handle.
|
||||||
|
@ -84,18 +84,18 @@ ShellSetFileInfo (
|
||||||
|
|
||||||
@retval EFI_SUCCESS The information was set.
|
@retval EFI_SUCCESS The information was set.
|
||||||
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
||||||
@retval EFI_UNSUPPORTED Could not open the file path.
|
@retval EFI_UNSUPPORTED Could not open the file path.
|
||||||
@retval EFI_NOT_FOUND The specified file could not be found on the
|
@retval EFI_NOT_FOUND The specified file could not be found on the
|
||||||
device or the file system could not be found on
|
device or the file system could not be found on
|
||||||
the device.
|
the device.
|
||||||
@retval EFI_NO_MEDIA The device has no medium.
|
@retval EFI_NO_MEDIA The device has no medium.
|
||||||
@retval EFI_MEDIA_CHANGED The device has a different medium in it or the
|
@retval EFI_MEDIA_CHANGED The device has a different medium in it or the
|
||||||
medium is no longer supported.
|
medium is no longer supported.
|
||||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||||
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
||||||
@retval EFI_WRITE_PROTECTED The file or medium is write protected.
|
@retval EFI_WRITE_PROTECTED The file or medium is write protected.
|
||||||
@retval EFI_ACCESS_DENIED The file was opened read only.
|
@retval EFI_ACCESS_DENIED The file was opened read only.
|
||||||
@retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the
|
@retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the
|
||||||
file.
|
file.
|
||||||
@retval EFI_VOLUME_FULL The volume is full.
|
@retval EFI_VOLUME_FULL The volume is full.
|
||||||
**/
|
**/
|
||||||
|
@ -112,8 +112,8 @@ ShellOpenFileByDevicePath(
|
||||||
/**
|
/**
|
||||||
This function will open a file or directory referenced by filename.
|
This function will open a file or directory referenced by filename.
|
||||||
|
|
||||||
If return is EFI_SUCCESS, the Filehandle is the opened file's handle;
|
If return is EFI_SUCCESS, the Filehandle is the opened file's handle;
|
||||||
otherwise, the Filehandle is NULL. The Attributes is valid only for
|
otherwise, the Filehandle is NULL. The Attributes is valid only for
|
||||||
EFI_FILE_MODE_CREATE.
|
EFI_FILE_MODE_CREATE.
|
||||||
|
|
||||||
@param[in] FileName Pointer to file name.
|
@param[in] FileName Pointer to file name.
|
||||||
|
@ -123,18 +123,18 @@ ShellOpenFileByDevicePath(
|
||||||
|
|
||||||
@retval EFI_SUCCESS The information was set.
|
@retval EFI_SUCCESS The information was set.
|
||||||
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
||||||
@retval EFI_UNSUPPORTED Could not open the file path.
|
@retval EFI_UNSUPPORTED Could not open the file path.
|
||||||
@retval EFI_NOT_FOUND The specified file could not be found on the
|
@retval EFI_NOT_FOUND The specified file could not be found on the
|
||||||
device or the file system could not be found
|
device or the file system could not be found
|
||||||
on the device.
|
on the device.
|
||||||
@retval EFI_NO_MEDIA The device has no medium.
|
@retval EFI_NO_MEDIA The device has no medium.
|
||||||
@retval EFI_MEDIA_CHANGED The device has a different medium in it or the
|
@retval EFI_MEDIA_CHANGED The device has a different medium in it or the
|
||||||
medium is no longer supported.
|
medium is no longer supported.
|
||||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||||
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
||||||
@retval EFI_WRITE_PROTECTED The file or medium is write protected.
|
@retval EFI_WRITE_PROTECTED The file or medium is write protected.
|
||||||
@retval EFI_ACCESS_DENIED The file was opened read only.
|
@retval EFI_ACCESS_DENIED The file was opened read only.
|
||||||
@retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the
|
@retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the
|
||||||
file.
|
file.
|
||||||
@retval EFI_VOLUME_FULL The volume is full.
|
@retval EFI_VOLUME_FULL The volume is full.
|
||||||
**/
|
**/
|
||||||
|
@ -150,8 +150,8 @@ ShellOpenFileByName(
|
||||||
/**
|
/**
|
||||||
This function creates a directory.
|
This function creates a directory.
|
||||||
|
|
||||||
If return is EFI_SUCCESS, the Filehandle is the opened directory's handle;
|
If return is EFI_SUCCESS, the Filehandle is the opened directory's handle;
|
||||||
otherwise, the Filehandle is NULL. If the directory already existed, this
|
otherwise, the Filehandle is NULL. If the directory already existed, this
|
||||||
function opens the existing directory.
|
function opens the existing directory.
|
||||||
|
|
||||||
@param[in] DirectoryName Pointer to Directory name.
|
@param[in] DirectoryName Pointer to Directory name.
|
||||||
|
@ -159,18 +159,18 @@ ShellOpenFileByName(
|
||||||
|
|
||||||
@retval EFI_SUCCESS The information was set.
|
@retval EFI_SUCCESS The information was set.
|
||||||
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
||||||
@retval EFI_UNSUPPORTED Could not open the file path.
|
@retval EFI_UNSUPPORTED Could not open the file path.
|
||||||
@retval EFI_NOT_FOUND The specified file could not be found on the
|
@retval EFI_NOT_FOUND The specified file could not be found on the
|
||||||
device or the file system could not be found
|
device or the file system could not be found
|
||||||
on the device.
|
on the device.
|
||||||
@retval EFI_NO_MEDIA The device has no medium.
|
@retval EFI_NO_MEDIA The device has no medium.
|
||||||
@retval EFI_MEDIA_CHANGED The device has a different medium in it or the
|
@retval EFI_MEDIA_CHANGED The device has a different medium in it or the
|
||||||
medium is no longer supported.
|
medium is no longer supported.
|
||||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||||
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
||||||
@retval EFI_WRITE_PROTECTED The file or medium is write protected.
|
@retval EFI_WRITE_PROTECTED The file or medium is write protected.
|
||||||
@retval EFI_ACCESS_DENIED The file was opened read only.
|
@retval EFI_ACCESS_DENIED The file was opened read only.
|
||||||
@retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the
|
@retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the
|
||||||
file.
|
file.
|
||||||
@retval EFI_VOLUME_FULL The volume is full.
|
@retval EFI_VOLUME_FULL The volume is full.
|
||||||
**/
|
**/
|
||||||
|
@ -184,21 +184,21 @@ ShellCreateDirectory(
|
||||||
/**
|
/**
|
||||||
This function reads information from an opened file.
|
This function reads information from an opened file.
|
||||||
|
|
||||||
If FileHandle is not a directory, the function reads the requested number of
|
If FileHandle is not a directory, the function reads the requested number of
|
||||||
bytes from the file at the file's current position and returns them in Buffer.
|
bytes from the file at the file's current position and returns them in Buffer.
|
||||||
If the read goes beyond the end of the file, the read length is truncated to the
|
If the read goes beyond the end of the file, the read length is truncated to the
|
||||||
end of the file. The file's current position is increased by the number of bytes
|
end of the file. The file's current position is increased by the number of bytes
|
||||||
returned. If FileHandle is a directory, the function reads the directory entry
|
returned. If FileHandle is a directory, the function reads the directory entry
|
||||||
at the file's current position and returns the entry in Buffer. If the Buffer
|
at the file's current position and returns the entry in Buffer. If the Buffer
|
||||||
is not large enough to hold the current directory entry, then
|
is not large enough to hold the current directory entry, then
|
||||||
EFI_BUFFER_TOO_SMALL is returned and the current file position is not updated.
|
EFI_BUFFER_TOO_SMALL is returned and the current file position is not updated.
|
||||||
BufferSize is set to be the size of the buffer needed to read the entry. On
|
BufferSize is set to be the size of the buffer needed to read the entry. On
|
||||||
success, the current position is updated to the next directory entry. If there
|
success, the current position is updated to the next directory entry. If there
|
||||||
are no more directory entries, the read returns a zero-length buffer.
|
are no more directory entries, the read returns a zero-length buffer.
|
||||||
EFI_FILE_INFO is the structure returned as the directory entry.
|
EFI_FILE_INFO is the structure returned as the directory entry.
|
||||||
|
|
||||||
@param[in] FileHandle The opened file handle.
|
@param[in] FileHandle The opened file handle.
|
||||||
@param[in] ReadSize On input the size of buffer in bytes. On return
|
@param[in] ReadSize On input the size of buffer in bytes. On return
|
||||||
the number of bytes written.
|
the number of bytes written.
|
||||||
@param[out] Buffer The buffer to put read data into.
|
@param[out] Buffer The buffer to put read data into.
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ ShellCreateDirectory(
|
||||||
@retval EFI_NO_MEDIA The device has no media.
|
@retval EFI_NO_MEDIA The device has no media.
|
||||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||||
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
||||||
@retval EFI_BUFFER_TO_SMALL Buffer is too small. ReadSize contains required
|
@retval EFI_BUFFER_TO_SMALL Buffer is too small. ReadSize contains required
|
||||||
size.
|
size.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -221,11 +221,11 @@ ShellReadFile(
|
||||||
/**
|
/**
|
||||||
Write data to a file.
|
Write data to a file.
|
||||||
|
|
||||||
This function writes the specified number of bytes to the file at the current
|
This function writes the specified number of bytes to the file at the current
|
||||||
file position. The current file position is advanced the actual number of bytes
|
file position. The current file position is advanced the actual number of bytes
|
||||||
written, which is returned in BufferSize. Partial writes only occur when there
|
written, which is returned in BufferSize. Partial writes only occur when there
|
||||||
has been a data error during the write attempt (such as "volume space full").
|
has been a data error during the write attempt (such as "volume space full").
|
||||||
The file is automatically grown to hold the data if required. Direct writes to
|
The file is automatically grown to hold the data if required. Direct writes to
|
||||||
opened directories are not supported.
|
opened directories are not supported.
|
||||||
|
|
||||||
@param[in] FileHandle The opened file for writing.
|
@param[in] FileHandle The opened file for writing.
|
||||||
|
@ -252,11 +252,11 @@ ShellWriteFile(
|
||||||
IN VOID *Buffer
|
IN VOID *Buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Close an open file handle.
|
Close an open file handle.
|
||||||
|
|
||||||
This function closes a specified file handle. All "dirty" cached file data is
|
This function closes a specified file handle. All "dirty" cached file data is
|
||||||
flushed to the device, and the file is closed. In all cases the handle is
|
flushed to the device, and the file is closed. In all cases the handle is
|
||||||
closed.
|
closed.
|
||||||
|
|
||||||
@param[in] FileHandle The file handle to close.
|
@param[in] FileHandle The file handle to close.
|
||||||
|
@ -274,13 +274,13 @@ ShellCloseFile (
|
||||||
Delete a file and close the handle
|
Delete a file and close the handle
|
||||||
|
|
||||||
This function closes and deletes a file. In all cases the file handle is closed.
|
This function closes and deletes a file. In all cases the file handle is closed.
|
||||||
If the file cannot be deleted, the warning code EFI_WARN_DELETE_FAILURE is
|
If the file cannot be deleted, the warning code EFI_WARN_DELETE_FAILURE is
|
||||||
returned, but the handle is still closed.
|
returned, but the handle is still closed.
|
||||||
|
|
||||||
@param[in] FileHandle The file handle to delete.
|
@param[in] FileHandle The file handle to delete.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The file was closed sucessfully.
|
@retval EFI_SUCCESS The file was closed sucessfully.
|
||||||
@retval EFI_WARN_DELETE_FAILURE The handle was closed, but the file was not
|
@retval EFI_WARN_DELETE_FAILURE The handle was closed, but the file was not
|
||||||
deleted.
|
deleted.
|
||||||
@retval INVALID_PARAMETER One of the parameters has an invalid value.
|
@retval INVALID_PARAMETER One of the parameters has an invalid value.
|
||||||
**/
|
**/
|
||||||
|
@ -293,12 +293,12 @@ ShellDeleteFile (
|
||||||
/**
|
/**
|
||||||
Set the current position in a file.
|
Set the current position in a file.
|
||||||
|
|
||||||
This function sets the current file position for the handle to the position
|
This function sets the current file position for the handle to the position
|
||||||
supplied. With the exception of seeking to position 0xFFFFFFFFFFFFFFFF, only
|
supplied. With the exception of seeking to position 0xFFFFFFFFFFFFFFFF, only
|
||||||
absolute positioning is supported, and seeking past the end of the file is
|
absolute positioning is supported, and seeking past the end of the file is
|
||||||
allowed (a subsequent write would grow the file). Seeking to position
|
allowed (a subsequent write would grow the file). Seeking to position
|
||||||
0xFFFFFFFFFFFFFFFF causes the current position to be set to the end of the file.
|
0xFFFFFFFFFFFFFFFF causes the current position to be set to the end of the file.
|
||||||
If FileHandle is a directory, the only position that may be set is zero. This
|
If FileHandle is a directory, the only position that may be set is zero. This
|
||||||
has the effect of starting the read process of the directory entries over.
|
has the effect of starting the read process of the directory entries over.
|
||||||
|
|
||||||
@param[in] FileHandle The file handle on which the position is being set.
|
@param[in] FileHandle The file handle on which the position is being set.
|
||||||
|
@ -306,7 +306,7 @@ ShellDeleteFile (
|
||||||
@param[in] Position Byte position from begining of file.
|
@param[in] Position Byte position from begining of file.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Operation completed sucessfully.
|
@retval EFI_SUCCESS Operation completed sucessfully.
|
||||||
@retval EFI_UNSUPPORTED The seek request for non-zero is not valid on
|
@retval EFI_UNSUPPORTED The seek request for non-zero is not valid on
|
||||||
directories.
|
directories.
|
||||||
@retval INVALID_PARAMETER One of the parameters has an invalid value.
|
@retval INVALID_PARAMETER One of the parameters has an invalid value.
|
||||||
**/
|
**/
|
||||||
|
@ -317,11 +317,11 @@ ShellSetFilePosition (
|
||||||
IN UINT64 Position
|
IN UINT64 Position
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Gets a file's current position
|
Gets a file's current position
|
||||||
|
|
||||||
This function retrieves the current file position for the file handle. For
|
This function retrieves the current file position for the file handle. For
|
||||||
directories, the current file position has no meaning outside of the file
|
directories, the current file position has no meaning outside of the file
|
||||||
system driver and as such the operation is not supported. An error is returned
|
system driver and as such the operation is not supported. An error is returned
|
||||||
if FileHandle is a directory.
|
if FileHandle is a directory.
|
||||||
|
|
||||||
|
@ -341,7 +341,7 @@ ShellGetFilePosition (
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Flushes data on a file
|
Flushes data on a file
|
||||||
|
|
||||||
This function flushes all modified data associated with a file to a device.
|
This function flushes all modified data associated with a file to a device.
|
||||||
|
|
||||||
@param[in] FileHandle The file handle on which to flush data.
|
@param[in] FileHandle The file handle on which to flush data.
|
||||||
|
@ -362,8 +362,8 @@ ShellFlushFile (
|
||||||
/**
|
/**
|
||||||
Retrieves the first file from a directory
|
Retrieves the first file from a directory
|
||||||
|
|
||||||
This function takes an open directory handle and gets the first file
|
This function takes an open directory handle and gets the first file
|
||||||
in the directory's info. Caller can use ShellFindNextFile() to get
|
in the directory's info. Caller can use ShellFindNextFile() to get
|
||||||
subsequent files.
|
subsequent files.
|
||||||
|
|
||||||
Caller must use FreePool on *Buffer opon completion of all file searching.
|
Caller must use FreePool on *Buffer opon completion of all file searching.
|
||||||
|
@ -388,12 +388,12 @@ ShellFindFirstFile (
|
||||||
/**
|
/**
|
||||||
Retrieves the next file in a directory.
|
Retrieves the next file in a directory.
|
||||||
|
|
||||||
To use this function, caller must call the ShellFindFirstFile() to get the
|
To use this function, caller must call the ShellFindFirstFile() to get the
|
||||||
first file, and then use this function get other files. This function can be
|
first file, and then use this function get other files. This function can be
|
||||||
called for several times to get each file's information in the directory. If
|
called for several times to get each file's information in the directory. If
|
||||||
the call of ShellFindNextFile() got the last file in the directory, the next
|
the call of ShellFindNextFile() got the last file in the directory, the next
|
||||||
call of this function has no file to get. *NoFile will be set to TRUE and the
|
call of this function has no file to get. *NoFile will be set to TRUE and the
|
||||||
data in Buffer is meaningless.
|
data in Buffer is meaningless.
|
||||||
|
|
||||||
@param[in] DirHandle The file handle of the directory.
|
@param[in] DirHandle The file handle of the directory.
|
||||||
@param[out] Buffer Pointer to buffer for file's information.
|
@param[out] Buffer Pointer to buffer for file's information.
|
||||||
|
@ -415,7 +415,7 @@ ShellFindNextFile(
|
||||||
/**
|
/**
|
||||||
Retrieve the size of a file.
|
Retrieve the size of a file.
|
||||||
|
|
||||||
This function extracts the file size info from the FileHandle's EFI_FILE_INFO
|
This function extracts the file size info from the FileHandle's EFI_FILE_INFO
|
||||||
data.
|
data.
|
||||||
|
|
||||||
@param[in] FileHandle The file handle from which size is retrieved.
|
@param[in] FileHandle The file handle from which size is retrieved.
|
||||||
|
@ -448,7 +448,7 @@ ShellGetExecutionBreakFlag(
|
||||||
/**
|
/**
|
||||||
Return the value of an environment variable.
|
Return the value of an environment variable.
|
||||||
|
|
||||||
This function gets the value of the environment variable set by the
|
This function gets the value of the environment variable set by the
|
||||||
ShellSetEnvironmentVariable function.
|
ShellSetEnvironmentVariable function.
|
||||||
|
|
||||||
@param[in] EnvKey The key name of the environment variable.
|
@param[in] EnvKey The key name of the environment variable.
|
||||||
|
@ -506,7 +506,7 @@ ShellSetEnvironmentVariable (
|
||||||
Output is only supported for pre-UEFI Shell 2.0
|
Output is only supported for pre-UEFI Shell 2.0
|
||||||
|
|
||||||
@param[in] ImageHandle Parent image that is starting the operation.
|
@param[in] ImageHandle Parent image that is starting the operation.
|
||||||
@param[in] CommandLine Pointer to null terminated command line.
|
@param[in] CommandLine Pointer to NULL terminated command line.
|
||||||
@param[in] Output True to display debug output. False to hide it.
|
@param[in] Output True to display debug output. False to hide it.
|
||||||
@param[in] EnvironmentVariables Optional pointer to array of environment variables
|
@param[in] EnvironmentVariables Optional pointer to array of environment variables
|
||||||
in the form "x=y". If NULL current set is used.
|
in the form "x=y". If NULL current set is used.
|
||||||
|
@ -531,8 +531,8 @@ ShellExecute (
|
||||||
/**
|
/**
|
||||||
Retreives the current directory path.
|
Retreives the current directory path.
|
||||||
|
|
||||||
If the DeviceName is NULL, it returns the current device's current directory
|
If the DeviceName is NULL, it returns the current device's current directory
|
||||||
name. If the DeviceName is not NULL, it returns the current directory name
|
name. If the DeviceName is not NULL, it returns the current directory name
|
||||||
on specified drive.
|
on specified drive.
|
||||||
|
|
||||||
@param[in] DeviceName The name of the file system to get directory on.
|
@param[in] DeviceName The name of the file system to get directory on.
|
||||||
|
@ -549,12 +549,12 @@ ShellGetCurrentDir (
|
||||||
/**
|
/**
|
||||||
Sets (enabled or disabled) the page break mode.
|
Sets (enabled or disabled) the page break mode.
|
||||||
|
|
||||||
When page break mode is enabled the screen will stop scrolling
|
When page break mode is enabled the screen will stop scrolling
|
||||||
and wait for operator input before scrolling a subsequent screen.
|
and wait for operator input before scrolling a subsequent screen.
|
||||||
|
|
||||||
@param[in] CurrentState TRUE to enable and FALSE to disable.
|
@param[in] CurrentState TRUE to enable and FALSE to disable.
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
EFIAPI
|
EFIAPI
|
||||||
ShellSetPageBreakMode (
|
ShellSetPageBreakMode (
|
||||||
IN BOOLEAN CurrentState
|
IN BOOLEAN CurrentState
|
||||||
|
@ -563,21 +563,21 @@ ShellSetPageBreakMode (
|
||||||
/**
|
/**
|
||||||
Opens a group of files based on a path.
|
Opens a group of files based on a path.
|
||||||
|
|
||||||
This function uses the Arg to open all the matching files. Each matched
|
This function uses the Arg to open all the matching files. Each matched
|
||||||
file has a SHELL_FILE_ARG structure to record the file information. These
|
file has a SHELL_FILE_ARG structure to record the file information. These
|
||||||
structures are placed on the list ListHead. Users can get the SHELL_FILE_ARG
|
structures are placed on the list ListHead. Users can get the SHELL_FILE_ARG
|
||||||
structures from ListHead to access each file. This function supports wildcards
|
structures from ListHead to access each file. This function supports wildcards
|
||||||
and will process '?' and '*' as such. The list must be freed with a call to
|
and will process '?' and '*' as such. The list must be freed with a call to
|
||||||
ShellCloseFileMetaArg().
|
ShellCloseFileMetaArg().
|
||||||
|
|
||||||
If you are NOT appending to an existing list *ListHead must be NULL. If
|
If you are NOT appending to an existing list *ListHead must be NULL. If
|
||||||
*ListHead is NULL then it must be callee freed.
|
*ListHead is NULL then it must be callee freed.
|
||||||
|
|
||||||
@param[in] Arg Pointer to path string.
|
@param[in] Arg Pointer to path string.
|
||||||
@param[in] OpenMode Mode to open files with.
|
@param[in] OpenMode Mode to open files with.
|
||||||
@param[in] ListHead Head of linked list of results.
|
@param[in] ListHead Head of linked list of results.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The operation was sucessful and the list head
|
@retval EFI_SUCCESS The operation was sucessful and the list head
|
||||||
contains the list of opened files.
|
contains the list of opened files.
|
||||||
@retval != EFI_SUCCESS The operation failed.
|
@retval != EFI_SUCCESS The operation failed.
|
||||||
|
|
||||||
|
@ -624,8 +624,8 @@ ShellFindFilePath (
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Find a file by searching the CWD and then the path with a variable set of file
|
Find a file by searching the CWD and then the path with a variable set of file
|
||||||
extensions. If the file is not found it will append each extension in the list
|
extensions. If the file is not found it will append each extension in the list
|
||||||
in the order provided and return the first one that is successful.
|
in the order provided and return the first one that is successful.
|
||||||
|
|
||||||
If FileName is NULL, then ASSERT.
|
If FileName is NULL, then ASSERT.
|
||||||
|
@ -666,14 +666,14 @@ typedef struct {
|
||||||
extern SHELL_PARAM_ITEM EmptyParamList[];
|
extern SHELL_PARAM_ITEM EmptyParamList[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Checks the command line arguments passed against the list of valid ones.
|
Checks the command line arguments passed against the list of valid ones.
|
||||||
Optionally removes NULL values first.
|
Optionally removes NULL values first.
|
||||||
|
|
||||||
If no initialization is required, then return RETURN_SUCCESS.
|
If no initialization is required, then return RETURN_SUCCESS.
|
||||||
|
|
||||||
@param[in] CheckList Pointer to list of parameters to check.
|
@param[in] CheckList Pointer to list of parameters to check.
|
||||||
@param[out] CheckPackage Package of checked values.
|
@param[out] CheckPackage Package of checked values.
|
||||||
@param[out] ProblemParam Optional pointer to pointer to unicode string for
|
@param[out] ProblemParam Optional pointer to pointer to unicode string for
|
||||||
the paramater that caused failure.
|
the paramater that caused failure.
|
||||||
@param[in] AutoPageBreak Will automatically set PageBreakEnabled.
|
@param[in] AutoPageBreak Will automatically set PageBreakEnabled.
|
||||||
@param[in] AlwaysAllowNumbers Will never fail for number based flags.
|
@param[in] AlwaysAllowNumbers Will never fail for number based flags.
|
||||||
|
@ -681,13 +681,13 @@ extern SHELL_PARAM_ITEM EmptyParamList[];
|
||||||
@retval EFI_SUCCESS The operation completed sucessfully.
|
@retval EFI_SUCCESS The operation completed sucessfully.
|
||||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||||
@retval EFI_VOLUME_CORRUPTED The command line was corrupt. An argument was
|
@retval EFI_VOLUME_CORRUPTED The command line was corrupt. An argument was
|
||||||
duplicated. The duplicated command line argument
|
duplicated. The duplicated command line argument
|
||||||
was returned in ProblemParam if provided.
|
was returned in ProblemParam if provided.
|
||||||
@retval EFI_DEVICE_ERROR The commands contained 2 opposing arguments. One
|
@retval EFI_DEVICE_ERROR The commands contained 2 opposing arguments. One
|
||||||
of the command line arguments was returned in
|
of the command line arguments was returned in
|
||||||
ProblemParam if provided.
|
ProblemParam if provided.
|
||||||
@retval EFI_NOT_FOUND A argument required a value that was missing.
|
@retval EFI_NOT_FOUND A argument required a value that was missing.
|
||||||
The invalid command line argument was returned in
|
The invalid command line argument was returned in
|
||||||
ProblemParam if provided.
|
ProblemParam if provided.
|
||||||
**/
|
**/
|
||||||
|
@ -727,7 +727,7 @@ ShellCommandLineFreeVarList (
|
||||||
|
|
||||||
If CheckPackage is NULL then return FALSE.
|
If CheckPackage is NULL then return FALSE.
|
||||||
If KeyString is NULL then ASSERT().
|
If KeyString is NULL then ASSERT().
|
||||||
|
|
||||||
@param[in] CheckPackage The package of parsed command line arguments.
|
@param[in] CheckPackage The package of parsed command line arguments.
|
||||||
@param[in] KeyString The Key of the command line argument to check for.
|
@param[in] KeyString The Key of the command line argument to check for.
|
||||||
|
|
||||||
|
@ -745,7 +745,7 @@ ShellCommandLineGetFlag (
|
||||||
Returns value from command line argument.
|
Returns value from command line argument.
|
||||||
|
|
||||||
Value parameters are in the form of "-<Key> value" or "/<Key> value".
|
Value parameters are in the form of "-<Key> value" or "/<Key> value".
|
||||||
|
|
||||||
If CheckPackage is NULL, then return NULL.
|
If CheckPackage is NULL, then return NULL.
|
||||||
|
|
||||||
@param[in] CheckPackage The package of parsed command line arguments.
|
@param[in] CheckPackage The package of parsed command line arguments.
|
||||||
|
@ -765,7 +765,7 @@ ShellCommandLineGetValue (
|
||||||
Returns raw value from command line argument.
|
Returns raw value from command line argument.
|
||||||
|
|
||||||
Raw value parameters are in the form of "value" in a specific position in the list.
|
Raw value parameters are in the form of "value" in a specific position in the list.
|
||||||
|
|
||||||
If CheckPackage is NULL, then return NULL.
|
If CheckPackage is NULL, then return NULL.
|
||||||
|
|
||||||
@param[in] CheckPackage The package of parsed command line arguments.
|
@param[in] CheckPackage The package of parsed command line arguments.
|
||||||
|
@ -782,8 +782,8 @@ ShellCommandLineGetRawValue (
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the number of command line value parameters that were parsed.
|
Returns the number of command line value parameters that were parsed.
|
||||||
|
|
||||||
This will not include flags.
|
This will not include flags.
|
||||||
|
|
||||||
@retval (UINTN)-1 No parsing has ocurred.
|
@retval (UINTN)-1 No parsing has ocurred.
|
||||||
|
@ -798,7 +798,7 @@ ShellCommandLineGetCount(
|
||||||
/**
|
/**
|
||||||
Determins if a parameter is duplicated.
|
Determins if a parameter is duplicated.
|
||||||
|
|
||||||
If Param is not NULL then it will point to a callee allocated string buffer
|
If Param is not NULL then it will point to a callee allocated string buffer
|
||||||
with the parameter value if a duplicate is found.
|
with the parameter value if a duplicate is found.
|
||||||
|
|
||||||
If CheckPackage is NULL, then ASSERT.
|
If CheckPackage is NULL, then ASSERT.
|
||||||
|
@ -839,14 +839,14 @@ ShellInitialize (
|
||||||
Print at a specific location on the screen.
|
Print at a specific location on the screen.
|
||||||
|
|
||||||
This function will move the cursor to a given screen location and print the specified string.
|
This function will move the cursor to a given screen location and print the specified string.
|
||||||
|
|
||||||
If -1 is specified for either the Row or Col the current screen location for BOTH
|
If -1 is specified for either the Row or Col the current screen location for BOTH
|
||||||
will be used.
|
will be used.
|
||||||
|
|
||||||
If either Row or Col is out of range for the current console, then ASSERT.
|
If either Row or Col is out of range for the current console, then ASSERT.
|
||||||
If Format is NULL, then ASSERT.
|
If Format is NULL, then ASSERT.
|
||||||
|
|
||||||
In addition to the standard %-based flags as supported by UefiLib Print() this supports
|
In addition to the standard %-based flags as supported by UefiLib Print() this supports
|
||||||
the following additional flags:
|
the following additional flags:
|
||||||
%N - Set output attribute to normal
|
%N - Set output attribute to normal
|
||||||
%H - Set output attribute to highlight
|
%H - Set output attribute to highlight
|
||||||
|
@ -876,14 +876,14 @@ ShellPrintEx(
|
||||||
Print at a specific location on the screen.
|
Print at a specific location on the screen.
|
||||||
|
|
||||||
This function will move the cursor to a given screen location and print the specified string.
|
This function will move the cursor to a given screen location and print the specified string.
|
||||||
|
|
||||||
If -1 is specified for either the Row or Col the current screen location for BOTH
|
If -1 is specified for either the Row or Col the current screen location for BOTH
|
||||||
will be used.
|
will be used.
|
||||||
|
|
||||||
If either Row or Col is out of range for the current console, then ASSERT.
|
If either Row or Col is out of range for the current console, then ASSERT.
|
||||||
If Format is NULL, then ASSERT.
|
If Format is NULL, then ASSERT.
|
||||||
|
|
||||||
In addition to the standard %-based flags as supported by UefiLib Print() this supports
|
In addition to the standard %-based flags as supported by UefiLib Print() this supports
|
||||||
the following additional flags:
|
the following additional flags:
|
||||||
%N - Set output attribute to normal.
|
%N - Set output attribute to normal.
|
||||||
%H - Set output attribute to highlight.
|
%H - Set output attribute to highlight.
|
||||||
|
@ -895,6 +895,8 @@ ShellPrintEx(
|
||||||
|
|
||||||
@param[in] Row The row to print at.
|
@param[in] Row The row to print at.
|
||||||
@param[in] Col The column to print at.
|
@param[in] Col The column to print at.
|
||||||
|
@param[in] Language The language of the string to retrieve. If this parameter
|
||||||
|
is NULL, then the current platform language is used.
|
||||||
@param[in] HiiFormatStringId The format string Id for getting from Hii.
|
@param[in] HiiFormatStringId The format string Id for getting from Hii.
|
||||||
@param[in] HiiFormatHandle The format string Handle for getting from Hii.
|
@param[in] HiiFormatHandle The format string Handle for getting from Hii.
|
||||||
|
|
||||||
|
@ -905,6 +907,7 @@ EFIAPI
|
||||||
ShellPrintHiiEx(
|
ShellPrintHiiEx(
|
||||||
IN INT32 Col OPTIONAL,
|
IN INT32 Col OPTIONAL,
|
||||||
IN INT32 Row OPTIONAL,
|
IN INT32 Row OPTIONAL,
|
||||||
|
IN CONST CHAR8 *Language OPTIONAL,
|
||||||
IN CONST EFI_STRING_ID HiiFormatStringId,
|
IN CONST EFI_STRING_ID HiiFormatStringId,
|
||||||
IN CONST EFI_HANDLE HiiFormatHandle,
|
IN CONST EFI_HANDLE HiiFormatHandle,
|
||||||
...
|
...
|
||||||
|
@ -966,7 +969,7 @@ ShellIsFileInPath(
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Function to determine whether a string is decimal or hex representation of a number
|
Function to determine whether a string is decimal or hex representation of a number
|
||||||
and return the number converted from the string.
|
and return the number converted from the string.
|
||||||
|
|
||||||
@param[in] String String representation of a number
|
@param[in] String String representation of a number
|
||||||
|
@ -980,38 +983,38 @@ ShellStrToUintn(
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Safely append with automatic string resizing given length of Destination and
|
Safely append with automatic string resizing given length of Destination and
|
||||||
desired length of copy from Source.
|
desired length of copy from Source.
|
||||||
|
|
||||||
Append the first D characters of Source to the end of Destination, where D is
|
Append the first D characters of Source to the end of Destination, where D is
|
||||||
the lesser of Count and the StrLen() of Source. If appending those D characters
|
the lesser of Count and the StrLen() of Source. If appending those D characters
|
||||||
will fit within Destination (whose Size is given as CurrentSize) and
|
will fit within Destination (whose Size is given as CurrentSize) and
|
||||||
still leave room for a null terminator, then those characters are appended,
|
still leave room for a NULL terminator, then those characters are appended,
|
||||||
starting at the original terminating null of Destination, and a new terminating
|
starting at the original terminating NULL of Destination, and a new terminating
|
||||||
null is appended.
|
NULL is appended.
|
||||||
|
|
||||||
If appending D characters onto Destination will result in a overflow of the size
|
If appending D characters onto Destination will result in a overflow of the size
|
||||||
given in CurrentSize the string will be grown such that the copy can be performed
|
given in CurrentSize the string will be grown such that the copy can be performed
|
||||||
and CurrentSize will be updated to the new size.
|
and CurrentSize will be updated to the new size.
|
||||||
|
|
||||||
If Source is NULL, there is nothing to append, just return the current buffer in
|
If Source is NULL, there is nothing to append, just return the current buffer in
|
||||||
Destination.
|
Destination.
|
||||||
|
|
||||||
If Destination is NULL, then ASSERT().
|
If Destination is NULL, then ASSERT().
|
||||||
If Destination's current length (including NULL terminator) is already more than
|
If Destination's current length (including NULL terminator) is already more than
|
||||||
CurrentSize, then ASSERT().
|
CurrentSize, then ASSERT().
|
||||||
|
|
||||||
@param[in,out] Destination The String to append onto.
|
@param[in,out] Destination The String to append onto.
|
||||||
@param[in,out] CurrentSize On call the number of bytes in Destination. On
|
@param[in,out] CurrentSize On call the number of bytes in Destination. On
|
||||||
return possibly the new size (still in bytes). If NULL
|
return possibly the new size (still in bytes). If NULL
|
||||||
then allocate whatever is needed.
|
then allocate whatever is needed.
|
||||||
@param[in] Source The String to append from.
|
@param[in] Source The String to append from.
|
||||||
@param[in] Count Maximum number of characters to append. If 0 then
|
@param[in] Count Maximum number of characters to append. If 0 then
|
||||||
all are appended.
|
all are appended.
|
||||||
|
|
||||||
@return The Destination after apending the Source.
|
@return The Destination after apending the Source.
|
||||||
**/
|
**/
|
||||||
CHAR16*
|
CHAR16*
|
||||||
EFIAPI
|
EFIAPI
|
||||||
StrnCatGrow (
|
StrnCatGrow (
|
||||||
IN OUT CHAR16 **Destination,
|
IN OUT CHAR16 **Destination,
|
||||||
|
@ -1021,7 +1024,7 @@ StrnCatGrow (
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This is a find and replace function. Upon successful return the NewString is a copy of
|
This is a find and replace function. Upon successful return the NewString is a copy of
|
||||||
SourceString with each instance of FindTarget replaced with ReplaceWith.
|
SourceString with each instance of FindTarget replaced with ReplaceWith.
|
||||||
|
|
||||||
If SourceString and NewString overlap the behavior is undefined.
|
If SourceString and NewString overlap the behavior is undefined.
|
||||||
|
@ -1042,7 +1045,7 @@ StrnCatGrow (
|
||||||
@retval EFI_INVALID_PARAMETER ReplaceWith was NULL.
|
@retval EFI_INVALID_PARAMETER ReplaceWith was NULL.
|
||||||
@retval EFI_INVALID_PARAMETER FindTarget had length < 1.
|
@retval EFI_INVALID_PARAMETER FindTarget had length < 1.
|
||||||
@retval EFI_INVALID_PARAMETER SourceString had length < 1.
|
@retval EFI_INVALID_PARAMETER SourceString had length < 1.
|
||||||
@retval EFI_BUFFER_TOO_SMALL NewSize was less than the minimum size to hold
|
@retval EFI_BUFFER_TOO_SMALL NewSize was less than the minimum size to hold
|
||||||
the new string (truncation occurred).
|
the new string (truncation occurred).
|
||||||
@retval EFI_SUCCESS The string was sucessfully copied with replacement.
|
@retval EFI_SUCCESS The string was sucessfully copied with replacement.
|
||||||
**/
|
**/
|
||||||
|
@ -1066,8 +1069,8 @@ ShellCopySearchAndReplace2(
|
||||||
/**
|
/**
|
||||||
Check if a Unicode character is a hexadecimal character.
|
Check if a Unicode character is a hexadecimal character.
|
||||||
|
|
||||||
This internal function checks if a Unicode character is a
|
This internal function checks if a Unicode character is a
|
||||||
decimal character. The valid hexadecimal character is
|
decimal character. The valid hexadecimal character is
|
||||||
L'0' to L'9', L'a' to L'f', or L'A' to L'F'.
|
L'0' to L'9', L'a' to L'f', or L'A' to L'F'.
|
||||||
|
|
||||||
@param[in] Char The character to check.
|
@param[in] Char The character to check.
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
/** @file
|
/** @file
|
||||||
Library used for sorting and comparison routines.
|
Library used for sorting and comparison routines.
|
||||||
|
|
||||||
Copyright (c) 2009, Intel Corporation<BR>
|
Copyright (c) 2009-2010, Intel Corporation.All rights reserved. <BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ INTN
|
||||||
on return a buffer of sorted elements.
|
on return a buffer of sorted elements.
|
||||||
@param[in] Count The number of elements in the buffer to sort
|
@param[in] Count The number of elements in the buffer to sort
|
||||||
@param[in] ElementSize Size of an element in bytes.
|
@param[in] ElementSize Size of an element in bytes.
|
||||||
@param[in] CompareFunction The function to call to perform the comparison
|
@param[in] CompareFunction The function to call to perform the comparison
|
||||||
of any 2 elements.
|
of any 2 elements.
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@ -68,7 +68,7 @@ PerformQuickSort (
|
||||||
|
|
||||||
@retval 0 Buffer1 equal to Buffer2.
|
@retval 0 Buffer1 equal to Buffer2.
|
||||||
@return < 0 Buffer1 is less than Buffer2.
|
@return < 0 Buffer1 is less than Buffer2.
|
||||||
@return > 0 Buffer1 is greater than Buffer2.
|
@return > 0 Buffer1 is greater than Buffer2.
|
||||||
**/
|
**/
|
||||||
INTN
|
INTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
@ -80,12 +80,12 @@ DevicePathCompare (
|
||||||
/**
|
/**
|
||||||
Function to compare 2 strings without regard to case of the characters.
|
Function to compare 2 strings without regard to case of the characters.
|
||||||
|
|
||||||
@param[in] Buffer1 Pointer to String to compare (CHAR16**).
|
@param[in] Buffer1 Pointer to String to compare (CHAR16**).
|
||||||
@param[in] Buffer2 Pointer to second String to compare (CHAR16**).
|
@param[in] Buffer2 Pointer to second String to compare (CHAR16**).
|
||||||
|
|
||||||
@retval 0 Buffer1 equal to Buffer2.
|
@retval 0 Buffer1 equal to Buffer2.
|
||||||
@return < 0 Buffer1 is less than Buffer2.
|
@return < 0 Buffer1 is less than Buffer2.
|
||||||
@return > 0 Buffer1 is greater than Buffer2.
|
@return > 0 Buffer1 is greater than Buffer2.
|
||||||
**/
|
**/
|
||||||
INTN
|
INTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
/** @file
|
/** @file
|
||||||
EFI Shell protocol as defined in the UEFI Shell 2.0 specification including errata.
|
EFI Shell protocol as defined in the UEFI Shell 2.0 specification including errata.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation
|
|
||||||
All rights reserved. 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
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -50,11 +50,11 @@ BOOLEAN
|
||||||
/**
|
/**
|
||||||
Closes the file handle.
|
Closes the file handle.
|
||||||
|
|
||||||
This function closes a specified file handle. All 'dirty' cached file data is
|
This function closes a specified file handle. All 'dirty' cached file data is
|
||||||
flushed to the device, and the file is closed. In all cases, the handle is
|
flushed to the device, and the file is closed. In all cases, the handle is
|
||||||
closed.
|
closed.
|
||||||
|
|
||||||
@param[in] FileHandle The file handle to be closed
|
@param[in] FileHandle The file handle to be closed.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The file closed sucessfully.
|
@retval EFI_SUCCESS The file closed sucessfully.
|
||||||
**/
|
**/
|
||||||
|
@ -70,22 +70,22 @@ EFI_STATUS
|
||||||
This function creates an empty new file or directory with the specified attributes and
|
This function creates an empty new file or directory with the specified attributes and
|
||||||
returns the new file's handle. If the file already exists and is read-only, then
|
returns the new file's handle. If the file already exists and is read-only, then
|
||||||
EFI_INVALID_PARAMETER will be returned.
|
EFI_INVALID_PARAMETER will be returned.
|
||||||
|
|
||||||
If the file already existed, it is truncated and its attributes updated. If the file is
|
If the file already existed, it is truncated and its attributes updated. If the file is
|
||||||
created successfully, the FileHandle is the file's handle, else, the FileHandle is NULL.
|
created successfully, the FileHandle is the file's handle, else, the FileHandle is NULL.
|
||||||
|
|
||||||
If the file name begins with >v, then the file handle which is returned refers to the
|
If the file name begins with >v, then the file handle which is returned refers to the
|
||||||
shell environment variable with the specified name. If the shell environment variable
|
shell environment variable with the specified name. If the shell environment variable
|
||||||
already exists and is non-volatile then EFI_INVALID_PARAMETER is returned.
|
already exists and is non-volatile then EFI_INVALID_PARAMETER is returned.
|
||||||
|
|
||||||
@param[in] FileName Pointer to null-terminated file path.
|
@param[in] FileName Pointer to NULL-terminated file path.
|
||||||
@param[in] FileAttribs The new file's attrbiutes. the different attributes are
|
@param[in] FileAttribs The new file's attrbiutes. the different attributes are
|
||||||
described in EFI_FILE_PROTOCOL.Open().
|
described in EFI_FILE_PROTOCOL.Open().
|
||||||
@param[out] FileHandle On return, points to the created file handle or directory's handle
|
@param[out] FileHandle On return, points to the created file handle or directory's handle
|
||||||
|
|
||||||
@retval EFI_SUCCESS The file was opened. FileHandle points to the new file's handle.
|
@retval EFI_SUCCESS The file was opened. FileHandle points to the new file's handle.
|
||||||
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
||||||
@retval EFI_UNSUPPORTED could not open the file path
|
@retval EFI_UNSUPPORTED The file path could not be opened.
|
||||||
@retval EFI_NOT_FOUND The specified file could not be found on the device, or could not
|
@retval EFI_NOT_FOUND The specified file could not be found on the device, or could not
|
||||||
file the file system on the device.
|
file the file system on the device.
|
||||||
@retval EFI_NO_MEDIA The device has no medium.
|
@retval EFI_NO_MEDIA The device has no medium.
|
||||||
|
@ -117,7 +117,7 @@ EFI_STATUS
|
||||||
|
|
||||||
@param[in] FileHandle The file handle to delete.
|
@param[in] FileHandle The file handle to delete.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The file was closed and deleted, and the handle was closed.
|
@retval EFI_SUCCESS The file was closed and deleted and the handle was closed.
|
||||||
@retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted.
|
@retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -131,9 +131,9 @@ EFI_STATUS
|
||||||
|
|
||||||
This function deletes a file.
|
This function deletes a file.
|
||||||
|
|
||||||
@param[in] FileName Points to the null-terminated file name.
|
@param[in] FileName Points to the NULL-terminated file name.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The file was closed and deleted, and the handle was closed.
|
@retval EFI_SUCCESS The file was deleted.
|
||||||
@retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted.
|
@retval EFI_WARN_DELETE_FAILURE The handle was closed but the file was not deleted.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -148,8 +148,8 @@ EFI_STATUS
|
||||||
typedef
|
typedef
|
||||||
VOID
|
VOID
|
||||||
(EFIAPI *EFI_SHELL_DISABLE_PAGE_BREAK) (
|
(EFIAPI *EFI_SHELL_DISABLE_PAGE_BREAK) (
|
||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Enables the page break output mode.
|
Enables the page break output mode.
|
||||||
|
@ -157,8 +157,8 @@ VOID
|
||||||
typedef
|
typedef
|
||||||
VOID
|
VOID
|
||||||
(EFIAPI *EFI_SHELL_ENABLE_PAGE_BREAK) (
|
(EFIAPI *EFI_SHELL_ENABLE_PAGE_BREAK) (
|
||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Execute the command line.
|
Execute the command line.
|
||||||
|
@ -166,26 +166,26 @@ VOID
|
||||||
This function creates a nested instance of the shell and executes the specified
|
This function creates a nested instance of the shell and executes the specified
|
||||||
command (CommandLine) with the specified environment (Environment). Upon return,
|
command (CommandLine) with the specified environment (Environment). Upon return,
|
||||||
the status code returned by the specified command is placed in StatusCode.
|
the status code returned by the specified command is placed in StatusCode.
|
||||||
|
|
||||||
If Environment is NULL, then the current environment is used and all changes made
|
If Environment is NULL, then the current environment is used and all changes made
|
||||||
by the commands executed will be reflected in the current environment. If the
|
by the commands executed will be reflected in the current environment. If the
|
||||||
Environment is non-NULL, then the changes made will be discarded.
|
Environment is non-NULL, then the changes made will be discarded.
|
||||||
|
|
||||||
The CommandLine is executed from the current working directory on the current
|
The CommandLine is executed from the current working directory on the current
|
||||||
device.
|
device.
|
||||||
|
|
||||||
@param[in] ParentImageHandle A handle of the image that is executing the specified
|
@param[in] ParentImageHandle A handle of the image that is executing the specified
|
||||||
command line.
|
command line.
|
||||||
@param[in] CommandLine Points to the null-terminated UCS-2 encoded string
|
@param[in] CommandLine Points to the NULL-terminated UCS-2 encoded string
|
||||||
containing the command line. If NULL then the command-
|
containing the command line. If NULL then the command-
|
||||||
line will be empty.
|
line will be empty.
|
||||||
@param[in] Environment Points to a null-terminated array of environment
|
@param[in] Environment Points to a NULL-terminated array of environment
|
||||||
variables with the format 'x=y', where x is the
|
variables with the format 'x=y', where x is the
|
||||||
environment variable name and y is the value. If this
|
environment variable name and y is the value. If this
|
||||||
is NULL, then the current shell environment is used.
|
is NULL, then the current shell environment is used.
|
||||||
@param[out] ErrorCode Points to the status code returned by the command.
|
@param[out] ErrorCode Points to the status code returned by the command.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The command executed successfully. The status code
|
@retval EFI_SUCCESS The command executed successfully. The status code
|
||||||
returned by the command is pointed to by StatusCode.
|
returned by the command is pointed to by StatusCode.
|
||||||
@retval EFI_INVALID_PARAMETER The parameters are invalid.
|
@retval EFI_INVALID_PARAMETER The parameters are invalid.
|
||||||
@retval EFI_OUT_OF_RESOURCES Out of resources.
|
@retval EFI_OUT_OF_RESOURCES Out of resources.
|
||||||
|
@ -210,9 +210,9 @@ EFI_STATUS
|
||||||
The files in the file list are not opened. The OpenMode field is set to 0 and the FileInfo
|
The files in the file list are not opened. The OpenMode field is set to 0 and the FileInfo
|
||||||
field is set to NULL.
|
field is set to NULL.
|
||||||
|
|
||||||
@param[in] FilePattern Points to a null-terminated shell file path, including wildcards.
|
@param[in] FilePattern Points to a NULL-terminated shell file path, including wildcards.
|
||||||
@param[out] FileList On return, points to the start of a file list containing the names
|
@param[out] FileList On return, points to the start of a file list containing the names
|
||||||
of all matching files or else points to NULL if no matching files
|
of all matching files or else points to NULL if no matching files
|
||||||
were found.
|
were found.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Files found.
|
@retval EFI_SUCCESS Files found.
|
||||||
|
@ -232,7 +232,7 @@ EFI_STATUS
|
||||||
Find all files in a specified directory.
|
Find all files in a specified directory.
|
||||||
|
|
||||||
@param[in] FileDirHandle Handle of the directory to search.
|
@param[in] FileDirHandle Handle of the directory to search.
|
||||||
@param[out] FileList On return, points to the list of files in the directory
|
@param[out] FileList On return, points to the list of files in the directory
|
||||||
or NULL if there are no files in the directory.
|
or NULL if there are no files in the directory.
|
||||||
|
|
||||||
@retval EFI_SUCCESS File information was returned successfully.
|
@retval EFI_SUCCESS File information was returned successfully.
|
||||||
|
@ -249,10 +249,10 @@ OUT EFI_SHELL_FILE_INFO **FileList
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Flushes data back to a device.
|
Flushes data back to a device.
|
||||||
|
|
||||||
This function flushes all modified data associated with a file to a device.
|
This function flushes all modified data associated with a file to a device.
|
||||||
|
|
||||||
@param[in] FileHandle The handle of the file to flush
|
@param[in] FileHandle The handle of the file to flush.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The data was flushed.
|
@retval EFI_SUCCESS The data was flushed.
|
||||||
@retval EFI_NO_MEDIA The device has no medium.
|
@retval EFI_NO_MEDIA The device has no medium.
|
||||||
|
@ -270,12 +270,12 @@ EFI_STATUS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Frees the file list.
|
Frees the file list.
|
||||||
|
|
||||||
This function cleans up the file list and any related data structures. It has no
|
This function cleans up the file list and any related data structures. It has no
|
||||||
impact on the files themselves.
|
impact on the files themselves.
|
||||||
|
|
||||||
@param[in] FileList The file list to free. Type EFI_SHELL_FILE_INFO is
|
@param[in] FileList The file list to free. Type EFI_SHELL_FILE_INFO is
|
||||||
defined in OpenFileList()
|
defined in OpenFileList().
|
||||||
|
|
||||||
@retval EFI_SUCCESS Free the file list successfully.
|
@retval EFI_SUCCESS Free the file list successfully.
|
||||||
**/
|
**/
|
||||||
|
@ -293,9 +293,9 @@ EFI_STATUS
|
||||||
FileSystemMapping. In both cases, the returned name includes the file system
|
FileSystemMapping. In both cases, the returned name includes the file system
|
||||||
mapping (i.e. fs0:\current-dir).
|
mapping (i.e. fs0:\current-dir).
|
||||||
|
|
||||||
@param[in] FileSystemMapping A pointer to the file system mapping. If NULL,
|
@param[in] FileSystemMapping A pointer to the file system mapping. If NULL,
|
||||||
then the current working directory is returned.
|
then the current working directory is returned.
|
||||||
|
|
||||||
@retval !=NULL The current directory.
|
@retval !=NULL The current directory.
|
||||||
@retval NULL Current directory does not exist.
|
@retval NULL Current directory does not exist.
|
||||||
**/
|
**/
|
||||||
|
@ -327,13 +327,13 @@ typedef UINT32 EFI_SHELL_DEVICE_NAME_FLAGS;
|
||||||
EFI_DEVICE_NAME_USE_COMPONENT_NAME will have higher priority.
|
EFI_DEVICE_NAME_USE_COMPONENT_NAME will have higher priority.
|
||||||
|
|
||||||
@param[in] DeviceHandle The handle of the device.
|
@param[in] DeviceHandle The handle of the device.
|
||||||
@param[in] Flags Determines the possible sources of component names.
|
@param[in] Flags Determines the possible sources of component names.
|
||||||
@param[in] Language A pointer to the language specified for the device
|
@param[in] Language A pointer to the language specified for the device
|
||||||
name, in the same format as described in the UEFI
|
name, in the same format as described in the UEFI
|
||||||
specification, Appendix M.
|
specification, Appendix M.
|
||||||
@param[out] BestDeviceName On return, points to the callee-allocated null-
|
@param[out] BestDeviceName On return, points to the callee-allocated NULL-
|
||||||
terminated name of the device. If no device name
|
terminated name of the device. If no device name
|
||||||
could be found, points to NULL. The name must be
|
could be found, points to NULL. The name must be
|
||||||
freed by the caller...
|
freed by the caller...
|
||||||
|
|
||||||
@retval EFI_SUCCESS Get the name successfully.
|
@retval EFI_SUCCESS Get the name successfully.
|
||||||
|
@ -355,10 +355,10 @@ EFI_STATUS
|
||||||
|
|
||||||
@param[in] Mapping A pointer to the mapping
|
@param[in] Mapping A pointer to the mapping
|
||||||
|
|
||||||
@retval !=NULL Pointer to the device path that corresponds to the
|
@retval !=NULL Pointer to the device path that corresponds to the
|
||||||
device mapping. The returned pointer does not need
|
device mapping. The returned pointer does not need
|
||||||
to be freed.
|
to be freed.
|
||||||
@retval NULL There is no device path associated with the
|
@retval NULL There is no device path associated with the
|
||||||
specified mapping.
|
specified mapping.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -375,7 +375,7 @@ CONST EFI_DEVICE_PATH_PROTOCOL *
|
||||||
|
|
||||||
@param[in] Path The pointer to the path.
|
@param[in] Path The pointer to the path.
|
||||||
|
|
||||||
@return The pointer of the file path. The file path is callee
|
@return The pointer of the file path. The file path is callee
|
||||||
allocated and should be freed by the caller.
|
allocated and should be freed by the caller.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -385,28 +385,26 @@ EFI_DEVICE_PATH_PROTOCOL *
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function updated with errata.
|
|
||||||
|
|
||||||
Gets either a single or list of environment variables.
|
Gets either a single or list of environment variables.
|
||||||
|
|
||||||
If name is not NULL then this function returns the current value of the specified
|
If name is not NULL then this function returns the current value of the specified
|
||||||
environment variable.
|
environment variable.
|
||||||
|
|
||||||
If Name is NULL than a list of all environment variable names is returned. Each a
|
If Name is NULL than a list of all environment variable names is returned. Each a
|
||||||
NULL terminated string with a double NULL terminating the list.
|
NULL terminated string with a double NULL terminating the list.
|
||||||
|
|
||||||
@param[in] Name A pointer to the environment variable name. If
|
@param[in] Name A pointer to the environment variable name. If
|
||||||
Name is NULL, then the function will return all
|
Name is NULL, then the function will return all
|
||||||
of the defined shell environment variables. In
|
of the defined shell environment variables. In
|
||||||
the case where multiple environment variables are
|
the case where multiple environment variables are
|
||||||
being returned, each variable will be terminated by
|
being returned, each variable will be terminated by
|
||||||
a NULL, and the list will be terminated by a double
|
a NULL, and the list will be terminated by a double
|
||||||
NULL.
|
NULL.
|
||||||
|
|
||||||
@return !=NULL A pointer to the returned string.
|
@return A pointer to the returned string.
|
||||||
The returned pointer does not need to be freed by the caller.
|
The returned pointer does not need to be freed by the caller.
|
||||||
|
|
||||||
@retval NULL The environment variable doesn't exist or there are
|
@retval NULL The environment variable doesn't exist or there are
|
||||||
no environment variables.
|
no environment variables.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -423,8 +421,8 @@ CONST CHAR16 *
|
||||||
|
|
||||||
@param[in] FileHandle A File Handle.
|
@param[in] FileHandle A File Handle.
|
||||||
|
|
||||||
@return !=NULL Cannot get the file info.
|
@retval NULL Cannot get the file info.
|
||||||
@return NULL A pointer to a buffer with file information.
|
@return A pointer to a buffer with file information.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
EFI_FILE_INFO *
|
EFI_FILE_INFO *
|
||||||
|
@ -439,9 +437,9 @@ EFI_FILE_INFO *
|
||||||
the device path with the file-system mapping. If there are more than one application
|
the device path with the file-system mapping. If there are more than one application
|
||||||
file system mappings, the one that most closely matches Path will be used.
|
file system mappings, the one that most closely matches Path will be used.
|
||||||
|
|
||||||
@param[in] Path The pointer to the device path
|
@param[in] Path The pointer to the device path.
|
||||||
|
|
||||||
@return all The pointer of the null-terminated file path. The path
|
@return The pointer of the NULL-terminated file path. The path
|
||||||
is callee-allocated and should be freed by the caller.
|
is callee-allocated and should be freed by the caller.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -458,7 +456,7 @@ CHAR16 *
|
||||||
operation is not supported.
|
operation is not supported.
|
||||||
|
|
||||||
@param[in] FileHandle The file handle on which to get the current position.
|
@param[in] FileHandle The file handle on which to get the current position.
|
||||||
@paramp[out] Position Byte position from the start of the file.
|
@param[out] Position Byte position from the start of the file.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Data was accessed.
|
@retval EFI_SUCCESS Data was accessed.
|
||||||
@retval EFI_UNSUPPORTED The request is not valid on open directories.
|
@retval EFI_UNSUPPORTED The request is not valid on open directories.
|
||||||
|
@ -493,22 +491,22 @@ EFI_STATUS
|
||||||
|
|
||||||
This function returns the help information for the specified command. The help text
|
This function returns the help information for the specified command. The help text
|
||||||
can be internal to the shell or can be from a UEFI Shell manual page.
|
can be internal to the shell or can be from a UEFI Shell manual page.
|
||||||
|
|
||||||
If Sections is specified, then each section name listed will be compared in a casesensitive
|
If Sections is specified, then each section name listed will be compared in a casesensitive
|
||||||
manner, to the section names described in Appendix B. If the section exists,
|
manner, to the section names described in Appendix B. If the section exists,
|
||||||
it will be appended to the returned help text. If the section does not exist, no
|
it will be appended to the returned help text. If the section does not exist, no
|
||||||
information will be returned. If Sections is NULL, then all help text information
|
information will be returned. If Sections is NULL, then all help text information
|
||||||
available will be returned.
|
available will be returned.
|
||||||
|
|
||||||
@param[in] Command Points to the null-terminated UEFI Shell command name.
|
@param[in] Command Points to the NULL-terminated UEFI Shell command name.
|
||||||
@param[in] Sections Points to the null-terminated comma-delimited
|
@param[in] Sections Points to the NULL-terminated comma-delimited
|
||||||
section names to return. If NULL, then all
|
section names to return. If NULL, then all
|
||||||
sections will be returned.
|
sections will be returned.
|
||||||
@param[out] HelpText On return, points to a callee-allocated buffer
|
@param[out] HelpText On return, points to a callee-allocated buffer
|
||||||
containing all specified help text.
|
containing all specified help text.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The help text was returned.
|
@retval EFI_SUCCESS The help text was returned.
|
||||||
@retval EFI_OUT_OF_RESOURCES The necessary buffer could not be allocated to hold the
|
@retval EFI_OUT_OF_RESOURCES The necessary buffer could not be allocated to hold the
|
||||||
returned help text.
|
returned help text.
|
||||||
@retval EFI_INVALID_PARAMETER HelpText is NULL.
|
@retval EFI_INVALID_PARAMETER HelpText is NULL.
|
||||||
@retval EFI_NOT_FOUND There is no help text available for Command.
|
@retval EFI_NOT_FOUND There is no help text available for Command.
|
||||||
|
@ -522,8 +520,6 @@ EFI_STATUS
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This funciton is updated with Errata.
|
|
||||||
|
|
||||||
Gets the mapping(s) that most closely matches the device path.
|
Gets the mapping(s) that most closely matches the device path.
|
||||||
|
|
||||||
This function gets the mapping which corresponds to the device path *DevicePath. If
|
This function gets the mapping which corresponds to the device path *DevicePath. If
|
||||||
|
@ -532,15 +528,15 @@ EFI_STATUS
|
||||||
device path. If there is an exact match, the mapping is returned and *DevicePath
|
device path. If there is an exact match, the mapping is returned and *DevicePath
|
||||||
points to the end-of-device-path node.
|
points to the end-of-device-path node.
|
||||||
|
|
||||||
If there are multiple map names they will be semi-colon seperated in the
|
If there are multiple map names they will be semi-colon seperated in the
|
||||||
NULL-terminated string.
|
NULL-terminated string.
|
||||||
|
|
||||||
@param[in,out] DevicePath On entry, points to a device path pointer. On
|
@param[in,out] DevicePath On entry, points to a device path pointer. On
|
||||||
exit, updates the pointer to point to the
|
exit, updates the pointer to point to the
|
||||||
portion of the device path after the mapping.
|
portion of the device path after the mapping.
|
||||||
|
|
||||||
@retval NULL No mapping was found.
|
@retval NULL No mapping was found.
|
||||||
@retval !=NULL Pointer to null-terminated mapping. The buffer
|
@retval !=NULL Pointer to NULL-terminated mapping. The buffer
|
||||||
is callee allocated and should be freed by the caller.
|
is callee allocated and should be freed by the caller.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -582,34 +578,34 @@ VOID
|
||||||
|
|
||||||
This function opens the specified file in the specified OpenMode and returns a file
|
This function opens the specified file in the specified OpenMode and returns a file
|
||||||
handle.
|
handle.
|
||||||
If the file name begins with >v, then the file handle which is returned refers to the
|
If the file name begins with '>v', then the file handle which is returned refers to the
|
||||||
shell environment variable with the specified name. If the shell environment variable
|
shell environment variable with the specified name. If the shell environment variable
|
||||||
exists, is non-volatile and the OpenMode indicates EFI_FILE_MODE_WRITE, then
|
exists, is non-volatile and the OpenMode indicates EFI_FILE_MODE_WRITE, then
|
||||||
EFI_INVALID_PARAMETER is returned.
|
EFI_INVALID_PARAMETER is returned.
|
||||||
|
|
||||||
If the file name is >i, then the file handle which is returned refers to the standard
|
If the file name is '>i', then the file handle which is returned refers to the standard
|
||||||
input. If the OpenMode indicates EFI_FILE_MODE_WRITE, then EFI_INVALID_PARAMETER
|
input. If the OpenMode indicates EFI_FILE_MODE_WRITE, then EFI_INVALID_PARAMETER
|
||||||
is returned.
|
is returned.
|
||||||
|
|
||||||
If the file name is >o, then the file handle which is returned refers to the standard
|
If the file name is '>o', then the file handle which is returned refers to the standard
|
||||||
output. If the OpenMode indicates EFI_FILE_MODE_READ, then EFI_INVALID_PARAMETER
|
output. If the OpenMode indicates EFI_FILE_MODE_READ, then EFI_INVALID_PARAMETER
|
||||||
is returned.
|
is returned.
|
||||||
|
|
||||||
If the file name is >e, then the file handle which is returned refers to the standard
|
If the file name is '>e', then the file handle which is returned refers to the standard
|
||||||
error. If the OpenMode indicates EFI_FILE_MODE_READ, then EFI_INVALID_PARAMETER
|
error. If the OpenMode indicates EFI_FILE_MODE_READ, then EFI_INVALID_PARAMETER
|
||||||
is returned.
|
is returned.
|
||||||
|
|
||||||
If the file name is NUL, then the file handle that is returned refers to the standard NUL
|
If the file name is 'NUL', then the file handle that is returned refers to the standard NUL
|
||||||
file. If the OpenMode indicates EFI_FILE_MODE_READ, then EFI_INVALID_PARAMETER is
|
file. If the OpenMode indicates EFI_FILE_MODE_READ, then EFI_INVALID_PARAMETER is
|
||||||
returned.
|
returned.
|
||||||
|
|
||||||
If return EFI_SUCCESS, the FileHandle is the opened file's handle, else, the
|
If return EFI_SUCCESS, the FileHandle is the opened file's handle, else, the
|
||||||
FileHandle is NULL.
|
FileHandle is NULL.
|
||||||
|
|
||||||
@param[in] FileName Points to the null-terminated UCS-2 encoded file name.
|
@param[in] FileName Points to the NULL-terminated UCS-2 encoded file name.
|
||||||
@param[out] FileHandle On return, points to the file handle.
|
@param[out] FileHandle On return, points to the file handle.
|
||||||
@param[in] OpenMode File open mode. Either EFI_FILE_MODE_READ or
|
@param[in] OpenMode File open mode. Either EFI_FILE_MODE_READ or
|
||||||
EFI_FILE_MODE_WRITE from section 12.4 of the UEFI
|
EFI_FILE_MODE_WRITE from section 12.4 of the UEFI
|
||||||
Specification.
|
Specification.
|
||||||
@retval EFI_SUCCESS The file was opened. FileHandle has the opened file's handle.
|
@retval EFI_SUCCESS The file was opened. FileHandle has the opened file's handle.
|
||||||
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value. FileHandle is NULL.
|
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value. FileHandle is NULL.
|
||||||
|
@ -641,7 +637,7 @@ EFI_STATUS
|
||||||
Opens the files that match the path specified.
|
Opens the files that match the path specified.
|
||||||
|
|
||||||
This function opens all of the files specified by Path. Wildcards are processed
|
This function opens all of the files specified by Path. Wildcards are processed
|
||||||
according to the rules specified in UEFI Shell 2.0 spec section 3.7.1. Each
|
according to the rules specified in UEFI Shell 2.0 spec section 3.7.1. Each
|
||||||
matching file has an EFI_SHELL_FILE_INFO structure created in a linked list.
|
matching file has an EFI_SHELL_FILE_INFO structure created in a linked list.
|
||||||
|
|
||||||
@param[in] Path A pointer to the path string.
|
@param[in] Path A pointer to the path string.
|
||||||
|
@ -745,23 +741,18 @@ EFI_STATUS
|
||||||
IN EFI_SHELL_FILE_INFO **FileList
|
IN EFI_SHELL_FILE_INFO **FileList
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
|
||||||
// The SetAlias and GetAlias functions were affected by errata.
|
|
||||||
// They are not UEFI Shell 2.0 (no errata) compliant.
|
|
||||||
//
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Changes a shell command alias.
|
Changes a shell command alias.
|
||||||
|
|
||||||
This function creates an alias for a shell command.
|
This function creates an alias for a shell command.
|
||||||
|
|
||||||
@param[in] Command Points to the null-terminated shell command or existing alias.
|
@param[in] Command Points to the NULL-terminated shell command or existing alias.
|
||||||
@param[in] Alias Points to the null-terminated alias for the shell command. If this is NULL, and
|
@param[in] Alias Points to the NULL-terminated alias for the shell command. If this is NULL, and
|
||||||
Command refers to an alias, that alias will be deleted.
|
Command refers to an alias, that alias will be deleted.
|
||||||
@param[in] Replace If TRUE and the alias already exists, then the existing alias will be replaced. If
|
@param[in] Replace If TRUE and the alias already exists, then the existing alias will be replaced. If
|
||||||
FALSE and the alias already exists, then the existing alias is unchanged and
|
FALSE and the alias already exists, then the existing alias is unchanged and
|
||||||
EFI_ACCESS_DENIED is returned.
|
EFI_ACCESS_DENIED is returned.
|
||||||
@param[in] Volatile if TRUE the Alias being set will be stored in a volatile fashion. if FALSE the
|
@param[in] Volatile if TRUE the Alias being set will be stored in a volatile fashion. if FALSE the
|
||||||
Alias being set will be stored in a non-volatile fashion.
|
Alias being set will be stored in a non-volatile fashion.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Alias created or deleted successfully.
|
@retval EFI_SUCCESS Alias created or deleted successfully.
|
||||||
|
@ -781,20 +772,20 @@ EFI_STATUS
|
||||||
This function returns the command associated with a alias or a list of all
|
This function returns the command associated with a alias or a list of all
|
||||||
alias'.
|
alias'.
|
||||||
|
|
||||||
@param[in] Alias Points to the null-terminated shell alias.
|
@param[in] Alias Points to the NULL-terminated shell alias.
|
||||||
If this parameter is NULL, then all
|
If this parameter is NULL, then all
|
||||||
aliases will be returned in ReturnedData.
|
aliases will be returned in ReturnedData.
|
||||||
@param[out] Volatile Upon return of a single command if TRUE indicates
|
@param[out] Volatile Upon return of a single command if TRUE indicates
|
||||||
this is stored in a volatile fashion. FALSE otherwise.
|
this is stored in a volatile fashion. FALSE otherwise.
|
||||||
@return If Alias is not NULL, it will return a pointer to
|
@return If Alias is not NULL, it will return a pointer to
|
||||||
the null-terminated command for that alias.
|
the NULL-terminated command for that alias.
|
||||||
If Alias is NULL, ReturnedData points to a ';'
|
If Alias is NULL, ReturnedData points to a ';'
|
||||||
delimited list of alias (e.g.
|
delimited list of alias (e.g.
|
||||||
ReturnedData = "dir;del;copy;mfp") that is null-terminated.
|
ReturnedData = "dir;del;copy;mfp") that is NULL-terminated.
|
||||||
@retval NULL An error ocurred.
|
@retval NULL An error ocurred.
|
||||||
@retval NULL Alias was not a valid Alias.
|
@retval NULL Alias was not a valid Alias.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
CONST CHAR16 *
|
CONST CHAR16 *
|
||||||
(EFIAPI *EFI_SHELL_GET_ALIAS)(
|
(EFIAPI *EFI_SHELL_GET_ALIAS)(
|
||||||
IN CONST CHAR16 *Alias,
|
IN CONST CHAR16 *Alias,
|
||||||
|
@ -816,14 +807,14 @@ CONST CHAR16 *
|
||||||
directory on the specified file system.
|
directory on the specified file system.
|
||||||
|
|
||||||
If the current working directory or the current working file system is changed then the
|
If the current working directory or the current working file system is changed then the
|
||||||
%cwd% environment variable will be updated
|
%cwd% environment variable will be updated.
|
||||||
|
|
||||||
@param[in] FileSystem A pointer to the file system's mapped name. If NULL, then the current working
|
@param[in] FileSystem A pointer to the file system's mapped name. If NULL, then the current working
|
||||||
directory is changed.
|
directory is changed.
|
||||||
@param[in] Dir Points to the null-terminated directory on the device specified by FileSystem.
|
@param[in] Dir Points to the NULL-terminated directory on the device specified by FileSystem.
|
||||||
|
|
||||||
@return !=NULL The current directory.
|
|
||||||
@retval NULL Current directory does not exist.
|
@retval NULL Current directory does not exist.
|
||||||
|
@return The current directory.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -842,12 +833,12 @@ EFI_STATUS
|
||||||
variable does not exist and the Value is an empty string, there is no action. If the
|
variable does not exist and the Value is an empty string, there is no action. If the
|
||||||
environment variable does not exist and the Value is a non-empty string, then the
|
environment variable does not exist and the Value is a non-empty string, then the
|
||||||
environment variable is created and assigned the specified value.
|
environment variable is created and assigned the specified value.
|
||||||
|
|
||||||
For a description of volatile and non-volatile environment variables, see UEFI Shell
|
For a description of volatile and non-volatile environment variables, see UEFI Shell
|
||||||
2.0 specification section 3.6.1.
|
2.0 specification section 3.6.1.
|
||||||
|
|
||||||
@param[in] Name Points to the null-terminated environment variable name.
|
@param[in] Name Points to the NULL-terminated environment variable name.
|
||||||
@param[in] Value Points to the null-terminated environment variable value. If the value is an
|
@param[in] Value Points to the NULL-terminated environment variable value. If the value is an
|
||||||
empty string then the environment variable is deleted.
|
empty string then the environment variable is deleted.
|
||||||
@param[in] Volatile Indicates whether the variable is non-volatile (FALSE) or volatile (TRUE).
|
@param[in] Volatile Indicates whether the variable is non-volatile (FALSE) or volatile (TRUE).
|
||||||
|
|
||||||
|
@ -864,9 +855,10 @@ EFI_STATUS
|
||||||
/**
|
/**
|
||||||
Sets the file information to an opened file handle.
|
Sets the file information to an opened file handle.
|
||||||
|
|
||||||
This function changes file information.
|
This function changes file information. All file information in the EFI_FILE_INFO
|
||||||
|
struct will be updated to the passed in data.
|
||||||
|
|
||||||
@param[in] FileHandle A file handle
|
@param[in] FileHandle A file handle.
|
||||||
@param[in] FileInfo Points to new file information.
|
@param[in] FileInfo Points to new file information.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The information was set.
|
@retval EFI_SUCCESS The information was set.
|
||||||
|
@ -912,7 +904,7 @@ EFI_STATUS
|
||||||
|
|
||||||
@param[in] DevicePath Points to the device path. If this is NULL and Mapping points to a valid mapping,
|
@param[in] DevicePath Points to the device path. If this is NULL and Mapping points to a valid mapping,
|
||||||
then the mapping will be deleted.
|
then the mapping will be deleted.
|
||||||
@param[in] Mapping Points to the null-terminated mapping for the device path.
|
@param[in] Mapping Points to the NULL-terminated mapping for the device path.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Mapping created or deleted successfully.
|
@retval EFI_SUCCESS Mapping created or deleted successfully.
|
||||||
@retval EFI_NO_MAPPING There is no handle that corresponds exactly to DevicePath. See the
|
@retval EFI_NO_MAPPING There is no handle that corresponds exactly to DevicePath. See the
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/** @file
|
/** @file
|
||||||
Defines for EFI shell environment 2 ported to EDK II build environment. (no spec)
|
Defines for EFI shell environment 2 ported to EDK II build environment. (no spec)
|
||||||
|
|
||||||
Copyright (c) 2005 - 2010, Intel Corporation<BR>
|
Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
||||||
#if !defined (_SHELL_ENVIRONMENT_2_PROTOCOL_H_)
|
#if !defined (_SHELL_ENVIRONMENT_2_PROTOCOL_H_)
|
||||||
#define _SHELL_ENVIRONMENT_2_PROTOCOL_H_
|
#define _SHELL_ENVIRONMENT_2_PROTOCOL_H_
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@
|
||||||
#define DEFAULT_AUTO_LF FALSE
|
#define DEFAULT_AUTO_LF FALSE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function is a prototype for a function that dumps information on a protocol
|
This function is a prototype for a function that dumps information on a protocol
|
||||||
to a given location. The location is dependant on the implementation. This is
|
to a given location. The location is dependant on the implementation. This is
|
||||||
used when programatically adding shell commands.
|
used when programatically adding shell commands.
|
||||||
|
|
||||||
@param Handle The handle the protocol is on.
|
@param Handle The handle the protocol is on.
|
||||||
|
@ -36,16 +36,16 @@ VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function is a prototype for each command internal to the EFI shell
|
This function is a prototype for each command internal to the EFI shell
|
||||||
implementation. The specific command depends on the implementation. This is
|
implementation. The specific command depends on the implementation. This is
|
||||||
used when programatically adding shell commands.
|
used when programatically adding shell commands.
|
||||||
|
|
||||||
@param ImageHandle The handle to the binary shell.
|
@param ImageHandle The handle to the binary shell.
|
||||||
@param SystemTable Pointer to the system table.
|
@param SystemTable Pointer to the system table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The command ran to completion
|
@retval EFI_SUCCESS The command ran to completion
|
||||||
@retval other An error ocurred. Any error is possible
|
@retval other An error ocurred. Any error is possible
|
||||||
depending on the implementation of the shell
|
depending on the implementation of the shell
|
||||||
command.
|
command.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
@ -57,8 +57,8 @@ EFI_STATUS
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function is a prototype for one that gets a help string for a given command.
|
This function is a prototype for one that gets a help string for a given command.
|
||||||
This is used when programatically adding shell commands. Upon successful return
|
This is used when programatically adding shell commands. Upon successful return
|
||||||
the memory allocated is up to the caller to free.
|
the memory allocated is up to the caller to free.
|
||||||
|
|
||||||
@param Str Pointer to pointer to string to display for help.
|
@param Str Pointer to pointer to string to display for help.
|
||||||
|
@ -76,24 +76,24 @@ EFI_STATUS
|
||||||
Structure returned from functions that open multiple files.
|
Structure returned from functions that open multiple files.
|
||||||
**/
|
**/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT32 Signature; ///< SHELL_FILE_ARG_SIGNATURE
|
UINT32 Signature; ///< SHELL_FILE_ARG_SIGNATURE.
|
||||||
LIST_ENTRY Link; ///< Linked list helper
|
LIST_ENTRY Link; ///< Linked list helper.
|
||||||
EFI_STATUS Status; ///< File's status
|
EFI_STATUS Status; ///< File's status.
|
||||||
|
|
||||||
EFI_FILE_HANDLE Parent; ///< What is the Parent file of this file
|
EFI_FILE_HANDLE Parent; ///< What is the Parent file of this file.
|
||||||
UINT64 OpenMode; ///< How was the file opened
|
UINT64 OpenMode; ///< How was the file opened.
|
||||||
CHAR16 *ParentName; ///< String representation of parent
|
CHAR16 *ParentName; ///< String representation of parent.
|
||||||
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath; ///< DevicePath for Parent
|
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath; ///< DevicePath for Parent.
|
||||||
|
|
||||||
CHAR16 *FullName; ///< Path and file name for this file
|
CHAR16 *FullName; ///< Path and file name for this file.
|
||||||
CHAR16 *FileName; ///< File name for this file
|
CHAR16 *FileName; ///< File name for this file.
|
||||||
|
|
||||||
EFI_FILE_HANDLE Handle; ///< Handle to this file
|
EFI_FILE_HANDLE Handle; ///< Handle to this file.
|
||||||
EFI_FILE_INFO *Info; ///< Pointer to file info for this file
|
EFI_FILE_INFO *Info; ///< Pointer to file info for this file.
|
||||||
} SHELL_FILE_ARG;
|
} SHELL_FILE_ARG;
|
||||||
|
|
||||||
/// Signature for SHELL_FILE_ARG
|
/// Signature for SHELL_FILE_ARG.
|
||||||
#define SHELL_FILE_ARG_SIGNATURE SIGNATURE_32 ('g', 'r', 'a', 'f')
|
#define SHELL_FILE_ARG_SIGNATURE SIGNATURE_32 ('g', 'r', 'a', 'f')
|
||||||
|
|
||||||
/**
|
/**
|
||||||
GUID for the shell environment2 and shell environment.
|
GUID for the shell environment2 and shell environment.
|
||||||
|
@ -115,12 +115,12 @@ GUID for the shell environment2 extension (main GUID above).
|
||||||
#define EFI_SHELL_MINOR_VER 0x00000000 ///< Minor version of the EFI_SHELL_ENVIRONMENT2
|
#define EFI_SHELL_MINOR_VER 0x00000000 ///< Minor version of the EFI_SHELL_ENVIRONMENT2
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Execute a command line
|
Execute a command line.
|
||||||
|
|
||||||
This function will run the CommandLine. This includes loading any required images,
|
This function will run the CommandLine. This includes loading any required images,
|
||||||
parsing any requires scripts, and it DebugOutput is TRUE printing errors
|
parsing any requires scripts, and if DebugOutput is TRUE printing errors
|
||||||
encountered directly to the screen.
|
encountered directly to the screen.
|
||||||
|
|
||||||
@param ParentImageHandle Handle of image executing this operation.
|
@param ParentImageHandle Handle of image executing this operation.
|
||||||
@param CommandLine The string command line to execute.
|
@param CommandLine The string command line to execute.
|
||||||
@param DebugOutput TRUE indicates that errors should be printed directly.
|
@param DebugOutput TRUE indicates that errors should be printed directly.
|
||||||
|
@ -144,15 +144,15 @@ EFI_STATUS
|
||||||
/**
|
/**
|
||||||
This function returns a shell environment variable value.
|
This function returns a shell environment variable value.
|
||||||
|
|
||||||
@param Name Pointer to the string with the shell environment
|
@param Name Pointer to the string with the shell environment
|
||||||
variable name.
|
variable name.
|
||||||
|
|
||||||
@retval NULL The shell environment variable's value could not be found.
|
@retval NULL The shell environment variable's value could not be found.
|
||||||
@retval !NULL The value of the shell environment variable Name.
|
@retval !=NULL The value of the shell environment variable Name.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
CHAR16 *
|
CHAR16 *
|
||||||
(EFIAPI *SHELLENV_GET_ENV) (
|
(EFIAPI *SHELLENV_GET_ENV) (
|
||||||
IN CHAR16 *Name
|
IN CHAR16 *Name
|
||||||
);
|
);
|
||||||
|
@ -160,15 +160,15 @@ CHAR16 *
|
||||||
/**
|
/**
|
||||||
This function returns a shell environment map value.
|
This function returns a shell environment map value.
|
||||||
|
|
||||||
@param Name Pointer to the string with the shell environment
|
@param Name Pointer to the string with the shell environment
|
||||||
map name.
|
map name.
|
||||||
|
|
||||||
@retval NULL The shell environment map's value could not be found.
|
@retval NULL The shell environment map's value could not be found.
|
||||||
@retval !NULL The value of the shell environment map Name.
|
@retval !=NULL The value of the shell environment map Name.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
CHAR16 *
|
CHAR16 *
|
||||||
(EFIAPI *SHELLENV_GET_MAP) (
|
(EFIAPI *SHELLENV_GET_MAP) (
|
||||||
IN CHAR16 *Name
|
IN CHAR16 *Name
|
||||||
);
|
);
|
||||||
|
@ -180,7 +180,7 @@ CHAR16 *
|
||||||
list in the correct location.
|
list in the correct location.
|
||||||
|
|
||||||
@param Handler The handler function to call when the command gets called.
|
@param Handler The handler function to call when the command gets called.
|
||||||
@param CmdStr The command name.
|
@param Cmd The command name.
|
||||||
@param GetLineHelp Function to call of get help for this command.
|
@param GetLineHelp Function to call of get help for this command.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The command is now part of the command list.
|
@retval EFI_SUCCESS The command is now part of the command list.
|
||||||
|
@ -203,11 +203,10 @@ EFI_STATUS
|
||||||
This will get the current protocol info and add the new info or update existing info
|
This will get the current protocol info and add the new info or update existing info
|
||||||
and then resave the info.
|
and then resave the info.
|
||||||
|
|
||||||
@param SaveId Save this change as an EFI variable.
|
@param Protocol Pointer to the protocol's GUID.
|
||||||
@param Protocol The protocol's GUID.
|
@param DumpToken The function pointer to dump token function or
|
||||||
@param DumpToken The function pointer to dump token function or
|
|
||||||
NULL.
|
NULL.
|
||||||
@param DumpInfo The function pointer to dump infomation function
|
@param DumpInfo The function pointer to dump infomation function
|
||||||
or NULL.
|
or NULL.
|
||||||
@param IdString The english name of the protocol.
|
@param IdString The english name of the protocol.
|
||||||
**/
|
**/
|
||||||
|
@ -221,10 +220,10 @@ VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function finds a protocol handle by a GUID.
|
This function finds a protocol handle by a GUID.
|
||||||
|
|
||||||
This function will check for already known protocols by GUID and if one is
|
This function will check for already known protocols by GUID and if one is
|
||||||
found it will return the name of that protocol. If no name is found and
|
found it will return the name of that protocol. If no name is found and
|
||||||
GenId is TRUE it will generate ths string.
|
GenId is TRUE it will generate ths string.
|
||||||
|
|
||||||
@param Protocol The GUID of the protocol to look for.
|
@param Protocol The GUID of the protocol to look for.
|
||||||
|
@ -233,45 +232,46 @@ VOID
|
||||||
@return !NULL The Name of the protocol.
|
@return !NULL The Name of the protocol.
|
||||||
@retval NULL The Name was not found and GenId was not TRUE.
|
@retval NULL The Name was not found and GenId was not TRUE.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
CHAR16*
|
CHAR16*
|
||||||
(EFIAPI *SHELLENV_GET_PROT) (
|
(EFIAPI *SHELLENV_GET_PROT) (
|
||||||
IN EFI_GUID *Protocol,
|
IN EFI_GUID *Protocol,
|
||||||
IN BOOLEAN GenId
|
IN BOOLEAN GenId
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function returns the current directory on a given device.
|
This function returns a string array containing the current directory on
|
||||||
|
a given device.
|
||||||
|
|
||||||
If DeviceName is specified, then return the current shell directory on that
|
If DeviceName is specified, then return the current shell directory on that
|
||||||
device. If DeviceName is NULL, then return the current directory on the
|
device. If DeviceName is NULL, then return the current directory on the
|
||||||
current device. The caller us responsible to free the returned string when
|
current device. The caller us responsible to free the returned string when
|
||||||
no londer required.
|
no londer required.
|
||||||
|
|
||||||
@param DeviceName The name of the device to get the current
|
@param DeviceName The name of the device to get the current
|
||||||
directory on or NULL for current device.
|
directory on or NULL for current device.
|
||||||
|
|
||||||
@return The current directory on the current or specified device.
|
@return String array with the current directory on the current or specified device.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
CHAR16*
|
CHAR16*
|
||||||
(EFIAPI *SHELLENV_CUR_DIR) (
|
(EFIAPI *SHELLENV_CUR_DIR) (
|
||||||
IN CHAR16 *DeviceName OPTIONAL
|
IN CHAR16 *DeviceName OPTIONAL
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function will open a group of files that match the Arg path, including
|
This function will open a group of files that match the Arg path, including
|
||||||
support for wildcard characters ('?' and '*') in the Arg path. If there are
|
support for wildcard characters ('?' and '*') in the Arg path. If there are
|
||||||
any wildcard characters in the path this function will find any and all files
|
any wildcard characters in the path this function will find any and all files
|
||||||
that match the wildcards. The return is a double linked list based on the
|
that match the wildcards. It returns a double linked list based on the
|
||||||
LIST_ENTRY linked list structure. Use this in conjunction with the
|
LIST_ENTRY linked list structure. Use this in conjunction with the
|
||||||
SHELL_FILE_ARG_SIGNATURE to get the SHELL_FILE_ARG structures that are returned.
|
SHELL_FILE_ARG_SIGNATURE to get the SHELL_FILE_ARG structures that are returned.
|
||||||
The memory allocated by the callee for this list is freed by making a call to
|
The memory allocated by the callee for this list is freed by making a call to
|
||||||
SHELLENV_FREE_FILE_LIST.
|
SHELLENV_FREE_FILE_LIST.
|
||||||
|
|
||||||
@param Arg Pointer Path to files to open.
|
@param Arg Pointer Path to files to open.
|
||||||
@param ListHead Pointer to allocated and initialized list head
|
@param ListHead Pointer to allocated and initialized list head
|
||||||
upon which to append all the opened file structures.
|
upon which to append all the opened file structures.
|
||||||
|
|
||||||
@retval EFI_SUCCESS 1 or more files was opened and a struct of each file's
|
@retval EFI_SUCCESS 1 or more files was opened and a struct of each file's
|
||||||
|
@ -291,7 +291,7 @@ EFI_STATUS
|
||||||
|
|
||||||
@param ListHead Pointer to list to free all nodes of.
|
@param ListHead Pointer to list to free all nodes of.
|
||||||
|
|
||||||
@retval EFI_SUCCESS always returned.
|
@retval EFI_SUCCESS Always returned.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
@ -300,21 +300,21 @@ EFI_STATUS
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function creates a new instance of the ShellInterface protocol for use on
|
This function creates a new instance of the ShellInterface protocol for use on
|
||||||
the ImageHandle.
|
the ImageHandle.
|
||||||
|
|
||||||
This function is for internal shell usage. This will allocate and then populate
|
This function is for internal shell usage. This will allocate and then populate
|
||||||
EFI_SHELL_INTERFACE protocol. It is the caller's responsibility to free the
|
EFI_SHELL_INTERFACE protocol. It is the caller's responsibility to free the
|
||||||
memory.
|
memory.
|
||||||
|
|
||||||
@param ImageHandle The handle which will use the new ShellInterface
|
@param ImageHandle The handle which will use the new ShellInterface
|
||||||
protocol.
|
protocol.
|
||||||
|
|
||||||
@return the newly allocated shell interface protocol.
|
@return the newly allocated shell interface protocol.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
EFI_SHELL_INTERFACE*
|
EFI_SHELL_INTERFACE*
|
||||||
(EFIAPI *SHELLENV_NEW_SHELL) (
|
(EFIAPI *SHELLENV_NEW_SHELL) (
|
||||||
IN EFI_HANDLE ImageHandle
|
IN EFI_HANDLE ImageHandle
|
||||||
);
|
);
|
||||||
|
@ -322,8 +322,8 @@ EFI_SHELL_INTERFACE*
|
||||||
/**
|
/**
|
||||||
This function determins whether a script file is currently being processed.
|
This function determins whether a script file is currently being processed.
|
||||||
|
|
||||||
A script file (.nsh file) can contain a series of commands and this is useful to
|
A script file (.nsh file) can contain a series of commands and this is useful to
|
||||||
know for some shell commands whether they are being run manually or as part of a
|
know for some shell commands whether they are being run manually or as part of a
|
||||||
script.
|
script.
|
||||||
|
|
||||||
@retval TRUE A script file is being processed.
|
@retval TRUE A script file is being processed.
|
||||||
|
@ -336,7 +336,7 @@ BOOLEAN
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This is an internal shell function to free any and all allocated resources.
|
This is an internal shell function to free any and all allocated resources.
|
||||||
This should be called just closing the shell.
|
This should be called just closing the shell.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -348,9 +348,9 @@ VOID
|
||||||
/**
|
/**
|
||||||
This function enables the page break mode.
|
This function enables the page break mode.
|
||||||
|
|
||||||
This mode causes the output to pause after each complete screen to enable a
|
This mode causes the output to pause after each complete screen to enable a
|
||||||
user to more easily read it. If AutoWrap is TRUE then rows with too many
|
user to more easily read it. If AutoWrap is TRUE then rows with too many
|
||||||
characters will be chopped and divided into 2 rows. If FALSE then rows with
|
characters will be chopped and divided into 2 rows. If FALSE then rows with
|
||||||
too many characters may not be fully visible to the user on the screen.
|
too many characters may not be fully visible to the user on the screen.
|
||||||
|
|
||||||
@param StartRow The row number to start this on.
|
@param StartRow The row number to start this on.
|
||||||
|
@ -366,7 +366,7 @@ VOID
|
||||||
/**
|
/**
|
||||||
This function disables the page break mode.
|
This function disables the page break mode.
|
||||||
|
|
||||||
Tisabling this causes the output to print out exactly as coded with no breaks
|
Tisabling this causes the output to print out exactly as coded with no breaks
|
||||||
for readability.
|
for readability.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -388,7 +388,7 @@ BOOLEAN
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function sets the keys to filter for for the console in. The valid
|
This function sets the keys to filter for for the console in. The valid
|
||||||
values to set are:
|
values to set are:
|
||||||
|
|
||||||
#define EFI_OUTPUT_SCROLL 0x00000001
|
#define EFI_OUTPUT_SCROLL 0x00000001
|
||||||
|
@ -404,7 +404,7 @@ VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function gets the keys to filter for for the console in.
|
This function gets the keys to filter for for the console in.
|
||||||
|
|
||||||
The valid values to get are:
|
The valid values to get are:
|
||||||
#define EFI_OUTPUT_SCROLL 0x00000001
|
#define EFI_OUTPUT_SCROLL 0x00000001
|
||||||
|
@ -422,10 +422,10 @@ UINT32
|
||||||
/**
|
/**
|
||||||
This function determins if the shell application should break.
|
This function determins if the shell application should break.
|
||||||
|
|
||||||
This is used to inform a shell application that a break condition has been
|
This is used to inform a shell application that a break condition has been
|
||||||
initiated. Long loops should check this to prevent delays to the break.
|
initiated. Long loops should check this to prevent delays to the break.
|
||||||
|
|
||||||
@retval TRUE A break has been signaled. the application
|
@retval TRUE A break has been signaled. the application
|
||||||
should exit with EFI_ABORTED as soon as possible.
|
should exit with EFI_ABORTED as soon as possible.
|
||||||
@retval FALSE Continue as normal.
|
@retval FALSE Continue as normal.
|
||||||
**/
|
**/
|
||||||
|
@ -470,14 +470,14 @@ BOOLEAN
|
||||||
/**
|
/**
|
||||||
Close the console proxy to restore the original console.
|
Close the console proxy to restore the original console.
|
||||||
|
|
||||||
This is an internal shell function to handle shell cascading. It restores the
|
This is an internal shell function to handle shell cascading. It restores the
|
||||||
original set of console protocols.
|
original set of console protocols.
|
||||||
|
|
||||||
@param ConInHandle The handle of ConIn.
|
@param ConInHandle The handle of ConIn.
|
||||||
@param ConIn Pointer to the location to return the pointer to
|
@param ConIn Pointer to the location to return the pointer to
|
||||||
the original console input.
|
the original console input.
|
||||||
@param ConOutHandle The handle of ConOut
|
@param ConOutHandle The handle of ConOut
|
||||||
@param ConOut Pointer to the location to return the pointer to
|
@param ConOut Pointer to the location to return the pointer to
|
||||||
the original console output.
|
the original console output.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -494,7 +494,7 @@ VOID
|
||||||
//
|
//
|
||||||
/**
|
/**
|
||||||
For ease of use the shell maps handle #'s to short numbers.
|
For ease of use the shell maps handle #'s to short numbers.
|
||||||
This is only done on request for various internal commands and the references
|
This is only done on request for various internal commands and the references
|
||||||
are immediately freed when the internal command completes.
|
are immediately freed when the internal command completes.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -506,8 +506,8 @@ VOID
|
||||||
/**
|
/**
|
||||||
This is an internal shell function to enumerate the handle database.
|
This is an internal shell function to enumerate the handle database.
|
||||||
|
|
||||||
This function gets the next handle in the handle database. If no handles are
|
This function gets the next handle in the handle database. If no handles are
|
||||||
found EFI_NOT_FOUND is returned. If the previous Handle was the last handle
|
found EFI_NOT_FOUND is returned. If the previous Handle was the last handle
|
||||||
it is set to NULL before returning.
|
it is set to NULL before returning.
|
||||||
|
|
||||||
This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.
|
This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.
|
||||||
|
@ -527,8 +527,8 @@ EFI_STATUS
|
||||||
/**
|
/**
|
||||||
This is an internal shell function to enumerate the handle database.
|
This is an internal shell function to enumerate the handle database.
|
||||||
|
|
||||||
This function skips the next SkipNum handles in the handle database. If there
|
This function skips the next SkipNum handles in the handle database. If there
|
||||||
are not enough handles left to skip that many EFI_ACCESS_DENIED is returned and
|
are not enough handles left to skip that many EFI_ACCESS_DENIED is returned and
|
||||||
no skip is performed.
|
no skip is performed.
|
||||||
|
|
||||||
This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.
|
This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.
|
||||||
|
@ -547,9 +547,9 @@ EFI_STATUS
|
||||||
/**
|
/**
|
||||||
This is an internal shell function to enumerate the handle database.
|
This is an internal shell function to enumerate the handle database.
|
||||||
|
|
||||||
This function resets the the handle database so that NEXT_HANDLE and SKIP_HANDLE
|
This function resets the the handle database so that NEXT_HANDLE and SKIP_HANDLE
|
||||||
will start from EnumIndex on the next call.
|
will start from EnumIndex on the next call.
|
||||||
|
|
||||||
This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.
|
This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.
|
||||||
|
|
||||||
@param EnumIndex Where to start.
|
@param EnumIndex Where to start.
|
||||||
|
@ -564,11 +564,11 @@ UINTN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This is an internal shell function to enumerate the handle database.
|
This is an internal shell function to enumerate the handle database.
|
||||||
|
|
||||||
This must be called after INIT_HANDLE_ENUMERATOR.
|
This must be called after INIT_HANDLE_ENUMERATOR.
|
||||||
|
|
||||||
This function releases all memory and resources associated with the handle database.
|
This function releases all memory and resources associated with the handle database.
|
||||||
Tfter this no other handle enumerator functions except INIT_HANDLE_ENUMERATOR will
|
Tfter this no other handle enumerator functions except INIT_HANDLE_ENUMERATOR will
|
||||||
function properly.
|
function properly.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -581,7 +581,7 @@ VOID
|
||||||
This is an internal shell function to enumerate the handle database.
|
This is an internal shell function to enumerate the handle database.
|
||||||
|
|
||||||
This function returns the number of handles in the handle database.
|
This function returns the number of handles in the handle database.
|
||||||
|
|
||||||
This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.
|
This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.
|
||||||
|
|
||||||
@return the number of handles in the handle database.
|
@return the number of handles in the handle database.
|
||||||
|
@ -636,7 +636,7 @@ typedef struct {
|
||||||
/**
|
/**
|
||||||
This is an internal shell function to initialize the protocol enumerator.
|
This is an internal shell function to initialize the protocol enumerator.
|
||||||
|
|
||||||
This must be called before NEXT_PROTOCOL_INFO, SKIP_PROTOCOL_INFO,
|
This must be called before NEXT_PROTOCOL_INFO, SKIP_PROTOCOL_INFO,
|
||||||
RESET_PROTOCOL_INFO_ENUMERATOR, and CLOSE_PROTOCOL_INFO_ENUMERATOR are
|
RESET_PROTOCOL_INFO_ENUMERATOR, and CLOSE_PROTOCOL_INFO_ENUMERATOR are
|
||||||
called.
|
called.
|
||||||
**/
|
**/
|
||||||
|
@ -647,13 +647,13 @@ VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function is an internal shell function for enumeration of protocols.
|
This function is an internal shell function for enumeration of protocols.
|
||||||
|
|
||||||
This functiol will return the next protocol in the list. If this is called
|
This functiol will return the next protocol in the list. If this is called
|
||||||
immediately after initialization it will return the first. If this is called
|
immediately after initialization it will return the first. If this is called
|
||||||
immediately after reset it will return the protocol first again.
|
immediately after reset it will return the protocol first again.
|
||||||
|
|
||||||
This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be
|
This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be
|
||||||
called after INIT_PROTOCOL_INFO_ENUMERATOR.
|
called after INIT_PROTOCOL_INFO_ENUMERATOR.
|
||||||
|
|
||||||
@param ProtocolInfo Pointer to pointer to protocol information structure.
|
@param ProtocolInfo Pointer to pointer to protocol information structure.
|
||||||
|
@ -668,9 +668,9 @@ EFI_STATUS
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function is an internal shell function for enumeration of protocols.
|
This function is an internal shell function for enumeration of protocols.
|
||||||
|
|
||||||
This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be
|
This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be
|
||||||
called after INIT_PROTOCOL_INFO_ENUMERATOR.
|
called after INIT_PROTOCOL_INFO_ENUMERATOR.
|
||||||
|
|
||||||
This function does nothing and always returns EFI_SUCCESS.
|
This function does nothing and always returns EFI_SUCCESS.
|
||||||
|
@ -684,12 +684,12 @@ EFI_STATUS
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function is an internal shell function for enumeration of protocols.
|
This function is an internal shell function for enumeration of protocols.
|
||||||
|
|
||||||
This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be
|
This cannot be called after CLOSE_PROTOCOL_INFO_ENUMERATOR, but it must be
|
||||||
called after INIT_PROTOCOL_INFO_ENUMERATOR.
|
called after INIT_PROTOCOL_INFO_ENUMERATOR.
|
||||||
|
|
||||||
This function resets the list of protocols such that the next one in the
|
This function resets the list of protocols such that the next one in the
|
||||||
list is the begining of the list.
|
list is the begining of the list.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
|
@ -700,7 +700,7 @@ VOID
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function is an internal shell function for enumeration of protocols.
|
This function is an internal shell function for enumeration of protocols.
|
||||||
|
|
||||||
This must be called after INIT_PROTOCOL_INFO_ENUMERATOR. After this call
|
This must be called after INIT_PROTOCOL_INFO_ENUMERATOR. After this call
|
||||||
no protocol enumerator calls except INIT_PROTOCOL_INFO_ENUMERATOR may be made.
|
no protocol enumerator calls except INIT_PROTOCOL_INFO_ENUMERATOR may be made.
|
||||||
|
@ -726,22 +726,22 @@ typedef struct {
|
||||||
} PROTOCOL_INFO_ENUMERATOR;
|
} PROTOCOL_INFO_ENUMERATOR;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function is used to retrieve a user-friendly display name for a handle.
|
This function is used to retrieve a user-friendly display name for a handle.
|
||||||
|
|
||||||
If UseComponentName is TRUE then the component name protocol for this device
|
If UseComponentName is TRUE then the component name protocol for this device
|
||||||
or it's parent device (if required) will be used to obtain the name of the
|
or it's parent device (if required) will be used to obtain the name of the
|
||||||
device. If UseDevicePath is TRUE it will get the human readable device path
|
device. If UseDevicePath is TRUE it will get the human readable device path
|
||||||
and return that. If both are TRUE it will try to use component name first
|
and return that. If both are TRUE it will try to use component name first
|
||||||
and device path if that fails.
|
and device path if that fails.
|
||||||
|
|
||||||
It will use either ComponentName or ComponentName2 protocol, depending on
|
It will use either ComponentName or ComponentName2 protocol, depending on
|
||||||
what is present.
|
what is present.
|
||||||
|
|
||||||
This function will furthur verify whether the handle in question produced either
|
This function will furthur verify whether the handle in question produced either
|
||||||
EFI_DRIVER_CONFIGRATION_PROTOCOL or EFI_DRIVER_CONFIGURATION2_PROTOCOL and also
|
EFI_DRIVER_CONFIGRATION_PROTOCOL or EFI_DRIVER_CONFIGURATION2_PROTOCOL and also
|
||||||
whether the handle in question produced either EFI_DRIVER_DIAGNOSTICS_PROTOCOL or
|
whether the handle in question produced either EFI_DRIVER_DIAGNOSTICS_PROTOCOL or
|
||||||
EFI_DRIVER_DIAGNOSTICS2_PROTOCOL.
|
EFI_DRIVER_DIAGNOSTICS2_PROTOCOL.
|
||||||
|
|
||||||
Upon sucessful return the memory for *BestDeviceName is up to the caller to free.
|
Upon sucessful return the memory for *BestDeviceName is up to the caller to free.
|
||||||
|
|
||||||
@param DeviceHandle The device handle whose name is desired.
|
@param DeviceHandle The device handle whose name is desired.
|
||||||
|
@ -774,10 +774,10 @@ EFI_STATUS
|
||||||
#define EFI_SHELL_ENHANCED_MODE_VER L"1.1.2" ///< string for highest version this shell supports
|
#define EFI_SHELL_ENHANCED_MODE_VER L"1.1.2" ///< string for highest version this shell supports
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function gets the shell mode as stored in the shell environment
|
This function gets the shell mode as stored in the shell environment
|
||||||
"efishellmode". It will not fail.
|
"efishellmode". It will not fail.
|
||||||
|
|
||||||
@param Mode Returns a string representing one of the
|
@param Mode Returns a string representing one of the
|
||||||
2 supported modes of the shell.
|
2 supported modes of the shell.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This function always returns success.
|
@retval EFI_SUCCESS This function always returns success.
|
||||||
|
@ -792,17 +792,17 @@ EFI_STATUS
|
||||||
Convert a file system style name to a device path.
|
Convert a file system style name to a device path.
|
||||||
|
|
||||||
This function will convert a shell path name to a Device Path Protocol path.
|
This function will convert a shell path name to a Device Path Protocol path.
|
||||||
This function will allocate any required memory for this operation and it
|
This function will allocate any required memory for this operation and it
|
||||||
is the responsibility of the caller to free that memory when no longer required.
|
is the responsibility of the caller to free that memory when no longer required.
|
||||||
|
|
||||||
If anything prevents the complete conversion free any allocated memory and
|
If anything prevents the complete conversion free any allocated memory and
|
||||||
return NULL.
|
return NULL.
|
||||||
|
|
||||||
@retval !NULL A pointer to the callee allocated Device Path.
|
@retval !NULL A pointer to the callee allocated Device Path.
|
||||||
@retval NULL The operation could not be completed.
|
@retval NULL The operation could not be completed.
|
||||||
**/
|
**/
|
||||||
typedef
|
typedef
|
||||||
EFI_DEVICE_PATH_PROTOCOL*
|
EFI_DEVICE_PATH_PROTOCOL*
|
||||||
(EFIAPI *SHELLENV_NAME_TO_PATH) (
|
(EFIAPI *SHELLENV_NAME_TO_PATH) (
|
||||||
IN CHAR16 *Path
|
IN CHAR16 *Path
|
||||||
);
|
);
|
||||||
|
@ -813,19 +813,19 @@ EFI_DEVICE_PATH_PROTOCOL*
|
||||||
If DevPath is NULL, then ASSERT.
|
If DevPath is NULL, then ASSERT.
|
||||||
|
|
||||||
This function looks through the shell environment map for a map whose device
|
This function looks through the shell environment map for a map whose device
|
||||||
path matches the DevPath parameter. If one is found the Name is returned via
|
path matches the DevPath parameter. If one is found the Name is returned via
|
||||||
Name parameter. If sucessful the caller must free the memory allocated for
|
Name parameter. If sucessful the caller must free the memory allocated for
|
||||||
Name.
|
Name.
|
||||||
|
|
||||||
This function will use the internal lock to prevent changes to the map during
|
This function will use the internal lock to prevent changes to the map during
|
||||||
the lookup operation.
|
the lookup operation.
|
||||||
|
|
||||||
@param DevPath The device path to search for a name for.
|
@param DevPath The device path to search for a name for.
|
||||||
@param ConsistMapping What state to verify map flag VAR_ID_CONSIST.
|
@param ConsistMapping What state to verify map flag VAR_ID_CONSIST.
|
||||||
@param Name On sucessful return the name of that device path.
|
@param Name On sucessful return the name of that device path.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The DevPath was found and the name returned
|
@retval EFI_SUCCESS The DevPath was found and the name returned
|
||||||
in Name.
|
in Name.
|
||||||
@retval EFI_OUT_OF_RESOURCES A required memory allocation failed.
|
@retval EFI_OUT_OF_RESOURCES A required memory allocation failed.
|
||||||
@retval EFI_UNSUPPORTED The DevPath was not found in the map.
|
@retval EFI_UNSUPPORTED The DevPath was not found in the map.
|
||||||
**/
|
**/
|
||||||
|
@ -838,17 +838,17 @@ EFI_STATUS
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function will open a group of files that match the Arg path, but will not
|
This function will open a group of files that match the Arg path, but will not
|
||||||
support the wildcard characters ('?' and '*') in the Arg path. If there are
|
support the wildcard characters ('?' and '*') in the Arg path. If there are
|
||||||
any wildcard characters in the path this function will return
|
any wildcard characters in the path this function will return
|
||||||
EFI_INVALID_PARAMETER. The return is a double linked list based on the
|
EFI_INVALID_PARAMETER. The return is a double linked list based on the
|
||||||
LIST_ENTRY linked list structure. Use this in conjunction with the
|
LIST_ENTRY linked list structure. Use this in conjunction with the
|
||||||
SHELL_FILE_ARG_SIGNATURE to get the SHELL_FILE_ARG structures that are returned.
|
SHELL_FILE_ARG_SIGNATURE to get the SHELL_FILE_ARG structures that are returned.
|
||||||
The memory allocated by the callee for this list is freed by making a call to
|
The memory allocated by the callee for this list is freed by making a call to
|
||||||
SHELLENV_FREE_FILE_LIST.
|
SHELLENV_FREE_FILE_LIST.
|
||||||
|
|
||||||
@param Arg Pointer Path to files to open.
|
@param Arg Pointer Path to files to open.
|
||||||
@param ListHead Pointer to allocated and initialized list head
|
@param ListHead Pointer to allocated and initialized list head
|
||||||
upon which to append all the opened file structures.
|
upon which to append all the opened file structures.
|
||||||
|
|
||||||
@retval EFI_SUCCESS 1 or more files was opened and a struct of each file's
|
@retval EFI_SUCCESS 1 or more files was opened and a struct of each file's
|
||||||
|
@ -867,12 +867,12 @@ EFI_STATUS
|
||||||
/**
|
/**
|
||||||
This function removes duplicate file listings from lists.
|
This function removes duplicate file listings from lists.
|
||||||
|
|
||||||
This is a function for use with SHELLENV_FILE_META_ARG_NO_WILDCARD and
|
This is a function for use with SHELLENV_FILE_META_ARG_NO_WILDCARD and
|
||||||
SHELLENV_FILE_META_ARG. This function will verify that there are no duplicate
|
SHELLENV_FILE_META_ARG. This function will verify that there are no duplicate
|
||||||
files in the list of returned files. Any file listed twice will have one of its
|
files in the list of returned files. Any file listed twice will have one of its
|
||||||
instances removed.
|
instances removed.
|
||||||
|
|
||||||
@param ListHead Pointer to linked list head that was returned from
|
@param ListHead Pointer to linked list head that was returned from
|
||||||
SHELLENV_FILE_META_ARG_NO_WILDCARD or
|
SHELLENV_FILE_META_ARG_NO_WILDCARD or
|
||||||
SHELLENV_FILE_META_ARG.
|
SHELLENV_FILE_META_ARG.
|
||||||
|
|
||||||
|
@ -890,20 +890,20 @@ EFI_STATUS
|
||||||
|
|
||||||
if DevPath is NULL, then ASSERT().
|
if DevPath is NULL, then ASSERT().
|
||||||
|
|
||||||
This function looks through the shell environment map for a map whose Name
|
This function looks through the shell environment map for a map whose Name
|
||||||
matches the Name parameter. If one is found the device path pointer is
|
matches the Name parameter. If one is found the device path pointer is
|
||||||
updated to point to that file systems device path. The caller should not
|
updated to point to that file systems device path. The caller should not
|
||||||
free the memory from that device path.
|
free the memory from that device path.
|
||||||
|
|
||||||
This function will use the internal lock to prevent changes to the map during
|
This function will use the internal lock to prevent changes to the map during
|
||||||
the lookup operation.
|
the lookup operation.
|
||||||
|
|
||||||
@param Name Pointer to NULL terminated UNICODE string of the
|
@param Name Pointer to NULL terminated UNICODE string of the
|
||||||
file system name.
|
file system name.
|
||||||
@param DevPath Pointer to pointer to DevicePath. only valid on
|
@param DevPath Pointer to pointer to DevicePath. only valid on
|
||||||
OUT if sucessful.
|
OUT if sucessful.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The conversion was successful and the device
|
@retval EFI_SUCCESS The conversion was successful and the device
|
||||||
path was returned.
|
path was returned.
|
||||||
@retval EFI_NOT_FOUND The file system could not be found in the map.
|
@retval EFI_NOT_FOUND The file system could not be found in the map.
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -11,15 +11,15 @@
|
||||||
The shell interface's and data (including ConIo) are only valid during
|
The shell interface's and data (including ConIo) are only valid during
|
||||||
the applications Entry Point. Once the application returns from it's
|
the applications Entry Point. Once the application returns from it's
|
||||||
entry point the data is freed by the invoking shell.
|
entry point the data is freed by the invoking shell.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation
|
|
||||||
All rights reserved. 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
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
/** @file
|
/** @file
|
||||||
EFI Shell protocol as defined in the UEFI Shell 2.0 specification.
|
EFI Shell protocol as defined in the UEFI Shell 2.0 specification.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2009, Intel Corporation
|
|
||||||
All rights reserved. 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
|
|
||||||
http://opensource.org/licenses/bsd-license.php
|
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
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
|
||||||
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
typedef struct _EFI_SHELL_PARAMETERS_PROTOCOL {
|
typedef struct _EFI_SHELL_PARAMETERS_PROTOCOL {
|
||||||
///
|
///
|
||||||
/// Points to an Argc-element array of points to null-terminated strings containing
|
/// Points to an Argc-element array of points to NULL-terminated strings containing
|
||||||
/// the command-line parameters. The first entry in the array is always the full file
|
/// the command-line parameters. The first entry in the array is always the full file
|
||||||
/// path of the executable. Any quotation marks that were used to preserve
|
/// path of the executable. Any quotation marks that were used to preserve
|
||||||
/// whitespace have been removed.
|
/// whitespace have been removed.
|
||||||
|
@ -31,7 +31,7 @@ typedef struct _EFI_SHELL_PARAMETERS_PROTOCOL {
|
||||||
|
|
||||||
///
|
///
|
||||||
/// The number of elements in the Argv array.
|
/// The number of elements in the Argv array.
|
||||||
///
|
///
|
||||||
UINTN Argc;
|
UINTN Argc;
|
||||||
|
|
||||||
///
|
///
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
/** @file
|
/** @file
|
||||||
Root include file for Shell Package modules that utilize the SHELL_RETURN type
|
Root include file for Shell Package modules that utilize the SHELL_RETURN type
|
||||||
|
|
||||||
Copyright (c), 2009, Intel Corporation<BR>
|
Copyright (c) 2009-2010, Intel Corporation.All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ SHELL_WRITE_PROTECTED = 8,
|
||||||
SHELL_OUT_OF_RESOURCES = 9,
|
SHELL_OUT_OF_RESOURCES = 9,
|
||||||
|
|
||||||
///
|
///
|
||||||
/// An inconsistency was detected on the file system causing the
|
/// An inconsistency was detected on the file system causing the
|
||||||
/// operation to fail.
|
/// operation to fail.
|
||||||
///
|
///
|
||||||
SHELL_VOLUME_CORRUPTED = 10,
|
SHELL_VOLUME_CORRUPTED = 10,
|
||||||
|
@ -81,7 +81,7 @@ SHELL_VOLUME_CORRUPTED = 10,
|
||||||
SHELL_VOLUME_FULL = 11,
|
SHELL_VOLUME_FULL = 11,
|
||||||
|
|
||||||
///
|
///
|
||||||
/// The device does not contain any medium to perform the
|
/// The device does not contain any medium to perform the
|
||||||
/// operation.
|
/// operation.
|
||||||
///
|
///
|
||||||
SHELL_NO_MEDIA = 12,
|
SHELL_NO_MEDIA = 12,
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#/** @file
|
#/** @file
|
||||||
# Provides interface to shell functionality for shell commands and applications.
|
# Provides interface to shell functionality for shell commands and applications.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006 - 2009, Intel Corporation.
|
# Copyright (c) 2006 - 2010, Intel Corporation.All rights reserved. <BR>
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiSimpleFileSystemProtocolGuid # ALWAYS_USED
|
gEfiSimpleFileSystemProtocolGuid # ALWAYS_USED
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiFileInfoGuid # ALWAYS_CONSUMED
|
gEfiFileInfoGuid # ALWAYS_CONSUMED
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
/** @file
|
/** @file
|
||||||
Library used for sorting routines.
|
Library used for sorting routines.
|
||||||
|
|
||||||
Copyright (c) 2009, Intel Corporation<BR>
|
Copyright (c) 2009-2010, Intel Corporation. All rights reserved. <BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -18,11 +18,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/SortLib.h>
|
#include <Library/SortLib.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Worker function for QuickSorting. This function is identical to PerformQuickSort,
|
Worker function for QuickSorting. This function is identical to PerformQuickSort,
|
||||||
except that is uses the pre-allocated buffer so the in place sorting does not need to
|
except that is uses the pre-allocated buffer so the in place sorting does not need to
|
||||||
allocate and free buffers constantly.
|
allocate and free buffers constantly.
|
||||||
|
|
||||||
Each element must be equal sized.
|
Each element must be equal sized.
|
||||||
|
@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
on return a buffer of sorted elements
|
on return a buffer of sorted elements
|
||||||
@param[in] Count the number of elements in the buffer to sort
|
@param[in] Count the number of elements in the buffer to sort
|
||||||
@param[in] ElementSize Size of an element in bytes
|
@param[in] ElementSize Size of an element in bytes
|
||||||
@param[in] CompareFunction The function to call to perform the comparison
|
@param[in] CompareFunction The function to call to perform the comparison
|
||||||
of any 2 elements
|
of any 2 elements
|
||||||
@param[in] Buffer Buffer of size ElementSize for use in swapping
|
@param[in] Buffer Buffer of size ElementSize for use in swapping
|
||||||
**/
|
**/
|
||||||
|
@ -60,7 +60,7 @@ QuickSortWorker (
|
||||||
ASSERT(CompareFunction != NULL);
|
ASSERT(CompareFunction != NULL);
|
||||||
ASSERT(Buffer != NULL);
|
ASSERT(Buffer != NULL);
|
||||||
|
|
||||||
if ( Count < 2
|
if ( Count < 2
|
||||||
|| ElementSize < 1
|
|| ElementSize < 1
|
||||||
){
|
){
|
||||||
return;
|
return;
|
||||||
|
@ -78,7 +78,7 @@ QuickSortWorker (
|
||||||
// and everything "right" are above it
|
// and everything "right" are above it
|
||||||
//
|
//
|
||||||
for ( LoopCount = 0
|
for ( LoopCount = 0
|
||||||
; LoopCount < Count -1
|
; LoopCount < Count -1
|
||||||
; LoopCount++
|
; LoopCount++
|
||||||
){
|
){
|
||||||
//
|
//
|
||||||
|
@ -86,7 +86,7 @@ QuickSortWorker (
|
||||||
//
|
//
|
||||||
if (CompareFunction((VOID*)((UINT8*)BufferToSort+((LoopCount)*ElementSize)),Pivot) <= 0){
|
if (CompareFunction((VOID*)((UINT8*)BufferToSort+((LoopCount)*ElementSize)),Pivot) <= 0){
|
||||||
//
|
//
|
||||||
// swap
|
// swap
|
||||||
//
|
//
|
||||||
CopyMem (Buffer, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
|
CopyMem (Buffer, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
|
||||||
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), (UINT8*)BufferToSort+((LoopCount)*ElementSize), ElementSize);
|
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), (UINT8*)BufferToSort+((LoopCount)*ElementSize), ElementSize);
|
||||||
|
@ -94,7 +94,7 @@ QuickSortWorker (
|
||||||
|
|
||||||
//
|
//
|
||||||
// increment NextSwapLocation
|
// increment NextSwapLocation
|
||||||
//
|
//
|
||||||
NextSwapLocation++;
|
NextSwapLocation++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,20 +106,20 @@ QuickSortWorker (
|
||||||
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), Buffer, ElementSize);
|
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), Buffer, ElementSize);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Now recurse on 2 paritial lists. neither of these will have the 'pivot' element
|
// Now recurse on 2 paritial lists. neither of these will have the 'pivot' element
|
||||||
// IE list is sorted left half, pivot element, sorted right half...
|
// IE list is sorted left half, pivot element, sorted right half...
|
||||||
//
|
//
|
||||||
QuickSortWorker(
|
QuickSortWorker(
|
||||||
BufferToSort,
|
BufferToSort,
|
||||||
NextSwapLocation,
|
NextSwapLocation,
|
||||||
ElementSize,
|
ElementSize,
|
||||||
CompareFunction,
|
CompareFunction,
|
||||||
Buffer);
|
Buffer);
|
||||||
|
|
||||||
QuickSortWorker(
|
QuickSortWorker(
|
||||||
(UINT8 *)BufferToSort + (NextSwapLocation+1) * ElementSize,
|
(UINT8 *)BufferToSort + (NextSwapLocation+1) * ElementSize,
|
||||||
Count - NextSwapLocation - 1,
|
Count - NextSwapLocation - 1,
|
||||||
ElementSize,
|
ElementSize,
|
||||||
CompareFunction,
|
CompareFunction,
|
||||||
Buffer);
|
Buffer);
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ QuickSortWorker (
|
||||||
on return a buffer of sorted elements
|
on return a buffer of sorted elements
|
||||||
@param[in] Count the number of elements in the buffer to sort
|
@param[in] Count the number of elements in the buffer to sort
|
||||||
@param[in] ElementSize Size of an element in bytes
|
@param[in] ElementSize Size of an element in bytes
|
||||||
@param[in] CompareFunction The function to call to perform the comparison
|
@param[in] CompareFunction The function to call to perform the comparison
|
||||||
of any 2 elements
|
of any 2 elements
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@ -173,7 +173,7 @@ PerformQuickSort (
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Not supported in Base version.
|
Not supported in Base version.
|
||||||
|
|
||||||
ASSERT and return 0.
|
ASSERT and return 0.
|
||||||
**/
|
**/
|
||||||
INTN
|
INTN
|
||||||
|
@ -194,7 +194,7 @@ DevicePathCompare (
|
||||||
|
|
||||||
@retval 0 Buffer1 equal to Buffer2.
|
@retval 0 Buffer1 equal to Buffer2.
|
||||||
@return < 0 Buffer1 is less than Buffer2.
|
@return < 0 Buffer1 is less than Buffer2.
|
||||||
@return > 0 Buffer1 is greater than Buffer2.
|
@return > 0 Buffer1 is greater than Buffer2.
|
||||||
**/
|
**/
|
||||||
INTN
|
INTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#/** @file
|
#/** @file
|
||||||
# Library used for sorting routines.
|
# Library used for sorting routines.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009, Intel Corporation.
|
# Copyright (c) 2009-2010, Intel Corporation.All rights reserved. <BR>
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
/** @file
|
/** @file
|
||||||
Provides application point extension for "C" style main funciton
|
Provides application point extension for "C" style main funciton
|
||||||
|
|
||||||
Copyright (c) 2009, Intel Corporation<BR>
|
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ ShellCEntryLib (
|
||||||
EfiShellParametersProtocol = NULL;
|
EfiShellParametersProtocol = NULL;
|
||||||
EfiShellInterface = NULL;
|
EfiShellInterface = NULL;
|
||||||
|
|
||||||
Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
|
Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
|
||||||
&gEfiShellParametersProtocolGuid,
|
&gEfiShellParametersProtocolGuid,
|
||||||
(VOID **)&EfiShellParametersProtocol,
|
(VOID **)&EfiShellParametersProtocol,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
|
@ -72,7 +72,7 @@ ShellCEntryLib (
|
||||||
//
|
//
|
||||||
// try to get shell 1.0 interface instead.
|
// try to get shell 1.0 interface instead.
|
||||||
//
|
//
|
||||||
Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
|
Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
|
||||||
&gEfiShellInterfaceGuid,
|
&gEfiShellInterfaceGuid,
|
||||||
(VOID **)&EfiShellInterface,
|
(VOID **)&EfiShellInterface,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
|
@ -82,7 +82,7 @@ ShellCEntryLib (
|
||||||
if (!EFI_ERROR(Status)) {
|
if (!EFI_ERROR(Status)) {
|
||||||
//
|
//
|
||||||
// use shell 1.0 interface
|
// use shell 1.0 interface
|
||||||
//
|
//
|
||||||
ReturnFromMain = ShellAppMain (
|
ReturnFromMain = ShellAppMain (
|
||||||
EfiShellInterface->Argc,
|
EfiShellInterface->Argc,
|
||||||
EfiShellInterface->Argv
|
EfiShellInterface->Argv
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#/** @file
|
#/** @file
|
||||||
# Provides interface to shell functionality for shell commands and applications.
|
# Provides interface to shell functionality for shell commands and applications.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006 - 2009, Intel Corporation.
|
# Copyright (c) 2006 - 2010, Intel Corporation.All rights reserved. <BR>
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
||||||
/** @file
|
/** @file
|
||||||
Provides interface to shell functionality for shell commands and applications.
|
Provides interface to shell functionality for shell commands and applications.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2010, Intel Corporation<BR>
|
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#/** @file
|
#/** @file
|
||||||
# Provides interface to shell functionality for shell commands and applications.
|
# Provides interface to shell functionality for shell commands and applications.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006 - 2009, Intel Corporation.
|
# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved. <BR>
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
@ -50,8 +50,8 @@
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiSimpleFileSystemProtocolGuid # ALWAYS_CONSUMED
|
gEfiSimpleFileSystemProtocolGuid # ALWAYS_CONSUMED
|
||||||
|
|
||||||
# shell 2.0
|
# shell 2.0
|
||||||
gEfiShellProtocolGuid # SOMETIMES_CONSUMED
|
gEfiShellProtocolGuid # SOMETIMES_CONSUMED
|
||||||
gEfiShellParametersProtocolGuid # SOMETIMES_CONSUMED
|
gEfiShellParametersProtocolGuid # SOMETIMES_CONSUMED
|
||||||
|
|
||||||
|
@ -66,4 +66,4 @@
|
||||||
[Pcd.common]
|
[Pcd.common]
|
||||||
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize # ALWAYS_CONSUMED
|
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize # ALWAYS_CONSUMED
|
||||||
gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize # ALWAYS_CONSUMED
|
gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize # ALWAYS_CONSUMED
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength # ALWAYS_CONSUMED
|
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength # ALWAYS_CONSUMED
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
/** @file
|
/** @file
|
||||||
Library used for sorting routines.
|
Library used for sorting routines.
|
||||||
|
|
||||||
Copyright (c) 2009, Intel Corporation<BR>
|
Copyright (c) 2009-2010, Intel Corporation. All rights reserved. <BR>
|
||||||
All rights reserved. This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -23,15 +23,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
#include <Library/SortLib.h>
|
#include <Library/SortLib.h>
|
||||||
|
|
||||||
STATIC EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathToText = NULL;
|
STATIC EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathToText = NULL;
|
||||||
STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
|
STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Worker function for QuickSorting. This function is identical to PerformQuickSort,
|
Worker function for QuickSorting. This function is identical to PerformQuickSort,
|
||||||
except that is uses the pre-allocated buffer so the in place sorting does not need to
|
except that is uses the pre-allocated buffer so the in place sorting does not need to
|
||||||
allocate and free buffers constantly.
|
allocate and free buffers constantly.
|
||||||
|
|
||||||
Each element must be equal sized.
|
Each element must be equal sized.
|
||||||
|
@ -47,7 +47,7 @@ STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
|
||||||
on return a buffer of sorted elements
|
on return a buffer of sorted elements
|
||||||
@param[in] Count the number of elements in the buffer to sort
|
@param[in] Count the number of elements in the buffer to sort
|
||||||
@param[in] ElementSize Size of an element in bytes
|
@param[in] ElementSize Size of an element in bytes
|
||||||
@param[in] CompareFunction The function to call to perform the comparison
|
@param[in] CompareFunction The function to call to perform the comparison
|
||||||
of any 2 elements
|
of any 2 elements
|
||||||
@param[in] Buffer Buffer of size ElementSize for use in swapping
|
@param[in] Buffer Buffer of size ElementSize for use in swapping
|
||||||
**/
|
**/
|
||||||
|
@ -69,7 +69,7 @@ QuickSortWorker (
|
||||||
ASSERT(CompareFunction != NULL);
|
ASSERT(CompareFunction != NULL);
|
||||||
ASSERT(Buffer != NULL);
|
ASSERT(Buffer != NULL);
|
||||||
|
|
||||||
if ( Count < 2
|
if ( Count < 2
|
||||||
|| ElementSize < 1
|
|| ElementSize < 1
|
||||||
){
|
){
|
||||||
return;
|
return;
|
||||||
|
@ -87,7 +87,7 @@ QuickSortWorker (
|
||||||
// and everything "right" are above it
|
// and everything "right" are above it
|
||||||
//
|
//
|
||||||
for ( LoopCount = 0
|
for ( LoopCount = 0
|
||||||
; LoopCount < Count -1
|
; LoopCount < Count -1
|
||||||
; LoopCount++
|
; LoopCount++
|
||||||
){
|
){
|
||||||
//
|
//
|
||||||
|
@ -95,7 +95,7 @@ QuickSortWorker (
|
||||||
//
|
//
|
||||||
if (CompareFunction((VOID*)((UINT8*)BufferToSort+((LoopCount)*ElementSize)),Pivot) <= 0){
|
if (CompareFunction((VOID*)((UINT8*)BufferToSort+((LoopCount)*ElementSize)),Pivot) <= 0){
|
||||||
//
|
//
|
||||||
// swap
|
// swap
|
||||||
//
|
//
|
||||||
CopyMem (Buffer, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
|
CopyMem (Buffer, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
|
||||||
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), (UINT8*)BufferToSort+((LoopCount)*ElementSize), ElementSize);
|
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), (UINT8*)BufferToSort+((LoopCount)*ElementSize), ElementSize);
|
||||||
|
@ -103,7 +103,7 @@ QuickSortWorker (
|
||||||
|
|
||||||
//
|
//
|
||||||
// increment NextSwapLocation
|
// increment NextSwapLocation
|
||||||
//
|
//
|
||||||
NextSwapLocation++;
|
NextSwapLocation++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,20 +115,20 @@ QuickSortWorker (
|
||||||
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), Buffer, ElementSize);
|
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), Buffer, ElementSize);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Now recurse on 2 paritial lists. neither of these will have the 'pivot' element
|
// Now recurse on 2 paritial lists. neither of these will have the 'pivot' element
|
||||||
// IE list is sorted left half, pivot element, sorted right half...
|
// IE list is sorted left half, pivot element, sorted right half...
|
||||||
//
|
//
|
||||||
QuickSortWorker(
|
QuickSortWorker(
|
||||||
BufferToSort,
|
BufferToSort,
|
||||||
NextSwapLocation,
|
NextSwapLocation,
|
||||||
ElementSize,
|
ElementSize,
|
||||||
CompareFunction,
|
CompareFunction,
|
||||||
Buffer);
|
Buffer);
|
||||||
|
|
||||||
QuickSortWorker(
|
QuickSortWorker(
|
||||||
(UINT8 *)BufferToSort + (NextSwapLocation+1) * ElementSize,
|
(UINT8 *)BufferToSort + (NextSwapLocation+1) * ElementSize,
|
||||||
Count - NextSwapLocation - 1,
|
Count - NextSwapLocation - 1,
|
||||||
ElementSize,
|
ElementSize,
|
||||||
CompareFunction,
|
CompareFunction,
|
||||||
Buffer);
|
Buffer);
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ QuickSortWorker (
|
||||||
on return a buffer of sorted elements
|
on return a buffer of sorted elements
|
||||||
@param[in] Count the number of elements in the buffer to sort
|
@param[in] Count the number of elements in the buffer to sort
|
||||||
@param[in] ElementSize Size of an element in bytes
|
@param[in] ElementSize Size of an element in bytes
|
||||||
@param[in] CompareFunction The function to call to perform the comparison
|
@param[in] CompareFunction The function to call to perform the comparison
|
||||||
of any 2 elements
|
of any 2 elements
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@ -188,7 +188,7 @@ PerformQuickSort (
|
||||||
|
|
||||||
@retval 0 Buffer1 equal to Buffer2
|
@retval 0 Buffer1 equal to Buffer2
|
||||||
@return < 0 Buffer1 is less than Buffer2
|
@return < 0 Buffer1 is less than Buffer2
|
||||||
@return > 0 Buffer1 is greater than Buffer2
|
@return > 0 Buffer1 is greater than Buffer2
|
||||||
**/
|
**/
|
||||||
INTN
|
INTN
|
||||||
DevicePathCompare (
|
DevicePathCompare (
|
||||||
|
@ -202,7 +202,7 @@ DevicePathCompare (
|
||||||
CHAR16 *TextPath2;
|
CHAR16 *TextPath2;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
INTN RetVal;
|
INTN RetVal;
|
||||||
|
|
||||||
DevicePath1 = *(EFI_DEVICE_PATH_PROTOCOL**)Buffer1;
|
DevicePath1 = *(EFI_DEVICE_PATH_PROTOCOL**)Buffer1;
|
||||||
DevicePath2 = *(EFI_DEVICE_PATH_PROTOCOL**)Buffer2;
|
DevicePath2 = *(EFI_DEVICE_PATH_PROTOCOL**)Buffer2;
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ DevicePathCompare (
|
||||||
if (DevicePath2 == NULL) {
|
if (DevicePath2 == NULL) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mDevicePathToText == NULL) {
|
if (mDevicePathToText == NULL) {
|
||||||
Status = gBS->LocateProtocol(
|
Status = gBS->LocateProtocol(
|
||||||
&gEfiDevicePathToTextProtocolGuid,
|
&gEfiDevicePathToTextProtocolGuid,
|
||||||
|
@ -245,7 +245,7 @@ DevicePathCompare (
|
||||||
DevicePath2,
|
DevicePath2,
|
||||||
FALSE,
|
FALSE,
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
RetVal = mUnicodeCollation->StriColl(
|
RetVal = mUnicodeCollation->StriColl(
|
||||||
mUnicodeCollation,
|
mUnicodeCollation,
|
||||||
TextPath1,
|
TextPath1,
|
||||||
|
@ -265,7 +265,7 @@ DevicePathCompare (
|
||||||
|
|
||||||
@retval 0 Buffer1 equal to Buffer2.
|
@retval 0 Buffer1 equal to Buffer2.
|
||||||
@return < 0 Buffer1 is less than Buffer2.
|
@return < 0 Buffer1 is less than Buffer2.
|
||||||
@return > 0 Buffer1 is greater than Buffer2.
|
@return > 0 Buffer1 is greater than Buffer2.
|
||||||
**/
|
**/
|
||||||
INTN
|
INTN
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#/** @file
|
#/** @file
|
||||||
# Library used for sorting routines.
|
# Library used for sorting routines.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009, Intel Corporation.
|
# Copyright (c) 2009, Intel Corporation. All rights reserved. <BR>
|
||||||
#
|
#
|
||||||
# All rights reserved. This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
Loading…
Reference in New Issue