summaryrefslogtreecommitdiffstats
path: root/StdLib/Include
diff options
context:
space:
mode:
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-02 23:41:29 +0000
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-02 23:41:29 +0000
commitc84d88fa7cc296838fc88392878869fc968e5ca3 (patch)
tree949b7b95742aae4da38f40aad070076a6692a13b /StdLib/Include
parentb2800dde8438dc91061fa198cfff98e93e321f65 (diff)
downloadedk2-c84d88fa7cc296838fc88392878869fc968e5ca3.tar.gz
edk2-c84d88fa7cc296838fc88392878869fc968e5ca3.tar.bz2
edk2-c84d88fa7cc296838fc88392878869fc968e5ca3.zip
StdLib: Fix dirent structure members to be of the correct type.
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
Diffstat (limited to 'StdLib/Include')
-rw-r--r--StdLib/Include/sys/dirent.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/StdLib/Include/sys/dirent.h b/StdLib/Include/sys/dirent.h
index 64b46e4d46..2c171de5b7 100644
--- a/StdLib/Include/sys/dirent.h
+++ b/StdLib/Include/sys/dirent.h
@@ -43,10 +43,11 @@
@(#)dirent.h 8.3 (Berkeley) 8/10/94
NetBSD: dirent.h,v 1.23 2005/12/26 18:41:36 perry Exp
**/
-
#ifndef _SYS_DIRENT_H_
#define _SYS_DIRENT_H_
+#include <Uefi.h>
+
#include <sys/featuretest.h>
#include <time.h>
#include <sys/time.h>
@@ -70,13 +71,19 @@ struct dirent {
UINT64 FileSize; // The size of the file in bytes.
UINT64 PhysicalSize; // The amount of physical space the file consumes
// on the file system volume.
- struct timespec CreateTime; // The time the file was created.
- struct timespec LastAccessTime; // The time when the file was last accessed.
- struct timespec ModificationTime; // The time when the file's contents were last modified.
+ EFI_TIME CreateTime; // The time the file was created.
+ EFI_TIME LastAccessTime; // The time when the file was last accessed.
+ EFI_TIME ModificationTime; // The time when the file's contents were last modified.
UINT64 Attribute; // (d_type) The attribute bits for the file. See below.
CHAR16 FileName[1]; // (d_name) The Null-terminated name of the file.
};
+/* For compatibility */
+#define d_name FileName
+#define d_type Attribute
+#define d_reclen Size
+
+
/*
* File Attributes
*/