Kernel/LibC: dirent now contains file type
This commit is contained in:
@@ -13,10 +13,20 @@ __BEGIN_DECLS
|
||||
struct __DIR;
|
||||
typedef struct __DIR DIR;
|
||||
|
||||
#define DT_UNKNOWN 0
|
||||
#define DT_REG 1
|
||||
#define DT_DIR 2
|
||||
#define DT_CHR 3
|
||||
#define DT_BLK 4
|
||||
#define DT_FIFO 5
|
||||
#define DT_SOCK 6
|
||||
#define DT_LNK 7
|
||||
|
||||
struct dirent
|
||||
{
|
||||
ino_t d_ino; /* File serial number. */
|
||||
char d_name[]; /* Filename string of entry. */
|
||||
ino_t d_ino; /* File serial number. */
|
||||
unsigned char d_type; /* File type. One of DT_* definitions. */
|
||||
char d_name[]; /* Filename string of entry. */
|
||||
};
|
||||
|
||||
int alphasort(const struct dirent** d1, const struct dirent** d2);
|
||||
|
||||
Reference in New Issue
Block a user