《操作系统》的实验代码。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 line
1.5 KiB

10 年之前
  1. #ifndef __LIBS_ERROR_H__
  2. #define __LIBS_ERROR_H__
  3. /* kernel error codes -- keep in sync with list in lib/printfmt.c */
  4. #define E_UNSPECIFIED 1 // Unspecified or unknown problem
  5. #define E_BAD_PROC 2 // Process doesn't exist or otherwise
  6. #define E_INVAL 3 // Invalid parameter
  7. #define E_NO_MEM 4 // Request failed due to memory shortage
  8. #define E_NO_FREE_PROC 5 // Attempt to create a new process beyond
  9. #define E_FAULT 6 // Memory fault
  10. #define E_SWAP_FAULT 7 // SWAP READ/WRITE fault
  11. #define E_INVAL_ELF 8 // Invalid elf file
  12. #define E_KILLED 9 // Process is killed
  13. #define E_PANIC 10 // Panic Failure
  14. #define E_TIMEOUT 11 // Timeout
  15. #define E_TOO_BIG 12 // Argument is Too Big
  16. #define E_NO_DEV 13 // No such Device
  17. #define E_NA_DEV 14 // Device Not Available
  18. #define E_BUSY 15 // Device/File is Busy
  19. #define E_NOENT 16 // No Such File or Directory
  20. #define E_ISDIR 17 // Is a Directory
  21. #define E_NOTDIR 18 // Not a Directory
  22. #define E_XDEV 19 // Cross Device-Link
  23. #define E_UNIMP 20 // Unimplemented Feature
  24. #define E_SEEK 21 // Illegal Seek
  25. #define E_MAX_OPEN 22 // Too Many Files are Open
  26. #define E_EXISTS 23 // File/Directory Already Exists
  27. #define E_NOTEMPTY 24 // Directory is Not Empty
  28. /* the maximum allowed */
  29. #define MAXERROR 24
  30. #endif /* !__LIBS_ERROR_H__ */