stat.h 965 B

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