errcode.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Error codes returned by rsync.
  3. *
  4. * Copyright (C) 1998-2000 Andrew Tridgell
  5. * Copyright (C) 2003-2008 Wayne Davison
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program; if not, visit the http://fsf.org website.
  19. */
  20. /* If you change these, please also update the string mappings in log.c and
  21. * the EXIT VALUES in rsync.yo. */
  22. #define RERR_OK 0
  23. #define RERR_SYNTAX 1 /* syntax or usage error */
  24. #define RERR_PROTOCOL 2 /* protocol incompatibility */
  25. #define RERR_FILESELECT 3 /* errors selecting input/output files, dirs */
  26. #define RERR_UNSUPPORTED 4 /* requested action not supported */
  27. #define RERR_STARTCLIENT 5 /* error starting client-server protocol */
  28. #define RERR_SOCKETIO 10 /* error in socket IO */
  29. #define RERR_FILEIO 11 /* error in file IO */
  30. #define RERR_STREAMIO 12 /* error in rsync protocol data stream */
  31. #define RERR_MESSAGEIO 13 /* errors with program diagnostics */
  32. #define RERR_IPC 14 /* error in IPC code */
  33. #define RERR_CRASHED 15 /* sibling crashed */
  34. #define RERR_TERMINATED 16 /* sibling terminated abnormally */
  35. #define RERR_SIGNAL1 19 /* status returned when sent SIGUSR1 */
  36. #define RERR_SIGNAL 20 /* status returned when sent SIGINT, SIGTERM, SIGHUP */
  37. #define RERR_WAITCHILD 21 /* some error returned by waitpid() */
  38. #define RERR_MALLOC 22 /* error allocating core memory buffers */
  39. #define RERR_PARTIAL 23 /* partial transfer */
  40. #define RERR_VANISHED 24 /* file(s) vanished on sender side */
  41. #define RERR_DEL_LIMIT 25 /* skipped some deletes due to --max-delete */
  42. #define RERR_TIMEOUT 30 /* timeout in data send/receive */
  43. #define RERR_CONTIMEOUT 35 /* timeout waiting for daemon connection */
  44. /* Although it doesn't seem to be specified anywhere,
  45. * ssh and the shell seem to return these values:
  46. *
  47. * 124 if the command exited with status 255
  48. * 125 if the command is killed by a signal
  49. * 126 if the command cannot be run
  50. * 127 if the command is not found
  51. *
  52. * and we could use this to give a better explanation if the remote
  53. * command is not found.
  54. */
  55. #define RERR_CMD_FAILED 124
  56. #define RERR_CMD_KILLED 125
  57. #define RERR_CMD_RUN 126
  58. #define RERR_CMD_NOTFOUND 127