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
|
||||
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.
|
||||
|
||||
Copyright (c) 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
|
||||
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@ -32,10 +32,10 @@
|
|||
@retval Other An error occurred.
|
||||
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
INTN
|
||||
EFIAPI
|
||||
ShellAppMain (
|
||||
IN UINTN Argc,
|
||||
IN UINTN Argc,
|
||||
IN CHAR16 **Argv
|
||||
)
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#/** @file
|
||||
# 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
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
@ -33,11 +33,11 @@
|
|||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
ShellPkg/ShellPkg.dec
|
||||
|
||||
|
||||
[LibraryClasses]
|
||||
ShellCEntryLib
|
||||
UefiLib
|
||||
|
||||
|
||||
[Guids]
|
||||
|
||||
[Protocols]
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/** @file
|
||||
This is a simple shell application
|
||||
|
||||
Copyright (c) 2008, 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
|
||||
Copyright (c) 2008-2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@ -19,9 +19,9 @@
|
|||
/**
|
||||
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.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval other Some error occurs when executing this entry point.
|
||||
|
||||
|
@ -33,6 +33,6 @@ UefiMain (
|
|||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
Print(L"ShellExecute - Pass");
|
||||
Print(L"ShellExecute - Pass");
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
#
|
||||
# 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
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
@ -34,11 +34,11 @@
|
|||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
|
||||
|
||||
[LibraryClasses]
|
||||
UefiApplicationEntryPoint
|
||||
UefiLib
|
||||
|
||||
|
||||
[Guids]
|
||||
|
||||
[Ppis]
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
#
|
||||
# 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
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
@ -35,14 +35,14 @@
|
|||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
ShellPkg/ShellPkg.dec
|
||||
|
||||
|
||||
[LibraryClasses]
|
||||
UefiApplicationEntryPoint
|
||||
UefiLib
|
||||
ShellLib
|
||||
MemoryAllocationLib
|
||||
DebugLib
|
||||
|
||||
|
||||
[Guids]
|
||||
|
||||
[Ppis]
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
This should be executed with "/Param2 Val1" and "/Param1" as the 2 command line options!
|
||||
|
||||
Copyright (c) 2008-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
|
||||
Copyright (c) 2008-2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
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.
|
||||
|
||||
@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.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||
@retval other Some error occurs when executing this entry point.
|
||||
|
||||
|
@ -64,7 +64,7 @@ UefiMain (
|
|||
EFI_SHELL_FILE_INFO *pShellFileInfo;
|
||||
LIST_ENTRY *List;
|
||||
// CONST CHAR16 *Tester;
|
||||
|
||||
|
||||
FileHandle = NULL;
|
||||
StrCpy(FileName, L"testfile.txt");
|
||||
// Position = 0;
|
||||
|
@ -100,9 +100,9 @@ UefiMain (
|
|||
|
||||
ShellSetPageBreakMode(TRUE);
|
||||
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
0
|
||||
);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
@ -130,9 +130,9 @@ UefiMain (
|
|||
ASSERT_EFI_ERROR(Status);
|
||||
Print(L"read, write, create, getinfo - pass\r\n");
|
||||
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
0
|
||||
);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
@ -141,7 +141,7 @@ UefiMain (
|
|||
pFileInfo->FileSize = 0x20;
|
||||
Status = ShellSetFileInfo(FileHandle, pFileInfo);
|
||||
FreePool(pFileInfo);
|
||||
pFileInfo = NULL;
|
||||
pFileInfo = NULL;
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
pFileInfo = ShellGetFileInfo(FileHandle);
|
||||
ASSERT(pFileInfo != NULL);
|
||||
|
@ -156,10 +156,10 @@ UefiMain (
|
|||
Status = ShellCloseFile(&FileHandle);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
Print(L"setinfo and change size, getsize - pass\r\n");
|
||||
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
0
|
||||
);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
@ -171,14 +171,14 @@ UefiMain (
|
|||
ASSERT(pFileInfo->FileSize == 0x20);
|
||||
ASSERT((pFileInfo->Attribute&EFI_FILE_DIRECTORY)==0);
|
||||
FreePool(pFileInfo);
|
||||
pFileInfo = NULL;
|
||||
pFileInfo = NULL;
|
||||
Status = ShellDeleteFile(&FileHandle);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
Print(L"reopen file - pass\r\n");
|
||||
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
0
|
||||
);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
@ -193,9 +193,9 @@ UefiMain (
|
|||
ASSERT_EFI_ERROR(Status);
|
||||
Print(L"size of empty - pass\r\n");
|
||||
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
0
|
||||
);
|
||||
ASSERT(Status == EFI_NOT_FOUND);
|
||||
|
@ -211,23 +211,23 @@ UefiMain (
|
|||
Status = ShellDeleteFile(&FileHandle);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
Print(L"Directory create - pass\r\n");
|
||||
|
||||
|
||||
// FindFirst and FindNext
|
||||
StrCpy(FileName, L"testDir");
|
||||
Status = ShellCreateDirectory(FileName, &FileHandle);
|
||||
Status = ShellCloseFile(&FileHandle);
|
||||
StrCat(FileName, L"\\File.txt");
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
0
|
||||
);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
Status = ShellCloseFile(&FileHandle);
|
||||
StrCpy(FileName, L"testDir");
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
0
|
||||
);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
@ -264,18 +264,18 @@ UefiMain (
|
|||
|
||||
// now delete that file and that directory
|
||||
StrCat(FileName, L"\\File.txt");
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
0
|
||||
);
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
Status = ShellDeleteFile(&FileHandle);
|
||||
StrCpy(FileName, L"testDir");
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
Status = ShellOpenFileByName(FileName,
|
||||
&FileHandle,
|
||||
EFI_FILE_MODE_CREATE|EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE,
|
||||
0
|
||||
);
|
||||
Status = ShellDeleteFile(&FileHandle);
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/** @file
|
||||
This is a test application that demonstrates how to use the sorting functions.
|
||||
|
||||
Copyright (c) 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
|
||||
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
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.
|
||||
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
INTN
|
||||
EFIAPI
|
||||
ShellAppMain (
|
||||
IN UINTN Argc,
|
||||
IN UINTN Argc,
|
||||
IN CHAR16 **Argv
|
||||
)
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#/** @file
|
||||
# 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
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
@ -33,12 +33,12 @@
|
|||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
ShellPkg/ShellPkg.dec
|
||||
|
||||
|
||||
[LibraryClasses]
|
||||
ShellCEntryLib
|
||||
UefiLib
|
||||
SortLib
|
||||
|
||||
|
||||
[Guids]
|
||||
|
||||
[Protocols]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/** @file
|
||||
GUID for EFI shell Environment2 Extension
|
||||
|
||||
Copyright (c) 2009, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/** @file
|
||||
GUID for ShellPkg PCD Token Space.
|
||||
|
||||
Copyright (c) 2009, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/** @file
|
||||
Provides interface to EFI_FILE_HANDLE functionality.
|
||||
|
||||
Copyright (c) 2009, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
@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.
|
||||
|
||||
@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.
|
||||
|
||||
@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.
|
||||
|
||||
@param FileInfo The information to 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_NO_MEDIA The device has no medium.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||
|
@ -69,21 +70,21 @@ FileHandleSetInfo (
|
|||
/**
|
||||
This function reads information from an opened file.
|
||||
|
||||
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.
|
||||
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.
|
||||
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
|
||||
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
|
||||
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.
|
||||
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
|
||||
are no more directory entries, the read returns a zero-length buffer.
|
||||
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
|
||||
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
|
||||
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
|
||||
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.
|
||||
EFI_FILE_INFO is the structure returned as the directory entry.
|
||||
|
||||
@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.
|
||||
@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_DEVICE_ERROR The device reported an error.
|
||||
@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.
|
||||
|
||||
**/
|
||||
|
@ -106,11 +107,11 @@ FileHandleRead(
|
|||
/**
|
||||
Write data to a file.
|
||||
|
||||
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
|
||||
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").
|
||||
The file is automatically grown to hold the data if required. Direct writes to
|
||||
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
|
||||
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").
|
||||
The file is automatically grown to hold the data if required. Direct writes to
|
||||
opened directories are not supported.
|
||||
|
||||
@param FileHandle The opened file for writing
|
||||
|
@ -135,11 +136,11 @@ FileHandleWrite(
|
|||
IN VOID *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Close an open file handle.
|
||||
|
||||
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
|
||||
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
|
||||
closed.
|
||||
|
||||
@param FileHandle The file handle to close.
|
||||
|
@ -156,13 +157,13 @@ FileHandleClose (
|
|||
Delete a file and close the handle.
|
||||
|
||||
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.
|
||||
|
||||
@param FileHandle The file handle to delete.
|
||||
|
||||
@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
|
||||
@retval INVALID_PARAMETER One of the parameters has an invalid value.
|
||||
**/
|
||||
|
@ -175,19 +176,19 @@ FileHandleDelete (
|
|||
/**
|
||||
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
|
||||
absolute positioning is supported, and seeking past the end of the file is
|
||||
allowed (a subsequent write would grow the file). Seeking to position
|
||||
absolute positioning is supported, and seeking past the end of the file is
|
||||
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.
|
||||
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.
|
||||
|
||||
@param FileHandle The file handle on which the position is being set
|
||||
@param Position Byte position from begining of file
|
||||
|
||||
@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.
|
||||
@retval INVALID_PARAMETER One of the parameters has an invalid value.
|
||||
**/
|
||||
|
@ -198,11 +199,11 @@ FileHandleSetPosition (
|
|||
IN UINT64 Position
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Gets a file's current position.
|
||||
|
||||
This function retrieves the current file position for the file handle. For
|
||||
directories, the current file position has no meaning outside of the file
|
||||
This function retrieves the current file position for the file handle. For
|
||||
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
|
||||
if FileHandle is a directory.
|
||||
|
||||
|
@ -221,7 +222,7 @@ FileHandleGetPosition (
|
|||
);
|
||||
/**
|
||||
Flushes data on a file.
|
||||
|
||||
|
||||
This function flushes all modified data associated with a file to a device.
|
||||
|
||||
@param FileHandle The file handle on which to flush data.
|
||||
|
@ -262,8 +263,8 @@ FileHandleIsDirectory (
|
|||
/**
|
||||
Retrieves the first file from a directory.
|
||||
|
||||
This function opens a directory and gets the first file's info in the
|
||||
directory. Caller can use FileHandleFindNextFile() to get other files. When
|
||||
This function opens a directory and gets the first file's info in the
|
||||
directory. Caller can use FileHandleFindNextFile() to get other files. When
|
||||
complete the caller is responsible for calling FreePool() on *Buffer.
|
||||
|
||||
@param DirHandle The file handle of the directory to search
|
||||
|
@ -286,12 +287,12 @@ FileHandleFindFirstFile (
|
|||
/**
|
||||
Retrieves the next file in a directory.
|
||||
|
||||
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
|
||||
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
|
||||
call of this function has no file to get. *NoFile will be set to TRUE and the
|
||||
Buffer memory will be automatically freed.
|
||||
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
|
||||
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
|
||||
call of this function has no file to get. *NoFile will be set to TRUE and the
|
||||
Buffer memory will be automatically freed.
|
||||
|
||||
@param DirHandle the file handle of the directory
|
||||
@param Buffer pointer to buffer for file's information
|
||||
|
@ -316,7 +317,7 @@ FileHandleFindNextFile(
|
|||
If FileHandle 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.
|
||||
|
||||
@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'.
|
||||
|
||||
@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
|
||||
with a call to FreePool().
|
||||
@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.
|
||||
|
||||
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.
|
||||
|
||||
@param[in] Handle FileHandle to read from
|
||||
@param[in,out] Buffer pointer to buffer to read into
|
||||
@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.
|
||||
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.
|
||||
@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);
|
||||
|
||||
@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.
|
||||
@retval EFI_INVALID_PARAMETER Handle 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.
|
||||
@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.
|
||||
|
||||
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.
|
||||
|
||||
@param[in] Handle FileHandle to read from.
|
||||
|
@ -412,7 +413,7 @@ FileHandleReturnLine(
|
|||
If Handle is NULL, ASSERT.
|
||||
|
||||
@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.
|
||||
|
||||
@retval EFI_SUCCESS the data was written.
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/** @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>
|
||||
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
|
||||
Copyright (c) 2006-2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
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
|
||||
EFIAPI
|
||||
EFIAPI
|
||||
ShellAppMain (
|
||||
IN UINTN Argc,
|
||||
IN UINTN Argc,
|
||||
IN CHAR16 **Argv
|
||||
);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/** @file
|
||||
Provides interface to shell functionality for shell commands and applications.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
@ -25,13 +25,13 @@
|
|||
#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.
|
||||
|
||||
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.
|
||||
|
||||
@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.
|
||||
|
||||
@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.
|
||||
|
||||
@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.
|
||||
|
||||
@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 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.
|
||||
|
||||
@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.
|
||||
@param[out] DeviceHandle Pointer to the system device handle.
|
||||
@param[out] FileHandle Pointer to the file handle.
|
||||
|
@ -84,18 +84,18 @@ ShellSetFileInfo (
|
|||
|
||||
@retval EFI_SUCCESS The information was set.
|
||||
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
||||
@retval EFI_UNSUPPORTED Could not open the file path.
|
||||
@retval EFI_NOT_FOUND The specified file could not be found on the
|
||||
device or the file system could not be found on
|
||||
@retval EFI_UNSUPPORTED Could not open the file path.
|
||||
@retval EFI_NOT_FOUND The specified file could not be found on the
|
||||
device or the file system could not be found on
|
||||
the device.
|
||||
@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.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
||||
@retval EFI_WRITE_PROTECTED The file or medium is write protected.
|
||||
@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.
|
||||
@retval EFI_VOLUME_FULL The volume is full.
|
||||
**/
|
||||
|
@ -112,8 +112,8 @@ ShellOpenFileByDevicePath(
|
|||
/**
|
||||
This function will open a file or directory referenced by filename.
|
||||
|
||||
If return is EFI_SUCCESS, the Filehandle is the opened file's handle;
|
||||
otherwise, the Filehandle is NULL. The Attributes is valid only for
|
||||
If return is EFI_SUCCESS, the Filehandle is the opened file's handle;
|
||||
otherwise, the Filehandle is NULL. The Attributes is valid only for
|
||||
EFI_FILE_MODE_CREATE.
|
||||
|
||||
@param[in] FileName Pointer to file name.
|
||||
|
@ -123,18 +123,18 @@ ShellOpenFileByDevicePath(
|
|||
|
||||
@retval EFI_SUCCESS The information was set.
|
||||
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
||||
@retval EFI_UNSUPPORTED Could not open the file path.
|
||||
@retval EFI_NOT_FOUND The specified file could not be found on the
|
||||
device or the file system could not be found
|
||||
@retval EFI_UNSUPPORTED Could not open the file path.
|
||||
@retval EFI_NOT_FOUND The specified file could not be found on the
|
||||
device or the file system could not be found
|
||||
on the device.
|
||||
@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.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
||||
@retval EFI_WRITE_PROTECTED The file or medium is write protected.
|
||||
@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.
|
||||
@retval EFI_VOLUME_FULL The volume is full.
|
||||
**/
|
||||
|
@ -150,8 +150,8 @@ ShellOpenFileByName(
|
|||
/**
|
||||
This function creates a directory.
|
||||
|
||||
If return is EFI_SUCCESS, the Filehandle is the opened directory's handle;
|
||||
otherwise, the Filehandle is NULL. If the directory already existed, this
|
||||
If return is EFI_SUCCESS, the Filehandle is the opened directory's handle;
|
||||
otherwise, the Filehandle is NULL. If the directory already existed, this
|
||||
function opens the existing directory.
|
||||
|
||||
@param[in] DirectoryName Pointer to Directory name.
|
||||
|
@ -159,18 +159,18 @@ ShellOpenFileByName(
|
|||
|
||||
@retval EFI_SUCCESS The information was set.
|
||||
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
|
||||
@retval EFI_UNSUPPORTED Could not open the file path.
|
||||
@retval EFI_NOT_FOUND The specified file could not be found on the
|
||||
device or the file system could not be found
|
||||
@retval EFI_UNSUPPORTED Could not open the file path.
|
||||
@retval EFI_NOT_FOUND The specified file could not be found on the
|
||||
device or the file system could not be found
|
||||
on the device.
|
||||
@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.
|
||||
@retval EFI_DEVICE_ERROR The device reported an error.
|
||||
@retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
|
||||
@retval EFI_WRITE_PROTECTED The file or medium is write protected.
|
||||
@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.
|
||||
@retval EFI_VOLUME_FULL The volume is full.
|
||||
**/
|
||||
|
@ -184,21 +184,21 @@ ShellCreateDirectory(
|
|||
/**
|
||||
This function reads information from an opened file.
|
||||
|
||||
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.
|
||||
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.
|
||||
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
|
||||
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
|
||||
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.
|
||||
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
|
||||
are no more directory entries, the read returns a zero-length buffer.
|
||||
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
|
||||
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
|
||||
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
|
||||
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.
|
||||
EFI_FILE_INFO is the structure returned as the directory entry.
|
||||
|
||||
@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.
|
||||
@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_DEVICE_ERROR The device reported an error.
|
||||
@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.
|
||||
|
||||
**/
|
||||
|
@ -221,11 +221,11 @@ ShellReadFile(
|
|||
/**
|
||||
Write data to a file.
|
||||
|
||||
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
|
||||
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").
|
||||
The file is automatically grown to hold the data if required. Direct writes to
|
||||
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
|
||||
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").
|
||||
The file is automatically grown to hold the data if required. Direct writes to
|
||||
opened directories are not supported.
|
||||
|
||||
@param[in] FileHandle The opened file for writing.
|
||||
|
@ -252,11 +252,11 @@ ShellWriteFile(
|
|||
IN VOID *Buffer
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Close an open file handle.
|
||||
|
||||
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
|
||||
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
|
||||
closed.
|
||||
|
||||
@param[in] FileHandle The file handle to close.
|
||||
|
@ -274,13 +274,13 @@ ShellCloseFile (
|
|||
Delete a file and close the handle
|
||||
|
||||
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.
|
||||
|
||||
@param[in] FileHandle The file handle to delete.
|
||||
|
||||
@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.
|
||||
@retval INVALID_PARAMETER One of the parameters has an invalid value.
|
||||
**/
|
||||
|
@ -293,12 +293,12 @@ ShellDeleteFile (
|
|||
/**
|
||||
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
|
||||
absolute positioning is supported, and seeking past the end of the file is
|
||||
allowed (a subsequent write would grow the file). Seeking to position
|
||||
absolute positioning is supported, and seeking past the end of the file is
|
||||
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.
|
||||
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.
|
||||
|
||||
@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.
|
||||
|
||||
@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.
|
||||
@retval INVALID_PARAMETER One of the parameters has an invalid value.
|
||||
**/
|
||||
|
@ -317,11 +317,11 @@ ShellSetFilePosition (
|
|||
IN UINT64 Position
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Gets a file's current position
|
||||
|
||||
This function retrieves the current file position for the file handle. For
|
||||
directories, the current file position has no meaning outside of the file
|
||||
This function retrieves the current file position for the file handle. For
|
||||
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
|
||||
if FileHandle is a directory.
|
||||
|
||||
|
@ -341,7 +341,7 @@ ShellGetFilePosition (
|
|||
|
||||
/**
|
||||
Flushes data on a file
|
||||
|
||||
|
||||
This function flushes all modified data associated with a file to a device.
|
||||
|
||||
@param[in] FileHandle The file handle on which to flush data.
|
||||
|
@ -362,8 +362,8 @@ ShellFlushFile (
|
|||
/**
|
||||
Retrieves the first file from a directory
|
||||
|
||||
This function takes an open directory handle and gets the first file
|
||||
in the directory's info. Caller can use ShellFindNextFile() to get
|
||||
This function takes an open directory handle and gets the first file
|
||||
in the directory's info. Caller can use ShellFindNextFile() to get
|
||||
subsequent files.
|
||||
|
||||
Caller must use FreePool on *Buffer opon completion of all file searching.
|
||||
|
@ -388,12 +388,12 @@ ShellFindFirstFile (
|
|||
/**
|
||||
Retrieves the next file in a directory.
|
||||
|
||||
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
|
||||
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
|
||||
call of this function has no file to get. *NoFile will be set to TRUE and the
|
||||
data in Buffer is meaningless.
|
||||
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
|
||||
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
|
||||
call of this function has no file to get. *NoFile will be set to TRUE and the
|
||||
data in Buffer is meaningless.
|
||||
|
||||
@param[in] DirHandle The file handle of the directory.
|
||||
@param[out] Buffer Pointer to buffer for file's information.
|
||||
|
@ -415,7 +415,7 @@ ShellFindNextFile(
|
|||
/**
|
||||
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.
|
||||
|
||||
@param[in] FileHandle The file handle from which size is retrieved.
|
||||
|
@ -448,7 +448,7 @@ ShellGetExecutionBreakFlag(
|
|||
/**
|
||||
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.
|
||||
|
||||
@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
|
||||
|
||||
@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] EnvironmentVariables Optional pointer to array of environment variables
|
||||
in the form "x=y". If NULL current set is used.
|
||||
|
@ -531,8 +531,8 @@ ShellExecute (
|
|||
/**
|
||||
Retreives the current directory path.
|
||||
|
||||
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
|
||||
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
|
||||
on specified drive.
|
||||
|
||||
@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.
|
||||
|
||||
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.
|
||||
|
||||
@param[in] CurrentState TRUE to enable and FALSE to disable.
|
||||
**/
|
||||
VOID
|
||||
VOID
|
||||
EFIAPI
|
||||
ShellSetPageBreakMode (
|
||||
IN BOOLEAN CurrentState
|
||||
|
@ -563,21 +563,21 @@ ShellSetPageBreakMode (
|
|||
/**
|
||||
Opens a group of files based on a path.
|
||||
|
||||
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
|
||||
structures are placed on the list ListHead. Users can get the SHELL_FILE_ARG
|
||||
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
|
||||
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
|
||||
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().
|
||||
|
||||
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.
|
||||
|
||||
@param[in] Arg Pointer to path string.
|
||||
@param[in] OpenMode Mode to open files with.
|
||||
@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.
|
||||
@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
|
||||
extensions. If the file is not found it will append each extension in the list
|
||||
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
|
||||
in the order provided and return the first one that is successful.
|
||||
|
||||
If FileName is NULL, then ASSERT.
|
||||
|
@ -666,14 +666,14 @@ typedef struct {
|
|||
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.
|
||||
|
||||
|
||||
If no initialization is required, then return RETURN_SUCCESS.
|
||||
|
||||
|
||||
@param[in] CheckList Pointer to list of parameters to check.
|
||||
@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.
|
||||
@param[in] AutoPageBreak Will automatically set PageBreakEnabled.
|
||||
@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_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_VOLUME_CORRUPTED The command line was corrupt. An argument was
|
||||
duplicated. The duplicated command line argument
|
||||
@retval EFI_VOLUME_CORRUPTED The command line was corrupt. An argument was
|
||||
duplicated. The duplicated command line argument
|
||||
was returned in ProblemParam if provided.
|
||||
@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.
|
||||
@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
|
||||
ProblemParam if provided.
|
||||
**/
|
||||
|
@ -727,7 +727,7 @@ ShellCommandLineFreeVarList (
|
|||
|
||||
If CheckPackage is NULL then return FALSE.
|
||||
If KeyString is NULL then ASSERT().
|
||||
|
||||
|
||||
@param[in] CheckPackage The package of parsed command line arguments.
|
||||
@param[in] KeyString The Key of the command line argument to check for.
|
||||
|
||||
|
@ -745,7 +745,7 @@ ShellCommandLineGetFlag (
|
|||
Returns value from command line argument.
|
||||
|
||||
Value parameters are in the form of "-<Key> value" or "/<Key> value".
|
||||
|
||||
|
||||
If CheckPackage is NULL, then return NULL.
|
||||
|
||||
@param[in] CheckPackage The package of parsed command line arguments.
|
||||
|
@ -765,7 +765,7 @@ ShellCommandLineGetValue (
|
|||
Returns raw value from command line argument.
|
||||
|
||||
Raw value parameters are in the form of "value" in a specific position in the list.
|
||||
|
||||
|
||||
If CheckPackage is NULL, then return NULL.
|
||||
|
||||
@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.
|
||||
|
||||
@retval (UINTN)-1 No parsing has ocurred.
|
||||
|
@ -798,7 +798,7 @@ ShellCommandLineGetCount(
|
|||
/**
|
||||
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.
|
||||
|
||||
If CheckPackage is NULL, then ASSERT.
|
||||
|
@ -839,14 +839,14 @@ ShellInitialize (
|
|||
Print at a specific location on the screen.
|
||||
|
||||
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.
|
||||
|
||||
If either Row or Col is out of range for the current console, 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:
|
||||
%N - Set output attribute to normal
|
||||
%H - Set output attribute to highlight
|
||||
|
@ -876,14 +876,14 @@ ShellPrintEx(
|
|||
Print at a specific location on the screen.
|
||||
|
||||
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.
|
||||
|
||||
If either Row or Col is out of range for the current console, 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:
|
||||
%N - Set output attribute to normal.
|
||||
%H - Set output attribute to highlight.
|
||||
|
@ -895,6 +895,8 @@ ShellPrintEx(
|
|||
|
||||
@param[in] Row The row 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] HiiFormatHandle The format string Handle for getting from Hii.
|
||||
|
||||
|
@ -905,6 +907,7 @@ EFIAPI
|
|||
ShellPrintHiiEx(
|
||||
IN INT32 Col OPTIONAL,
|
||||
IN INT32 Row OPTIONAL,
|
||||
IN CONST CHAR8 *Language OPTIONAL,
|
||||
IN CONST EFI_STRING_ID HiiFormatStringId,
|
||||
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.
|
||||
|
||||
@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.
|
||||
|
||||
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
|
||||
will fit within Destination (whose Size is given as CurrentSize) and
|
||||
still leave room for a null terminator, then those characters are appended,
|
||||
starting at the original terminating null of Destination, and a new terminating
|
||||
null is appended.
|
||||
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
|
||||
will fit within Destination (whose Size is given as CurrentSize) and
|
||||
still leave room for a NULL terminator, then those characters are appended,
|
||||
starting at the original terminating NULL of Destination, and a new terminating
|
||||
NULL is appended.
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
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().
|
||||
|
||||
@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
|
||||
then allocate whatever is needed.
|
||||
@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.
|
||||
|
||||
@return The Destination after apending the Source.
|
||||
**/
|
||||
CHAR16*
|
||||
CHAR16*
|
||||
EFIAPI
|
||||
StrnCatGrow (
|
||||
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.
|
||||
|
||||
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 FindTarget 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).
|
||||
@retval EFI_SUCCESS The string was sucessfully copied with replacement.
|
||||
**/
|
||||
|
@ -1066,8 +1069,8 @@ ShellCopySearchAndReplace2(
|
|||
/**
|
||||
Check if a Unicode character is a hexadecimal character.
|
||||
|
||||
This internal function checks if a Unicode character is a
|
||||
decimal character. The valid hexadecimal character is
|
||||
This internal function checks if a Unicode character is a
|
||||
decimal character. The valid hexadecimal character is
|
||||
L'0' to L'9', L'a' to L'f', or L'A' to L'F'.
|
||||
|
||||
@param[in] Char The character to check.
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/** @file
|
||||
Library used for sorting and comparison routines.
|
||||
|
||||
Copyright (c) 2009, Intel Corporation<BR>
|
||||
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
|
||||
Copyright (c) 2009-2010, Intel Corporation.All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@ -47,7 +47,7 @@ INTN
|
|||
on return a buffer of sorted elements.
|
||||
@param[in] Count The number of elements in the buffer to sort
|
||||
@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.
|
||||
**/
|
||||
VOID
|
||||
|
@ -68,7 +68,7 @@ PerformQuickSort (
|
|||
|
||||
@retval 0 Buffer1 equal to Buffer2.
|
||||
@return < 0 Buffer1 is less than Buffer2.
|
||||
@return > 0 Buffer1 is greater than Buffer2.
|
||||
@return > 0 Buffer1 is greater than Buffer2.
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
|
@ -80,12 +80,12 @@ DevicePathCompare (
|
|||
/**
|
||||
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**).
|
||||
|
||||
@retval 0 Buffer1 equal to Buffer2.
|
||||
@return < 0 Buffer1 is less than Buffer2.
|
||||
@return > 0 Buffer1 is greater than Buffer2.
|
||||
@return > 0 Buffer1 is greater than Buffer2.
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/** @file
|
||||
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,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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.
|
||||
|
||||
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
|
||||
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
|
||||
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.
|
||||
**/
|
||||
|
@ -70,22 +70,22 @@ EFI_STATUS
|
|||
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
|
||||
EFI_INVALID_PARAMETER will be returned.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
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
|
||||
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
|
||||
described in EFI_FILE_PROTOCOL.Open().
|
||||
@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_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
|
||||
file the file system on the device.
|
||||
@retval EFI_NO_MEDIA The device has no medium.
|
||||
|
@ -117,7 +117,7 @@ EFI_STATUS
|
|||
|
||||
@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.
|
||||
**/
|
||||
typedef
|
||||
|
@ -131,9 +131,9 @@ EFI_STATUS
|
|||
|
||||
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.
|
||||
**/
|
||||
typedef
|
||||
|
@ -148,8 +148,8 @@ EFI_STATUS
|
|||
typedef
|
||||
VOID
|
||||
(EFIAPI *EFI_SHELL_DISABLE_PAGE_BREAK) (
|
||||
VOID
|
||||
);
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Enables the page break output mode.
|
||||
|
@ -157,8 +157,8 @@ VOID
|
|||
typedef
|
||||
VOID
|
||||
(EFIAPI *EFI_SHELL_ENABLE_PAGE_BREAK) (
|
||||
VOID
|
||||
);
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Execute the command line.
|
||||
|
@ -166,26 +166,26 @@ VOID
|
|||
This function creates a nested instance of the shell and executes the specified
|
||||
command (CommandLine) with the specified environment (Environment). Upon return,
|
||||
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
|
||||
by the commands executed will be reflected in the current environment. If the
|
||||
Environment is non-NULL, then the changes made will be discarded.
|
||||
|
||||
|
||||
The CommandLine is executed from the current working directory on the current
|
||||
device.
|
||||
|
||||
@param[in] ParentImageHandle A handle of the image that is executing the specified
|
||||
command line.
|
||||
@param[in] CommandLine Points to the null-terminated UCS-2 encoded string
|
||||
@param[in] ParentImageHandle A handle of the image that is executing the specified
|
||||
command line.
|
||||
@param[in] CommandLine Points to the NULL-terminated UCS-2 encoded string
|
||||
containing the command line. If NULL then the command-
|
||||
line will be empty.
|
||||
@param[in] Environment Points to a null-terminated array of environment
|
||||
variables with the format 'x=y', where x is the
|
||||
@param[in] Environment Points to a NULL-terminated array of environment
|
||||
variables with the format 'x=y', where x is the
|
||||
environment variable name and y is the value. If this
|
||||
is NULL, then the current shell environment is used.
|
||||
@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.
|
||||
@retval EFI_INVALID_PARAMETER The parameters are invalid.
|
||||
@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
|
||||
field is set to NULL.
|
||||
|
||||
@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
|
||||
of all matching files or else points to NULL if no matching files
|
||||
@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
|
||||
of all matching files or else points to NULL if no matching files
|
||||
were found.
|
||||
|
||||
@retval EFI_SUCCESS Files found.
|
||||
|
@ -232,7 +232,7 @@ EFI_STATUS
|
|||
Find all files in a specified directory.
|
||||
|
||||
@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.
|
||||
|
||||
@retval EFI_SUCCESS File information was returned successfully.
|
||||
|
@ -249,10 +249,10 @@ OUT EFI_SHELL_FILE_INFO **FileList
|
|||
|
||||
/**
|
||||
Flushes data back 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_NO_MEDIA The device has no medium.
|
||||
|
@ -270,12 +270,12 @@ EFI_STATUS
|
|||
|
||||
/**
|
||||
Frees the file list.
|
||||
|
||||
|
||||
This function cleans up the file list and any related data structures. It has no
|
||||
impact on the files themselves.
|
||||
|
||||
@param[in] FileList The file list to free. Type EFI_SHELL_FILE_INFO is
|
||||
defined in OpenFileList()
|
||||
@param[in] FileList The file list to free. Type EFI_SHELL_FILE_INFO is
|
||||
defined in OpenFileList().
|
||||
|
||||
@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
|
||||
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.
|
||||
|
||||
|
||||
@retval !=NULL The current directory.
|
||||
@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.
|
||||
|
||||
@param[in] DeviceHandle The handle of the device.
|
||||
@param[in] Flags Determines the possible sources of component names.
|
||||
@param[in] Language A pointer to the language specified for the device
|
||||
name, in the same format as described in the UEFI
|
||||
@param[in] Flags Determines the possible sources of component names.
|
||||
@param[in] Language A pointer to the language specified for the device
|
||||
name, in the same format as described in the UEFI
|
||||
specification, Appendix M.
|
||||
@param[out] BestDeviceName On return, points to the callee-allocated null-
|
||||
terminated name of the device. If no device name
|
||||
could be found, points to NULL. The name must be
|
||||
@param[out] BestDeviceName On return, points to the callee-allocated NULL-
|
||||
terminated name of the device. If no device name
|
||||
could be found, points to NULL. The name must be
|
||||
freed by the caller...
|
||||
|
||||
@retval EFI_SUCCESS Get the name successfully.
|
||||
|
@ -355,10 +355,10 @@ EFI_STATUS
|
|||
|
||||
@param[in] Mapping A pointer to the mapping
|
||||
|
||||
@retval !=NULL Pointer to the device path that corresponds to the
|
||||
device mapping. The returned pointer does not need
|
||||
@retval !=NULL Pointer to the device path that corresponds to the
|
||||
device mapping. The returned pointer does not need
|
||||
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.
|
||||
**/
|
||||
typedef
|
||||
|
@ -375,7 +375,7 @@ CONST EFI_DEVICE_PATH_PROTOCOL *
|
|||
|
||||
@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.
|
||||
**/
|
||||
typedef
|
||||
|
@ -385,28 +385,26 @@ EFI_DEVICE_PATH_PROTOCOL *
|
|||
);
|
||||
|
||||
/**
|
||||
This function updated with errata.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
@param[in] Name A pointer to the environment variable name. If
|
||||
Name is NULL, then the function will return all
|
||||
of the defined shell environment variables. In
|
||||
the case where multiple environment variables are
|
||||
being returned, each variable will be terminated by
|
||||
a NULL, and the list will be terminated by a double
|
||||
@param[in] Name A pointer to the environment variable name. If
|
||||
Name is NULL, then the function will return all
|
||||
of the defined shell environment variables. In
|
||||
the case where multiple environment variables are
|
||||
being returned, each variable will be terminated by
|
||||
a NULL, and the list will be terminated by a double
|
||||
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.
|
||||
|
||||
@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.
|
||||
**/
|
||||
typedef
|
||||
|
@ -423,8 +421,8 @@ CONST CHAR16 *
|
|||
|
||||
@param[in] FileHandle A File Handle.
|
||||
|
||||
@return !=NULL Cannot get the file info.
|
||||
@return NULL A pointer to a buffer with file information.
|
||||
@retval NULL Cannot get the file info.
|
||||
@return A pointer to a buffer with file information.
|
||||
**/
|
||||
typedef
|
||||
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
|
||||
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.
|
||||
**/
|
||||
typedef
|
||||
|
@ -458,7 +456,7 @@ CHAR16 *
|
|||
operation is not supported.
|
||||
|
||||
@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_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
|
||||
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
|
||||
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
|
||||
information will be returned. If Sections is NULL, then all help text information
|
||||
available will be returned.
|
||||
|
||||
@param[in] Command Points to the null-terminated UEFI Shell command name.
|
||||
@param[in] Sections Points to the null-terminated comma-delimited
|
||||
section names to return. If NULL, then all
|
||||
@param[in] Command Points to the NULL-terminated UEFI Shell command name.
|
||||
@param[in] Sections Points to the NULL-terminated comma-delimited
|
||||
section names to return. If NULL, then all
|
||||
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.
|
||||
|
||||
@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.
|
||||
@retval EFI_INVALID_PARAMETER HelpText is NULL.
|
||||
@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.
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
@param[in,out] DevicePath On entry, points to a device path pointer. On
|
||||
exit, updates the pointer to point to the
|
||||
@param[in,out] DevicePath On entry, points to a device path pointer. On
|
||||
exit, updates the pointer to point to the
|
||||
portion of the device path after the mapping.
|
||||
|
||||
@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.
|
||||
**/
|
||||
typedef
|
||||
|
@ -582,34 +578,34 @@ VOID
|
|||
|
||||
This function opens the specified file in the specified OpenMode and returns a file
|
||||
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
|
||||
exists, is non-volatile and the OpenMode indicates EFI_FILE_MODE_WRITE, then
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
returned.
|
||||
|
||||
If return EFI_SUCCESS, the FileHandle is the opened file's handle, else, the
|
||||
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[in] OpenMode File open mode. Either EFI_FILE_MODE_READ or
|
||||
EFI_FILE_MODE_WRITE from section 12.4 of the UEFI
|
||||
@param[in] OpenMode File open mode. Either EFI_FILE_MODE_READ or
|
||||
EFI_FILE_MODE_WRITE from section 12.4 of the UEFI
|
||||
Specification.
|
||||
@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.
|
||||
|
@ -641,7 +637,7 @@ EFI_STATUS
|
|||
Opens the files that match the path specified.
|
||||
|
||||
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.
|
||||
|
||||
@param[in] Path A pointer to the path string.
|
||||
|
@ -745,23 +741,18 @@ EFI_STATUS
|
|||
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.
|
||||
|
||||
This function creates an alias for a shell command.
|
||||
|
||||
@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] 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
|
||||
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
|
||||
FALSE and the alias already exists, then the existing alias is unchanged and
|
||||
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.
|
||||
|
||||
@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
|
||||
alias'.
|
||||
|
||||
@param[in] Alias Points to the null-terminated shell alias.
|
||||
If this parameter is NULL, then all
|
||||
@param[in] Alias Points to the NULL-terminated shell alias.
|
||||
If this parameter is NULL, then all
|
||||
aliases will be returned in ReturnedData.
|
||||
@param[out] Volatile Upon return of a single command if TRUE indicates
|
||||
this is stored in a volatile fashion. FALSE otherwise.
|
||||
@return If Alias is not NULL, it will return a pointer to
|
||||
the null-terminated command for that alias.
|
||||
If Alias is NULL, ReturnedData points to a ';'
|
||||
delimited list of alias (e.g.
|
||||
ReturnedData = "dir;del;copy;mfp") that is null-terminated.
|
||||
@return If Alias is not NULL, it will return a pointer to
|
||||
the NULL-terminated command for that alias.
|
||||
If Alias is NULL, ReturnedData points to a ';'
|
||||
delimited list of alias (e.g.
|
||||
ReturnedData = "dir;del;copy;mfp") that is NULL-terminated.
|
||||
@retval NULL An error ocurred.
|
||||
@retval NULL Alias was not a valid Alias.
|
||||
**/
|
||||
typedef
|
||||
typedef
|
||||
CONST CHAR16 *
|
||||
(EFIAPI *EFI_SHELL_GET_ALIAS)(
|
||||
IN CONST CHAR16 *Alias,
|
||||
|
@ -816,14 +807,14 @@ CONST CHAR16 *
|
|||
directory on the specified file system.
|
||||
|
||||
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
|
||||
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.
|
||||
@return The current directory.
|
||||
**/
|
||||
typedef
|
||||
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
|
||||
environment variable does not exist and the Value is a non-empty string, then the
|
||||
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.
|
||||
|
||||
@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] 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
|
||||
empty string then the environment variable is deleted.
|
||||
@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.
|
||||
|
||||
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.
|
||||
|
||||
@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,
|
||||
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_NO_MAPPING There is no handle that corresponds exactly to DevicePath. See the
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/** @file
|
||||
Defines for EFI shell environment 2 ported to EDK II build environment. (no spec)
|
||||
|
||||
Copyright (c) 2005 - 2010, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
@ -12,7 +12,7 @@
|
|||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
#if !defined (_SHELL_ENVIRONMENT_2_PROTOCOL_H_)
|
||||
#define _SHELL_ENVIRONMENT_2_PROTOCOL_H_
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
|||
#define DEFAULT_AUTO_LF FALSE
|
||||
|
||||
/**
|
||||
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
|
||||
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
|
||||
used when programatically adding shell commands.
|
||||
|
||||
@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
|
||||
implementation. The specific command depends on the implementation. This is
|
||||
This function is a prototype for each command internal to the EFI shell
|
||||
implementation. The specific command depends on the implementation. This is
|
||||
used when programatically adding shell commands.
|
||||
|
||||
@param ImageHandle The handle to the binary shell.
|
||||
@param SystemTable Pointer to the system table.
|
||||
|
||||
@retval EFI_SUCCESS The command ran to completion
|
||||
@retval other An error ocurred. Any error is possible
|
||||
depending on the implementation of the shell
|
||||
@retval other An error ocurred. Any error is possible
|
||||
depending on the implementation of the shell
|
||||
command.
|
||||
|
||||
**/
|
||||
|
@ -57,8 +57,8 @@ EFI_STATUS
|
|||
);
|
||||
|
||||
/**
|
||||
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 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
|
||||
the memory allocated is up to the caller to free.
|
||||
|
||||
@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.
|
||||
**/
|
||||
typedef struct {
|
||||
UINT32 Signature; ///< SHELL_FILE_ARG_SIGNATURE
|
||||
LIST_ENTRY Link; ///< Linked list helper
|
||||
EFI_STATUS Status; ///< File's status
|
||||
UINT32 Signature; ///< SHELL_FILE_ARG_SIGNATURE.
|
||||
LIST_ENTRY Link; ///< Linked list helper.
|
||||
EFI_STATUS Status; ///< File's status.
|
||||
|
||||
EFI_FILE_HANDLE Parent; ///< What is the Parent file of this file
|
||||
UINT64 OpenMode; ///< How was the file opened
|
||||
CHAR16 *ParentName; ///< String representation of parent
|
||||
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath; ///< DevicePath for Parent
|
||||
EFI_FILE_HANDLE Parent; ///< What is the Parent file of this file.
|
||||
UINT64 OpenMode; ///< How was the file opened.
|
||||
CHAR16 *ParentName; ///< String representation of parent.
|
||||
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath; ///< DevicePath for Parent.
|
||||
|
||||
CHAR16 *FullName; ///< Path and file name for this file
|
||||
CHAR16 *FileName; ///< File name for this file
|
||||
CHAR16 *FullName; ///< Path and file name for this file.
|
||||
CHAR16 *FileName; ///< File name for this file.
|
||||
|
||||
EFI_FILE_HANDLE Handle; ///< Handle to this file
|
||||
EFI_FILE_INFO *Info; ///< Pointer to file info for this file
|
||||
EFI_FILE_HANDLE Handle; ///< Handle to this file.
|
||||
EFI_FILE_INFO *Info; ///< Pointer to file info for this file.
|
||||
} SHELL_FILE_ARG;
|
||||
|
||||
/// Signature for SHELL_FILE_ARG
|
||||
#define SHELL_FILE_ARG_SIGNATURE SIGNATURE_32 ('g', 'r', 'a', 'f')
|
||||
/// Signature for SHELL_FILE_ARG.
|
||||
#define SHELL_FILE_ARG_SIGNATURE SIGNATURE_32 ('g', 'r', 'a', 'f')
|
||||
|
||||
/**
|
||||
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
|
||||
|
||||
/**
|
||||
Execute a command line
|
||||
Execute a command line.
|
||||
|
||||
This function will run the CommandLine. This includes loading any required images,
|
||||
parsing any requires scripts, and it DebugOutput is TRUE printing errors
|
||||
This function will run the CommandLine. This includes loading any required images,
|
||||
parsing any requires scripts, and if DebugOutput is TRUE printing errors
|
||||
encountered directly to the screen.
|
||||
|
||||
|
||||
@param ParentImageHandle Handle of image executing this operation.
|
||||
@param CommandLine The string command line to execute.
|
||||
@param DebugOutput TRUE indicates that errors should be printed directly.
|
||||
|
@ -144,15 +144,15 @@ EFI_STATUS
|
|||
/**
|
||||
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.
|
||||
|
||||
@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
|
||||
CHAR16 *
|
||||
typedef
|
||||
CHAR16 *
|
||||
(EFIAPI *SHELLENV_GET_ENV) (
|
||||
IN CHAR16 *Name
|
||||
);
|
||||
|
@ -160,15 +160,15 @@ CHAR16 *
|
|||
/**
|
||||
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.
|
||||
|
||||
@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
|
||||
CHAR16 *
|
||||
typedef
|
||||
CHAR16 *
|
||||
(EFIAPI *SHELLENV_GET_MAP) (
|
||||
IN CHAR16 *Name
|
||||
);
|
||||
|
@ -180,7 +180,7 @@ CHAR16 *
|
|||
list in the correct location.
|
||||
|
||||
@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.
|
||||
|
||||
@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
|
||||
and then resave the info.
|
||||
|
||||
@param SaveId Save this change as an EFI variable.
|
||||
@param Protocol The protocol's GUID.
|
||||
@param DumpToken The function pointer to dump token function or
|
||||
@param Protocol Pointer to the protocol's GUID.
|
||||
@param DumpToken The function pointer to dump token function or
|
||||
NULL.
|
||||
@param DumpInfo The function pointer to dump infomation function
|
||||
@param DumpInfo The function pointer to dump infomation function
|
||||
or NULL.
|
||||
@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
|
||||
found it will return the name of that protocol. If no name is found and
|
||||
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
|
||||
GenId is TRUE it will generate ths string.
|
||||
|
||||
@param Protocol The GUID of the protocol to look for.
|
||||
|
@ -233,45 +232,46 @@ VOID
|
|||
@return !NULL The Name of the protocol.
|
||||
@retval NULL The Name was not found and GenId was not TRUE.
|
||||
**/
|
||||
typedef
|
||||
typedef
|
||||
CHAR16*
|
||||
(EFIAPI *SHELLENV_GET_PROT) (
|
||||
IN EFI_GUID *Protocol,
|
||||
IN EFI_GUID *Protocol,
|
||||
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
|
||||
device. If DeviceName is NULL, then return the current directory on the
|
||||
If DeviceName is specified, then return the current shell directory on that
|
||||
device. If DeviceName is NULL, then return the current directory on the
|
||||
current device. The caller us responsible to free the returned string when
|
||||
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.
|
||||
|
||||
@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*
|
||||
(EFIAPI *SHELLENV_CUR_DIR) (
|
||||
IN CHAR16 *DeviceName OPTIONAL
|
||||
);
|
||||
|
||||
/**
|
||||
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
|
||||
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
|
||||
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
|
||||
LIST_ENTRY linked list structure. Use this in conjunction with 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
|
||||
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.
|
||||
|
||||
@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.
|
||||
|
||||
@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.
|
||||
|
||||
@retval EFI_SUCCESS always returned.
|
||||
@retval EFI_SUCCESS Always returned.
|
||||
**/
|
||||
typedef
|
||||
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.
|
||||
|
||||
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
|
||||
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
|
||||
memory.
|
||||
|
||||
@param ImageHandle The handle which will use the new ShellInterface
|
||||
@param ImageHandle The handle which will use the new ShellInterface
|
||||
protocol.
|
||||
|
||||
@return the newly allocated shell interface protocol.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_SHELL_INTERFACE*
|
||||
typedef
|
||||
EFI_SHELL_INTERFACE*
|
||||
(EFIAPI *SHELLENV_NEW_SHELL) (
|
||||
IN EFI_HANDLE ImageHandle
|
||||
);
|
||||
|
@ -322,8 +322,8 @@ EFI_SHELL_INTERFACE*
|
|||
/**
|
||||
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
|
||||
know for some shell commands whether they are being run manually or as part of a
|
||||
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
|
||||
script.
|
||||
|
||||
@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.
|
||||
**/
|
||||
typedef
|
||||
|
@ -348,9 +348,9 @@ VOID
|
|||
/**
|
||||
This function enables the page break mode.
|
||||
|
||||
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
|
||||
characters will be chopped and divided into 2 rows. If FALSE then rows with
|
||||
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
|
||||
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.
|
||||
|
||||
@param StartRow The row number to start this on.
|
||||
|
@ -366,7 +366,7 @@ VOID
|
|||
/**
|
||||
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.
|
||||
**/
|
||||
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:
|
||||
|
||||
#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:
|
||||
#define EFI_OUTPUT_SCROLL 0x00000001
|
||||
|
@ -422,10 +422,10 @@ UINT32
|
|||
/**
|
||||
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.
|
||||
|
||||
@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.
|
||||
@retval FALSE Continue as normal.
|
||||
**/
|
||||
|
@ -470,14 +470,14 @@ BOOLEAN
|
|||
/**
|
||||
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.
|
||||
|
||||
|
||||
@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.
|
||||
@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.
|
||||
**/
|
||||
typedef
|
||||
|
@ -494,7 +494,7 @@ VOID
|
|||
//
|
||||
/**
|
||||
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.
|
||||
**/
|
||||
typedef
|
||||
|
@ -506,8 +506,8 @@ VOID
|
|||
/**
|
||||
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
|
||||
found EFI_NOT_FOUND is returned. If the previous Handle was the last handle
|
||||
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
|
||||
it is set to NULL before returning.
|
||||
|
||||
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 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
|
||||
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
|
||||
no skip is performed.
|
||||
|
||||
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 function resets the the handle database so that NEXT_HANDLE and SKIP_HANDLE
|
||||
will start from EnumIndex on the next call.
|
||||
|
||||
This function resets the the handle database so that NEXT_HANDLE and SKIP_HANDLE
|
||||
will start from EnumIndex on the next call.
|
||||
|
||||
This must be called after INIT_HANDLE_ENUMERATOR and before CLOSE_HANDLE_ENUMERATOR.
|
||||
|
||||
@param EnumIndex Where to start.
|
||||
|
@ -564,11 +564,11 @@ UINTN
|
|||
|
||||
/**
|
||||
This is an internal shell function to enumerate the handle database.
|
||||
|
||||
|
||||
This must be called after INIT_HANDLE_ENUMERATOR.
|
||||
|
||||
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.
|
||||
**/
|
||||
typedef
|
||||
|
@ -581,7 +581,7 @@ VOID
|
|||
This is an internal shell function to enumerate 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.
|
||||
|
||||
@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 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
|
||||
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 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.
|
||||
|
||||
@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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
**/
|
||||
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
|
||||
no protocol enumerator calls except INIT_PROTOCOL_INFO_ENUMERATOR may be made.
|
||||
|
@ -726,22 +726,22 @@ typedef struct {
|
|||
} 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
|
||||
or it's parent device (if required) will be used to obtain the name of the
|
||||
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
|
||||
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 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.
|
||||
|
||||
This function will furthur verify whether the handle in question produced either
|
||||
EFI_DRIVER_CONFIGRATION_PROTOCOL or EFI_DRIVER_CONFIGURATION2_PROTOCOL and also
|
||||
whether the handle in question produced either EFI_DRIVER_DIAGNOSTICS_PROTOCOL or
|
||||
EFI_DRIVER_CONFIGRATION_PROTOCOL or EFI_DRIVER_CONFIGURATION2_PROTOCOL and also
|
||||
whether the handle in question produced either EFI_DRIVER_DIAGNOSTICS_PROTOCOL or
|
||||
EFI_DRIVER_DIAGNOSTICS2_PROTOCOL.
|
||||
|
||||
|
||||
Upon sucessful return the memory for *BestDeviceName is up to the caller to free.
|
||||
|
||||
@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
|
||||
|
||||
/**
|
||||
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.
|
||||
|
||||
@param Mode Returns a string representing one of the
|
||||
@param Mode Returns a string representing one of the
|
||||
2 supported modes of the shell.
|
||||
|
||||
@retval EFI_SUCCESS This function always returns success.
|
||||
|
@ -792,17 +792,17 @@ EFI_STATUS
|
|||
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 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.
|
||||
|
||||
If anything prevents the complete conversion free any allocated memory and
|
||||
If anything prevents the complete conversion free any allocated memory and
|
||||
return NULL.
|
||||
|
||||
@retval !NULL A pointer to the callee allocated Device Path.
|
||||
@retval NULL The operation could not be completed.
|
||||
**/
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *SHELLENV_NAME_TO_PATH) (
|
||||
IN CHAR16 *Path
|
||||
);
|
||||
|
@ -813,19 +813,19 @@ EFI_DEVICE_PATH_PROTOCOL*
|
|||
If DevPath is NULL, then ASSERT.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@param DevPath The device path to search for a name for.
|
||||
@param ConsistMapping What state to verify map flag VAR_ID_CONSIST.
|
||||
@param Name On sucessful return the name of that device path.
|
||||
|
||||
@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_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
|
||||
support the wildcard characters ('?' and '*') in the Arg path. If there are
|
||||
any wildcard characters in the path this function will return
|
||||
EFI_INVALID_PARAMETER. The return is a double linked list based on the
|
||||
LIST_ENTRY linked list structure. Use this in conjunction with the
|
||||
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
|
||||
any wildcard characters in the path this function will return
|
||||
EFI_INVALID_PARAMETER. The return is a double linked list based on 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.
|
||||
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.
|
||||
|
||||
@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.
|
||||
|
||||
@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 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
|
||||
files in the list of returned files. Any file listed twice will have one of its
|
||||
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.
|
||||
|
||||
|
@ -890,20 +890,20 @@ EFI_STATUS
|
|||
|
||||
if DevPath is NULL, then ASSERT().
|
||||
|
||||
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
|
||||
updated to point to that file systems device path. The caller should not
|
||||
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
|
||||
updated to point to that file systems device path. The caller should not
|
||||
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.
|
||||
|
||||
@param Name Pointer to NULL terminated UNICODE string of the
|
||||
@param Name Pointer to NULL terminated UNICODE string of the
|
||||
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.
|
||||
|
||||
@retval EFI_SUCCESS The conversion was successful and the device
|
||||
@retval EFI_SUCCESS The conversion was successful and the device
|
||||
path was returned.
|
||||
@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 applications Entry Point. Once the application returns from it's
|
||||
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,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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
|
||||
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,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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 {
|
||||
///
|
||||
/// 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
|
||||
/// path of the executable. Any quotation marks that were used to preserve
|
||||
/// whitespace have been removed.
|
||||
|
@ -31,7 +31,7 @@ typedef struct _EFI_SHELL_PARAMETERS_PROTOCOL {
|
|||
|
||||
///
|
||||
/// The number of elements in the Argv array.
|
||||
///
|
||||
///
|
||||
UINTN Argc;
|
||||
|
||||
///
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/** @file
|
||||
Root include file for Shell Package modules that utilize the SHELL_RETURN type
|
||||
|
||||
Copyright (c), 2009, Intel Corporation<BR>
|
||||
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
|
||||
Copyright (c) 2009-2010, Intel Corporation.All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@ -70,7 +70,7 @@ SHELL_WRITE_PROTECTED = 8,
|
|||
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.
|
||||
///
|
||||
SHELL_VOLUME_CORRUPTED = 10,
|
||||
|
@ -81,7 +81,7 @@ SHELL_VOLUME_CORRUPTED = 10,
|
|||
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.
|
||||
///
|
||||
SHELL_NO_MEDIA = 12,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#/** @file
|
||||
# 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
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
@ -42,7 +42,7 @@
|
|||
|
||||
[Protocols]
|
||||
gEfiSimpleFileSystemProtocolGuid # ALWAYS_USED
|
||||
|
||||
|
||||
[Guids]
|
||||
gEfiFileInfoGuid # ALWAYS_CONSUMED
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/** @file
|
||||
Library used for sorting routines.
|
||||
|
||||
Copyright (c) 2009, Intel Corporation<BR>
|
||||
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
|
||||
Copyright (c) 2009-2010, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
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/DebugLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/SortLib.h>
|
||||
#include <Library/SortLib.h>
|
||||
|
||||
/**
|
||||
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
|
||||
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
|
||||
allocate and free buffers constantly.
|
||||
|
||||
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
|
||||
@param[in] Count the number of elements in the buffer to sort
|
||||
@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
|
||||
@param[in] Buffer Buffer of size ElementSize for use in swapping
|
||||
**/
|
||||
|
@ -60,7 +60,7 @@ QuickSortWorker (
|
|||
ASSERT(CompareFunction != NULL);
|
||||
ASSERT(Buffer != NULL);
|
||||
|
||||
if ( Count < 2
|
||||
if ( Count < 2
|
||||
|| ElementSize < 1
|
||||
){
|
||||
return;
|
||||
|
@ -78,7 +78,7 @@ QuickSortWorker (
|
|||
// and everything "right" are above it
|
||||
//
|
||||
for ( LoopCount = 0
|
||||
; LoopCount < Count -1
|
||||
; LoopCount < Count -1
|
||||
; LoopCount++
|
||||
){
|
||||
//
|
||||
|
@ -86,7 +86,7 @@ QuickSortWorker (
|
|||
//
|
||||
if (CompareFunction((VOID*)((UINT8*)BufferToSort+((LoopCount)*ElementSize)),Pivot) <= 0){
|
||||
//
|
||||
// swap
|
||||
// swap
|
||||
//
|
||||
CopyMem (Buffer, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
|
||||
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), (UINT8*)BufferToSort+((LoopCount)*ElementSize), ElementSize);
|
||||
|
@ -94,7 +94,7 @@ QuickSortWorker (
|
|||
|
||||
//
|
||||
// increment NextSwapLocation
|
||||
//
|
||||
//
|
||||
NextSwapLocation++;
|
||||
}
|
||||
}
|
||||
|
@ -106,20 +106,20 @@ QuickSortWorker (
|
|||
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...
|
||||
//
|
||||
QuickSortWorker(
|
||||
BufferToSort,
|
||||
NextSwapLocation,
|
||||
ElementSize,
|
||||
BufferToSort,
|
||||
NextSwapLocation,
|
||||
ElementSize,
|
||||
CompareFunction,
|
||||
Buffer);
|
||||
|
||||
QuickSortWorker(
|
||||
(UINT8 *)BufferToSort + (NextSwapLocation+1) * ElementSize,
|
||||
Count - NextSwapLocation - 1,
|
||||
ElementSize,
|
||||
Count - NextSwapLocation - 1,
|
||||
ElementSize,
|
||||
CompareFunction,
|
||||
Buffer);
|
||||
|
||||
|
@ -140,7 +140,7 @@ QuickSortWorker (
|
|||
on return a buffer of sorted elements
|
||||
@param[in] Count the number of elements in the buffer to sort
|
||||
@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
|
||||
**/
|
||||
VOID
|
||||
|
@ -173,7 +173,7 @@ PerformQuickSort (
|
|||
|
||||
/**
|
||||
Not supported in Base version.
|
||||
|
||||
|
||||
ASSERT and return 0.
|
||||
**/
|
||||
INTN
|
||||
|
@ -194,7 +194,7 @@ DevicePathCompare (
|
|||
|
||||
@retval 0 Buffer1 equal to Buffer2.
|
||||
@return < 0 Buffer1 is less than Buffer2.
|
||||
@return > 0 Buffer1 is greater than Buffer2.
|
||||
@return > 0 Buffer1 is greater than Buffer2.
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#/** @file
|
||||
# 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
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/** @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>
|
||||
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
|
||||
Copyright (c) 2009-2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
@ -53,7 +53,7 @@ ShellCEntryLib (
|
|||
EfiShellParametersProtocol = NULL;
|
||||
EfiShellInterface = NULL;
|
||||
|
||||
Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
|
||||
Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
|
||||
&gEfiShellParametersProtocolGuid,
|
||||
(VOID **)&EfiShellParametersProtocol,
|
||||
ImageHandle,
|
||||
|
@ -72,7 +72,7 @@ ShellCEntryLib (
|
|||
//
|
||||
// try to get shell 1.0 interface instead.
|
||||
//
|
||||
Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
|
||||
Status = SystemTable->BootServices->OpenProtocol(ImageHandle,
|
||||
&gEfiShellInterfaceGuid,
|
||||
(VOID **)&EfiShellInterface,
|
||||
ImageHandle,
|
||||
|
@ -82,7 +82,7 @@ ShellCEntryLib (
|
|||
if (!EFI_ERROR(Status)) {
|
||||
//
|
||||
// use shell 1.0 interface
|
||||
//
|
||||
//
|
||||
ReturnFromMain = ShellAppMain (
|
||||
EfiShellInterface->Argc,
|
||||
EfiShellInterface->Argv
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#/** @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
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
|||
/** @file
|
||||
Provides interface to shell functionality for shell commands and applications.
|
||||
|
||||
Copyright (c) 2006 - 2010, Intel Corporation<BR>
|
||||
All rights reserved. This program and the accompanying materials
|
||||
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#/** @file
|
||||
# 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
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
@ -50,8 +50,8 @@
|
|||
|
||||
[Protocols]
|
||||
gEfiSimpleFileSystemProtocolGuid # ALWAYS_CONSUMED
|
||||
|
||||
# shell 2.0
|
||||
|
||||
# shell 2.0
|
||||
gEfiShellProtocolGuid # SOMETIMES_CONSUMED
|
||||
gEfiShellParametersProtocolGuid # SOMETIMES_CONSUMED
|
||||
|
||||
|
@ -66,4 +66,4 @@
|
|||
[Pcd.common]
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize # ALWAYS_CONSUMED
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize # ALWAYS_CONSUMED
|
||||
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength # ALWAYS_CONSUMED
|
||||
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength # ALWAYS_CONSUMED
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/** @file
|
||||
Library used for sorting routines.
|
||||
|
||||
Copyright (c) 2009, Intel Corporation<BR>
|
||||
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
|
||||
Copyright (c) 2009-2010, Intel Corporation. All rights reserved. <BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
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.
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
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/DebugLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/SortLib.h>
|
||||
#include <Library/SortLib.h>
|
||||
|
||||
STATIC EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathToText = NULL;
|
||||
STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
|
||||
|
||||
|
||||
/**
|
||||
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
|
||||
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
|
||||
allocate and free buffers constantly.
|
||||
|
||||
Each element must be equal sized.
|
||||
|
@ -47,7 +47,7 @@ STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
|
|||
on return a buffer of sorted elements
|
||||
@param[in] Count the number of elements in the buffer to sort
|
||||
@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
|
||||
@param[in] Buffer Buffer of size ElementSize for use in swapping
|
||||
**/
|
||||
|
@ -69,7 +69,7 @@ QuickSortWorker (
|
|||
ASSERT(CompareFunction != NULL);
|
||||
ASSERT(Buffer != NULL);
|
||||
|
||||
if ( Count < 2
|
||||
if ( Count < 2
|
||||
|| ElementSize < 1
|
||||
){
|
||||
return;
|
||||
|
@ -87,7 +87,7 @@ QuickSortWorker (
|
|||
// and everything "right" are above it
|
||||
//
|
||||
for ( LoopCount = 0
|
||||
; LoopCount < Count -1
|
||||
; LoopCount < Count -1
|
||||
; LoopCount++
|
||||
){
|
||||
//
|
||||
|
@ -95,7 +95,7 @@ QuickSortWorker (
|
|||
//
|
||||
if (CompareFunction((VOID*)((UINT8*)BufferToSort+((LoopCount)*ElementSize)),Pivot) <= 0){
|
||||
//
|
||||
// swap
|
||||
// swap
|
||||
//
|
||||
CopyMem (Buffer, (UINT8*)BufferToSort+(NextSwapLocation*ElementSize), ElementSize);
|
||||
CopyMem ((UINT8*)BufferToSort+(NextSwapLocation*ElementSize), (UINT8*)BufferToSort+((LoopCount)*ElementSize), ElementSize);
|
||||
|
@ -103,7 +103,7 @@ QuickSortWorker (
|
|||
|
||||
//
|
||||
// increment NextSwapLocation
|
||||
//
|
||||
//
|
||||
NextSwapLocation++;
|
||||
}
|
||||
}
|
||||
|
@ -115,20 +115,20 @@ QuickSortWorker (
|
|||
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...
|
||||
//
|
||||
QuickSortWorker(
|
||||
BufferToSort,
|
||||
NextSwapLocation,
|
||||
ElementSize,
|
||||
BufferToSort,
|
||||
NextSwapLocation,
|
||||
ElementSize,
|
||||
CompareFunction,
|
||||
Buffer);
|
||||
|
||||
QuickSortWorker(
|
||||
(UINT8 *)BufferToSort + (NextSwapLocation+1) * ElementSize,
|
||||
Count - NextSwapLocation - 1,
|
||||
ElementSize,
|
||||
Count - NextSwapLocation - 1,
|
||||
ElementSize,
|
||||
CompareFunction,
|
||||
Buffer);
|
||||
|
||||
|
@ -149,7 +149,7 @@ QuickSortWorker (
|
|||
on return a buffer of sorted elements
|
||||
@param[in] Count the number of elements in the buffer to sort
|
||||
@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
|
||||
**/
|
||||
VOID
|
||||
|
@ -188,7 +188,7 @@ PerformQuickSort (
|
|||
|
||||
@retval 0 Buffer1 equal to Buffer2
|
||||
@return < 0 Buffer1 is less than Buffer2
|
||||
@return > 0 Buffer1 is greater than Buffer2
|
||||
@return > 0 Buffer1 is greater than Buffer2
|
||||
**/
|
||||
INTN
|
||||
DevicePathCompare (
|
||||
|
@ -202,7 +202,7 @@ DevicePathCompare (
|
|||
CHAR16 *TextPath2;
|
||||
EFI_STATUS Status;
|
||||
INTN RetVal;
|
||||
|
||||
|
||||
DevicePath1 = *(EFI_DEVICE_PATH_PROTOCOL**)Buffer1;
|
||||
DevicePath2 = *(EFI_DEVICE_PATH_PROTOCOL**)Buffer2;
|
||||
|
||||
|
@ -217,7 +217,7 @@ DevicePathCompare (
|
|||
if (DevicePath2 == NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (mDevicePathToText == NULL) {
|
||||
Status = gBS->LocateProtocol(
|
||||
&gEfiDevicePathToTextProtocolGuid,
|
||||
|
@ -245,7 +245,7 @@ DevicePathCompare (
|
|||
DevicePath2,
|
||||
FALSE,
|
||||
FALSE);
|
||||
|
||||
|
||||
RetVal = mUnicodeCollation->StriColl(
|
||||
mUnicodeCollation,
|
||||
TextPath1,
|
||||
|
@ -265,7 +265,7 @@ DevicePathCompare (
|
|||
|
||||
@retval 0 Buffer1 equal to Buffer2.
|
||||
@return < 0 Buffer1 is less than Buffer2.
|
||||
@return > 0 Buffer1 is greater than Buffer2.
|
||||
@return > 0 Buffer1 is greater than Buffer2.
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#/** @file
|
||||
# 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
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
# http://opensource.org/licenses/bsd-license.php
|
||||
|
|
Loading…
Reference in New Issue