The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
dirent.h File Reference
#include "common/stdint.h"

Go to the source code of this file.

Data Structures

struct  kdirent

Macros

#define DT_UNKNOWN   0
 the directory records getdents writes.
#define DT_FIFO   1
#define DT_CHR   2
#define DT_DIR   4
#define DT_BLK   6
#define DT_REG   8
#define DT_LNK   10
#define DT_SOCK   12
#define KDIRENT_HEADER   7

Functions

struct kdirent __attribute__ ((packed))

Variables

uint32_t d_ino
uint16_t d_reclen
uint8_t d_type
char d_name []

Macro Definition Documentation

◆ DT_UNKNOWN

#define DT_UNKNOWN   0

the directory records getdents writes.

the layout and the DT_ values are ABI: the libc's <dirent.h> reads the same ones.

records follow each other in the buffer; d_reclen is the size of one record, its name and NUL included, rounded up to 4 bytes.

◆ DT_FIFO

#define DT_FIFO   1

◆ DT_CHR

#define DT_CHR   2

◆ DT_DIR

#define DT_DIR   4

◆ DT_BLK

#define DT_BLK   6

◆ DT_REG

#define DT_REG   8

◆ DT_LNK

#define DT_LNK   10

◆ DT_SOCK

#define DT_SOCK   12

◆ KDIRENT_HEADER

#define KDIRENT_HEADER   7

Function Documentation

◆ __attribute__()

struct __attribute__ ( (packed) )

Variable Documentation

◆ d_ino

uint32_t d_ino

◆ d_reclen

uint16_t d_reclen

◆ d_type

uint8_t d_type

◆ d_name

char d_name[]