1 /* 2 * Copyright (c) 2018 Intel Corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_STAT_H_ 8 #define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_STAT_H_ 9 10 #ifdef __cplusplus 11 extern "C" { 12 #endif 13 14 #define S_IRWXU 00700 15 #define S_IRUSR 00400 16 #define S_IWUSR 00200 17 #define S_IXUSR 00100 18 19 #define S_IRWXG 00070 20 #define S_IRGRP 00040 21 #define S_IWGRP 00020 22 #define S_IXGRP 00010 23 24 #define S_IRWXO 00007 25 #define S_IROTH 00004 26 #define S_IWOTH 00002 27 #define S_IXOTH 00001 28 29 /* File open modes */ 30 #define O_ACCMODE 0003 31 #define O_RDONLY 00 32 #define O_WRONLY 01 33 #define O_RDWR 02 34 35 #define SEEK_SET 0 /* Seek from beginning of file. */ 36 #define SEEK_CUR 1 /* Seek from current position. */ 37 #define SEEK_END 2 /* Seek from end of file. */ 38 39 struct stat { 40 unsigned long st_size; 41 unsigned long st_blksize; 42 unsigned long st_blocks; 43 }; 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #endif /* ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_STAT_H_ */ 50