errno.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef __ERRNO_H__
  2. #define __ERRNO_H__
  3. #ifdef RT_USING_DFS
  4. #include <dfs_def.h>
  5. /* using device error codes */
  6. #define ENOENT DFS_STATUS_ENOENT
  7. #define EIO DFS_STATUS_EIO
  8. #define ENXIO DFS_STATUS_ENXIO
  9. #define EBADF DFS_STATUS_EBADF
  10. #define EAGAIN DFS_STATUS_EAGAIN
  11. #define ENOMEM DFS_STATUS_ENOMEM
  12. #define EBUSY DFS_STATUS_EBUSY
  13. #define EEXIST DFS_STATUS_EEXIST
  14. #define EXDEV DFS_STATUS_EXDEV
  15. #define ENODEV DFS_STATUS_ENODEV
  16. #define ENOTDIR DFS_STATUS_ENOTDIR
  17. #define EISDIR DFS_STATUS_EISDIR
  18. #define EINVAL DFS_STATUS_EINVAL
  19. #define ENOSPC DFS_STATUS_ENOSPC
  20. #define EROFS DFS_STATUS_EROFS
  21. #define ENOSYS DFS_STATUS_ENOSYS
  22. #define ENOTEMPTY DFS_STATUS_ENOTEMPTY
  23. #else
  24. /* error codes */
  25. #define ENOENT 2 /* No such file or directory */
  26. #define EIO 5 /* I/O error */
  27. #define ENXIO 6 /* No such device or address */
  28. #define EBADF 9 /* Bad file number */
  29. #define EAGAIN 11 /* Try again */
  30. #define ENOMEM 12 /* no memory */
  31. #define EBUSY 16 /* Device or resource busy */
  32. #define EEXIST 17 /* File exists */
  33. #define EXDEV 18 /* Cross-device link */
  34. #define ENODEV 19 /* No such device */
  35. #define ENOTDIR 20 /* Not a directory */
  36. #define EISDIR 21 /* Is a directory */
  37. #define EINVAL 22 /* Invalid argument */
  38. #define ENOSPC 28 /* No space left on device */
  39. #define EROFS 30 /* Read-only file system */
  40. #define ENOSYS 38 /* Function not implemented */
  41. #define ENOTEMPTY 39 /* Directory not empty */
  42. #endif
  43. #define EPERM 1 /* Not super-user */
  44. #define ESRCH 3 /* No such process */
  45. #define EINTR 4 /* Interrupted system call */
  46. #define ENFILE 23 /* Too many open files in system */
  47. #define EDEADLK 45 /* Deadlock condition */
  48. #define EBADMSG 77 /* Trying to read unreadable message */
  49. #define ETIMEDOUT 116 /* Connection timed out */
  50. #define ENOTSUP 134 /* Not supported */
  51. #endif