]> git.proxmox.com Git - mirror_edk2.git/commitdiff
StdLib: Fix dirent structure members to be of the correct type.
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 2 Nov 2011 23:41:29 +0000 (23:41 +0000)
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 2 Nov 2011 23:41:29 +0000 (23:41 +0000)
The type of the time values in a UEFI directory entry are EFI_TIME, not timeval.

Signed-off-by: darylm503
Reviewed-by: lgrosenb
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12651 6f19259b-4bc3-4df7-8a09-765794883524

StdLib/Include/sys/dirent.h

index 64b46e4d46e52446efa1150ad2814616af1a2d77..2c171de5b79de96b38043efa9c4d61996610fb20 100644 (file)
    @(#)dirent.h  8.3 (Berkeley) 8/10/94\r
    NetBSD: dirent.h,v 1.23 2005/12/26 18:41:36 perry Exp\r
 **/\r
-\r
 #ifndef _SYS_DIRENT_H_\r
 #define _SYS_DIRENT_H_\r
 \r
+#include  <Uefi.h>\r
+\r
 #include  <sys/featuretest.h>\r
 #include  <time.h>\r
 #include  <sys/time.h>\r
@@ -70,13 +71,19 @@ struct dirent {
   UINT64            FileSize;           // The size of the file in bytes.\r
   UINT64            PhysicalSize;       // The amount of physical space the file consumes\r
                                         // on the file system volume.\r
-  struct timespec   CreateTime;         // The time the file was created.\r
-  struct timespec   LastAccessTime;     // The time when the file was last accessed.\r
-  struct timespec   ModificationTime;   // The time when the file's contents were last modified.\r
+  EFI_TIME          CreateTime;         // The time the file was created.\r
+  EFI_TIME          LastAccessTime;     // The time when the file was last accessed.\r
+  EFI_TIME          ModificationTime;   // The time when the file's contents were last modified.\r
   UINT64            Attribute;          // (d_type)   The attribute bits for the file. See below.\r
   CHAR16            FileName[1];        // (d_name)   The Null-terminated name of the file.\r
 };\r
 \r
+/* For compatibility */\r
+#define   d_name    FileName\r
+#define   d_type    Attribute\r
+#define   d_reclen  Size\r
+\r
+\r
 /*\r
  * File Attributes\r
  */\r