Changeset 611 for trunk/kernel/syscalls/shared_include
- Timestamp:
- Jan 9, 2019, 3:02:51 PM (6 years ago)
- Location:
- trunk/kernel/syscalls/shared_include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/shared_include/shared_almos.h
r580 r611 52 52 DISPLAY_DQDT = 7, 53 53 DISPLAY_BUSYLOCKS = 8, 54 DISPLAY_MAPPER = 9, 54 55 } 55 56 display_type_t; -
trunk/kernel/syscalls/shared_include/shared_dirent.h
r445 r611 26 26 27 27 /******************************************************************************************* 28 * Th ese two structure defines the informations returned to user by the opendir()29 * function, used by the readdir() function, and released by the closedir() function.30 * - "DIR" describes the complete directory.31 * - "dirent" describes one directory entry.28 * This enum defines the possible types for a dirent inode in a dirent structure. 29 * 30 * WARNING : these types must be kept consistent with inode types in <vfs.h> file. 31 * and with types in <shared_stat.h> file. 32 32 ******************************************************************************************/ 33 33 34 #define DIRENT_NAME_MAX_LENGTH 56 35 #define DIRENT_MAX_NUMBER 63 34 typedef enum 35 { 36 DT_REG = 0, /*! regular file */ 37 DT_DIR = 1, /*! directory */ 38 DT_FIFO = 2, /*! named pipe (FIFO) */ 39 DT_PIPE = 3, /*! anonymous pipe */ 40 DT_SOCK = 4, /*! socket */ 41 DT_CHR = 5, /*! character device */ 42 DT_BLK = 6, /*! block device */ 43 DT_LNK = 7, /*! symbolic link */ 44 DT_UNKNOWN = 8, /*! undetermined type */ 45 } 46 dirent_type_t; 47 48 /******************************************************************************************* 49 * This defines the actual ALMOS-MKH implementation of the DIR user type. 50 ******************************************************************************************/ 51 52 typedef unsigned int DIR; 53 54 /******************************************************************************************* 55 * This structure defines the informations returned to user by the readdir() syscall. 56 * 57 * WARNING: sizeof(dirent) must be 64 bytes. 58 ******************************************************************************************/ 36 59 37 60 struct dirent 38 61 { 39 unsigned int inum; /*! inode identifier */ 40 unsigned int type; /*! inode type */ 41 char name[DIRENT_NAME_MAX_LENGTH]; /*! directory entry name */ 62 int d_ino; /*! inode identifier */ 63 int d_type; /*! inode type */ 64 char d_name[48]; /*! dentry name */ 65 char padding[64 - 48 - (2*sizeof(int))]; 42 66 }; 43 67 44 typedef struct user_directory45 {46 struct dirent entry[DIRENT_MAX_NUMBER];47 unsigned int current;48 }49 DIR;50 51 68 #endif -
trunk/kernel/syscalls/shared_include/shared_stat.h
r594 r611 30 30 *****************************************************************************************/ 31 31 32 typedefstruct stat32 struct stat 33 33 { 34 34 unsigned int st_dev; /*! ID of device containing file */ … … 42 42 unsigned int st_blksize; /*! blocksize for file system I/O */ 43 43 unsigned int st_blocks; /*! number of allocated blocks */ 44 } 45 stat_t; 44 }; 46 45 47 46 /****************************************************************************************** … … 52 51 * 53 52 * WARNING : these macros must be kept consistent with inode types in <vfs.h> file. 53 * and with types in <dirent.h> file. 54 54 *****************************************************************************************/ 55 55 … … 60 60 #define S_ISSOCK(x) ((((x)>>16) & 0xF) == 4) /*! it is a socket */ 61 61 #define S_ISCHR(x) ((((x)>>16) & 0xF) == 5) /*! it is a character device */ 62 #define S_ISLNK(x) ((((x)>>16) & 0xF) == 6) /*! it is a symbolic link */ 62 #define S_ISBLK(x) ((((x)>>16) & 0xF) == 6) /*! it is a block device */ 63 #define S_ISLNK(x) ((((x)>>16) & 0xF) == 7) /*! it is a symbolic link */ 63 64 64 65 #endif /* _STAT_H_ */
Note: See TracChangeset
for help on using the changeset viewer.