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
This commit is contained in:
darylm503 2011-11-02 23:41:29 +00:00
parent b2800dde84
commit c84d88fa7c
1 changed files with 11 additions and 4 deletions

View File

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