]> git.proxmox.com Git - mirror_edk2.git/commitdiff
StdLib: Remove files obsoleted by changelist 12649.
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 2 Nov 2011 19:30:43 +0000 (19:30 +0000)
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 2 Nov 2011 19:30:43 +0000 (19:30 +0000)
Signed-off-by: darylm503
Reviewed-by: lgrosenb
Reviewed-by: lpleahy
Reviewed-by: jljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12650 6f19259b-4bc3-4df7-8a09-765794883524

StdLib/PosixLib/Glob/DirFunctions.c [deleted file]
StdLib/PosixLib/Glob/internal.h [deleted file]

diff --git a/StdLib/PosixLib/Glob/DirFunctions.c b/StdLib/PosixLib/Glob/DirFunctions.c
deleted file mode 100644 (file)
index db495e3..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/** @file\r
-  Implement the opendir, closedir, and readdir functions.\r
-\r
-  Copyright (c) 2011, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include "internal.h"\r
-#include <Library/ShellLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/BaseLib.h>\r
-\r
-typedef struct {\r
-  UINT32            Signature;\r
-  SHELL_FILE_HANDLE DirHandle;\r
-  EFI_FILE_INFO     *FileInfo;\r
-  struct dirent     *DirentStructure;\r
-} DIR_STRUCTURE;\r
-  \r
-DIR *                  opendir(const char * AsciiFileName)\r
-{\r
-  EFI_STATUS        Status;\r
-  DIR_STRUCTURE     *DirStruct;\r
-  CHAR16            *FileName;\r
-\r
-  DirStruct = (DIR_STRUCTURE*)AllocateZeroPool(sizeof(DIR_STRUCTURE));\r
-  if (DirStruct == NULL) {\r
-    errno = ENOMEM;\r
-    return NULL;\r
-  }\r
-\r
-  FileName = (CHAR16*)AllocateZeroPool((1+AsciiStrLen(AsciiFileName))*sizeof(CHAR16));\r
-  if (FileName == NULL) {\r
-    FreePool(DirStruct);\r
-    errno = ENOMEM;\r
-    return NULL;\r
-  }\r
-  AsciiStrToUnicodeStr(AsciiFileName, FileName);\r
-\r
-  Status = ShellOpenFileByName(FileName, &DirStruct->DirHandle, EFI_FILE_MODE_READ, 0);\r
-  FreePool(FileName);\r
-  if (EFI_ERROR(Status)) {\r
-    errno = ENOENT;\r
-    FreePool(DirStruct);\r
-    return NULL;\r
-  }\r
-  DirStruct->Signature = 0x08675309;\r
-  return ((DIR*)DirStruct);\r
-}\r
-\r
-int                    closedir(DIR * DirPointer)\r
-{\r
-  DIR_STRUCTURE     *DirStruct;\r
-\r
-  if (DirPointer == NULL) {\r
-    return 0;\r
-  }\r
-\r
-  DirStruct = (DIR_STRUCTURE*)DirPointer;\r
-  if (DirStruct->Signature != 0x08675309) {\r
-    return 0;\r
-  }\r
-\r
-  ShellCloseFile(DirStruct->DirHandle);\r
-  SHELL_FREE_NON_NULL(DirStruct->FileInfo);\r
-  SHELL_FREE_NON_NULL(DirStruct->DirentStructure);\r
-  SHELL_FREE_NON_NULL(DirStruct);\r
-  \r
-  return 0;\r
-}\r
-\r
-struct dirent *        readdir(DIR * DirPointer)\r
-{\r
-  DIR_STRUCTURE     *DirStruct;\r
-  EFI_STATUS        Status;\r
-  BOOLEAN           NoFile;\r
-\r
-  NoFile = FALSE;\r
-\r
-  if (DirPointer == NULL) {\r
-    errno = EBADF;\r
-    return NULL;\r
-  }\r
-\r
-  DirStruct = (DIR_STRUCTURE*)DirPointer;\r
-  if (DirStruct->Signature != 0x08675309) {\r
-    errno = EBADF;\r
-    return NULL;\r
-  }\r
-\r
-  if (DirStruct->FileInfo == NULL) {\r
-    Status = ShellFindFirstFile(DirStruct->DirHandle, &(DirStruct->FileInfo));\r
-  } else {\r
-    Status = ShellFindNextFile(DirStruct->DirHandle, DirStruct->FileInfo, &NoFile);\r
-  }\r
-\r
-  if (EFI_ERROR(Status)) {\r
-    errno = ENOENT;\r
-    return NULL;\r
-  }\r
-\r
-  if (NoFile) {\r
-    return (NULL);\r
-  }\r
-\r
-  SHELL_FREE_NON_NULL(DirStruct->DirentStructure);\r
-\r
-  DirStruct->DirentStructure = AllocateZeroPool(sizeof(DIR_STRUCTURE)+(StrSize(DirStruct->FileInfo->FileName)));\r
-  if (DirStruct->DirentStructure == NULL) {\r
-    errno = ENOMEM;\r
-    return NULL;\r
-  }\r
-\r
-  StrCpy(DirStruct->FileInfo->FileName, DirStruct->DirentStructure->FileName);\r
-\r
-  DirStruct->DirentStructure->FileSize                 = DirStruct->FileInfo->FileSize;\r
-  DirStruct->DirentStructure->PhysicalSize             = DirStruct->FileInfo->PhysicalSize;\r
-  DirStruct->DirentStructure->Attribute                = DirStruct->FileInfo->Attribute;\r
-  DirStruct->DirentStructure->CreateTime.tv_sec        = Efi2Time(&DirStruct->FileInfo->CreateTime);\r
-  DirStruct->DirentStructure->CreateTime.tv_nsec       = DirStruct->FileInfo->CreateTime.Nanosecond;\r
-  DirStruct->DirentStructure->LastAccessTime.tv_nsec   = Efi2Time(&DirStruct->FileInfo->LastAccessTime);\r
-  DirStruct->DirentStructure->LastAccessTime.tv_sec    = DirStruct->FileInfo->LastAccessTime.Nanosecond;\r
-  DirStruct->DirentStructure->ModificationTime.tv_sec  = Efi2Time(&DirStruct->FileInfo->ModificationTime);\r
-  DirStruct->DirentStructure->ModificationTime.tv_nsec = DirStruct->FileInfo->ModificationTime.Nanosecond;\r
-  DirStruct->DirentStructure->Size                     = StrSize(DirStruct->DirentStructure->FileName) + sizeof(DIR_STRUCTURE);\r
-\r
-  return (DirStruct->DirentStructure);\r
-}\r
diff --git a/StdLib/PosixLib/Glob/internal.h b/StdLib/PosixLib/Glob/internal.h
deleted file mode 100644 (file)
index c65a7ca..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/** @file\r
-  Implement the invalid functions to return failures.\r
-\r
-  Copyright (c) 2011, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <errno.h>\r
-#include <dirent.h>\r
-#include <sysexits.h>\r
-\r
-typedef VOID* DIR;\r
-\r
-struct dirent *        readdir(DIR *);\r
-int                    closedir(DIR *);\r
-DIR *                  opendir(const char *);\r