summaryrefslogtreecommitdiff
path: root/com32/include/sys/dirent.h
blob: cc2916e1ff5bcbaabbc13735679fa419c086ea12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * sys/dirent.h
 */

#ifndef DIRENT_H
#define DIRENT_H

#include <stdint.h>

#ifndef NAME_MAX
#define NAME_MAX 255
#endif

struct dirent {
    uint32_t d_ino;
    uint32_t d_off;
    uint16_t d_reclen;
    uint16_t d_type;
    char d_name[NAME_MAX + 1];
};

struct file;

typedef struct {
    struct file *dd_dir;
} DIR;

#define DIR_REC_LEN(name) (12 + strlen(name) + 1 + 3) & ~3

#endif /* sys/dirent.h */