lfs_config.h 670 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Configuration and type definitions
  3. *
  4. * Copyright (c) 2017 Christopher Haster
  5. * Distributed under the MIT license
  6. */
  7. #ifndef LFS_CONFIG_H
  8. #define LFS_CONFIG_H
  9. #include <stdint.h>
  10. // Type definitions
  11. typedef uint32_t lfs_size_t;
  12. typedef uint32_t lfs_off_t;
  13. typedef int32_t lfs_ssize_t;
  14. typedef int32_t lfs_soff_t;
  15. typedef uint32_t lfs_block_t;
  16. // Maximum length of file name
  17. #define LFS_NAME_MAX 255
  18. // Logging operations
  19. #include <stdio.h>
  20. #define LFS_ERROR(fmt, ...) printf("Error: " fmt "\n", __VA_ARGS__)
  21. #define LFS_WARN(fmt, ...) printf("Warn: " fmt "\n", __VA_ARGS__)
  22. #define LFS_INFO(fmt, ...) printf("Info: " fmt "\n", __VA_ARGS__)
  23. #endif