summaryrefslogtreecommitdiff
path: root/ShellPkg/Application
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-11 18:02:16 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-11 18:02:16 +0000
commitd2b4564ba50b095d5a5e00b9c7bebef004967d5e (patch)
treef646839a453fb83c6c094a876bcbbfac5916834a /ShellPkg/Application
parent446b94b0a1b98635d7db21d67fff158c6f153de4 (diff)
downloadedk2-platforms-d2b4564ba50b095d5a5e00b9c7bebef004967d5e.tar.xz
fixed to build under IPF.
Refactored some commands into FileHandleLib since they are used in many binaries. Added .h for GUID that was missing. Added PCD for initialization of shell apps and shell itself in shell library interaction. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8295 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Application')
-rw-r--r--ShellPkg/Application/ShellLibTestApp/sa3.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/ShellPkg/Application/ShellLibTestApp/sa3.c b/ShellPkg/Application/ShellLibTestApp/sa3.c
index ae677b4dfa..135590bed1 100644
--- a/ShellPkg/Application/ShellLibTestApp/sa3.c
+++ b/ShellPkg/Application/ShellLibTestApp/sa3.c
@@ -52,7 +52,7 @@ UefiMain (
EFI_FILE_INFO *pFileInfo;
UINT64 Size;
BOOLEAN NoFile;
- EFI_SHELL_FILE_INFO *pShellFileInfo, *pShellFileInfo2;
+ EFI_SHELL_FILE_INFO *pShellFileInfo;
LIST_ENTRY *List;
FileHandle = NULL;
@@ -97,7 +97,6 @@ UefiMain (
FreePool(pFileInfo);
pFileInfo = NULL;
Status = ShellCloseFile(&FileHandle);
- ASSERT(FileHandle == NULL);
ASSERT_EFI_ERROR(Status);
Print(L"read, write, create, getinfo - pass\r\n");
@@ -125,7 +124,6 @@ UefiMain (
ASSERT(Size == 0x20);
ASSERT_EFI_ERROR(Status);
Status = ShellCloseFile(&FileHandle);
- ASSERT(FileHandle == NULL);
ASSERT_EFI_ERROR(Status);
Print(L"setinfo and change size, getsize - pass\r\n");
@@ -145,7 +143,6 @@ UefiMain (
FreePool(pFileInfo);
pFileInfo = NULL;
Status = ShellDeleteFile(&FileHandle);
- ASSERT(FileHandle == NULL);
ASSERT_EFI_ERROR(Status);
Print(L"reopen file - pass\r\n");
@@ -163,7 +160,6 @@ UefiMain (
ASSERT((pFileInfo->Attribute&EFI_FILE_DIRECTORY)==0);
FreePool(pFileInfo);
Status = ShellDeleteFile(&FileHandle);
- ASSERT(FileHandle == NULL);
ASSERT_EFI_ERROR(Status);
Print(L"size of empty - pass\r\n");
@@ -183,7 +179,6 @@ UefiMain (
ASSERT(StrCmp(pFileInfo->FileName, FileName) == 0);
ASSERT(pFileInfo->Attribute&EFI_FILE_DIRECTORY);
Status = ShellDeleteFile(&FileHandle);
- ASSERT(FileHandle == NULL);
ASSERT_EFI_ERROR(Status);
Print(L"Directory create - pass\r\n");
@@ -206,7 +201,7 @@ UefiMain (
0
);
ASSERT_EFI_ERROR(Status);
- Status = ShellFindFirstFile(FileHandle, pFileInfo);
+ Status = ShellFindFirstFile(FileHandle, &pFileInfo);
ASSERT_EFI_ERROR(Status);
Status = ShellFindNextFile(FileHandle, pFileInfo, &NoFile);
ASSERT_EFI_ERROR(Status);
@@ -218,7 +213,6 @@ UefiMain (
ASSERT_EFI_ERROR(Status);
/// @todo - why is NoFile never set? limitation of NT32 file system?
Status = ShellDeleteFile(&FileHandle);
- ASSERT(FileHandle == NULL);
ASSERT(Status == RETURN_WARN_DELETE_FAILURE);
Print(L"FindFirst - pass\r\n");
Print(L"FindNext - Verify with real EFI system. Cant verify NoFile under NT32\r\n");
@@ -233,10 +227,7 @@ UefiMain (
ASSERT(pShellFileInfo->Info->FileSize == 0);
ASSERT(StrCmp(pShellFileInfo->Info->FileName, L"File.txt") == 0);
ASSERT(pShellFileInfo->Info->Attribute == 0);
- pShellFileInfo2 = (EFI_SHELL_FILE_INFO*)0x12345678;
- Status = ShellOpenFileMetaArg(L"testDir\\*.*", EFI_FILE_MODE_READ, &pShellFileInfo2);
- ASSERT(pShellFileInfo2 == NULL);
- ASSERT(Status == EFI_UNSUPPORTED);
+
Status = ShellCloseFileMetaArg(&pShellFileInfo);
ASSERT_EFI_ERROR(Status);
Print(L"Open/Close Meta Arg - pass\r\n");
@@ -250,7 +241,6 @@ UefiMain (
);
ASSERT_EFI_ERROR(Status);
Status = ShellDeleteFile(&FileHandle);
- ASSERT(FileHandle == NULL);
StrCpy(FileName, L"testDir");
ASSERT_EFI_ERROR(Status);
Status = ShellOpenFileByName(FileName,
@@ -259,7 +249,6 @@ UefiMain (
0
);
Status = ShellDeleteFile(&FileHandle);
- ASSERT(FileHandle == NULL);
ASSERT_EFI_ERROR(Status);
// get environment variable
@@ -286,7 +275,7 @@ UefiMain (
ASSERT(ShellCommandLineGetFlag(List, L"/Param5") == FALSE);
ASSERT(ShellCommandLineGetFlag(List, L"/Param1") != FALSE);
ASSERT(StrCmp(ShellCommandLineGetValue(List, L"/Param2"), L"Val1")==0);
- ASSERT(StrCmp(ShellCommandLineGetRawValue(List, 0), L"SimpleApplication")==0);
+ ASSERT(StrCmp(ShellCommandLineGetRawValue(List, 0), L"SimpleApplication.efi")==0);
ShellCommandLineFreeVarList(List);
} else {