dfs_config.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. +------------------------------------------------------------------------------
  3. | Project : Device Filesystem
  4. +------------------------------------------------------------------------------
  5. | Copyright 2004, 2005 www.fayfayspace.org.
  6. | All rights reserved.
  7. |------------------------------------------------------------------------------
  8. | File : dfs_opts.h, the option definitions of Device FileSystem
  9. |------------------------------------------------------------------------------
  10. | Chang Logs:
  11. | Date Author Notes
  12. | 2005-01-22 ffxz The first version.
  13. +------------------------------------------------------------------------------
  14. */
  15. #ifndef __DFS_CONFIG_H__
  16. #define __DFS_CONFIG_H__
  17. /* the max type of filesystem */
  18. #define DFS_FILESYSTEM_TYPES_MAX 4
  19. /* the max length of path name */
  20. #define DFS_PATH_MAX 256
  21. /* the size of sector */
  22. #define SECTOR_SIZE 512
  23. #define DFS_DEBUG_INFO 0x01
  24. #define DFS_DEBUG_WARNING 0x02
  25. #define DFS_DEBUG_ERROR 0x04
  26. #define DFS_DEBUG_LEVEL (DFS_DEBUG_INFO | DFS_DEBUG_WARNING | DFS_DEBUG_ERROR)
  27. /* #define DFS_DEBUG */
  28. #ifdef DFS_DEBUG
  29. #define dfs_log(level, x) do { if (level & DFS_DEBUG_LEVEL) \
  30. {rt_kprintf("DFS %s, %d:", __FUNCTION__, __LINE__); rt_kprintf x; \
  31. rt_kprintf ("\n");}}while (0)
  32. #else
  33. #define dfs_log(level, x)
  34. #endif
  35. #endif