X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/2a49908006b177c4d6354309333d06b1b96e4887..270869139db617e29a35bb9ded41087bb702f9ac:/lunaix-os/includes/usr/lunaix/fcntl_defs.h?ds=inline diff --git a/lunaix-os/includes/usr/lunaix/fcntl_defs.h b/lunaix-os/includes/usr/lunaix/fcntl_defs.h index c6cbe4f..186f5f4 100644 --- a/lunaix-os/includes/usr/lunaix/fcntl_defs.h +++ b/lunaix-os/includes/usr/lunaix/fcntl_defs.h @@ -1,12 +1,18 @@ #ifndef __LUNAIX_SYS_FCNTL_DEFS_H #define __LUNAIX_SYS_FCNTL_DEFS_H -#define FO_CREATE 0x1 -#define FO_APPEND 0x2 -#define FO_DIRECT 0x4 -#define FO_WRONLY 0x8 -#define FO_RDONLY 0x10 -#define FO_RDWR 0x20 +#include "fstypes.h" +#include "types.h" + +#define FO_CREATE 0x1 +#define FO_APPEND 0x2 +#define FO_DIRECT 0x4 +#define FO_WRONLY 0x8 +#define FO_RDONLY 0x10 +#define FO_RDWR 0x20 +#define FO_TRUNC 0x40 + +#define FO_NOFOLLOW 0x10000 #define FSEEK_SET 0x1 #define FSEEK_CUR 0x2 @@ -18,7 +24,24 @@ #define O_WRONLY FO_WRONLY #define O_RDONLY FO_RDONLY #define O_RDWR FO_RDWR +#define O_TRUNC FO_TRUNC + +/* Mount with read-only flag */ +#define MNT_RO (1 << 0) + +/* Mount with block-cache-disabled flag */ +#define MNT_NC (1 << 1) -#define MNT_RO 0x1 +struct file_stat +{ + dev_t st_dev; + ino_t st_ino; + unsigned int mode; + dev_t st_rdev; + off_t st_size; + size_t st_blksize; + size_t st_ioblksize; + size_t st_blocks; +}; #endif /* __LUNAIX_FNCTL_DEFS_H */