|
|
1.1 ! root 1: ! 2: #ifndef __DIRENT_H ! 3: #define __DIRENT_H ! 4: ! 5: #include <linux/fs.h> ! 6: #include <stdint.h> ! 7: ! 8: #define NAME_MAX NAME_LEN ! 9: ! 10: struct dirent{ ! 11: long d_ino; ! 12: off_t d_off; ! 13: unsigned short d_reclen; ! 14: char d_name[256]; ! 15: }; ! 16: ! 17: struct dirent64 { ! 18: uint64_t d_ino; ! 19: int64_t d_off; ! 20: uint16_t d_reclen; ! 21: unsigned char d_type; ! 22: char d_name[256]; ! 23: }; ! 24: ! 25: struct __DIR{ ! 26: struct dirent64 d_dent; ! 27: int d_pos; ! 28: int d_fd; ! 29: }; ! 30: ! 31: #define DIR struct __DIR ! 32: ! 33: DIR *opendir (const char *name); ! 34: int closedir (DIR *dir); ! 35: struct dirent *readdir (DIR *dir); ! 36: ! 37: #endif ! 38: ! 39:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.