X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/af642a61b369ae6e488d674e17aa5242ae9d34d1..e0ed4e4087ebeff0b0fe8f3419bcccf84fbd89a9:/errcode.h diff --git a/errcode.h b/errcode.h index 997e2d22..46bc255a 100644 --- a/errcode.h +++ b/errcode.h @@ -19,13 +19,15 @@ /* * error codes returned by rsync. If you change these, please also update the - * string mappings in log.c + * string mappings in log.c and the EXIT VALUES in rsync.yo */ +#define RERR_OK 0 #define RERR_SYNTAX 1 /* syntax or usage error */ #define RERR_PROTOCOL 2 /* protocol incompatibility */ #define RERR_FILESELECT 3 /* errors selecting input/output files, dirs */ -#define RERR_UNSUPPORTED 4 /* requested action not supported */ +#define RERR_UNSUPPORTED 4 /* requested action not supported */ +#define RERR_STARTCLIENT 5 /* error starting client-server protocol */ #define RERR_SOCKETIO 10 /* error in socket IO */ #define RERR_FILEIO 11 /* error in file IO */ @@ -36,5 +38,23 @@ #define RERR_SIGNAL 20 /* status returned when sent SIGUSR1, SIGINT */ #define RERR_WAITCHILD 21 /* some error returned by waitpid() */ #define RERR_MALLOC 22 /* error allocating core memory buffers */ +#define RERR_PARTIAL 23 /* partial transfer */ +#define RERR_VANISHED 24 /* file(s) vanished on sender side */ #define RERR_TIMEOUT 30 /* timeout in data send/receive */ + +/* Although it doesn't seem to be specified anywhere, + * ssh and the shell seem to return these values: + * + * 124 if the command exited with status 255 + * 125 if the command is killed by a signal + * 126 if the command cannot be run + * 127 if the command is not found + * + * and we could use this to give a better explanation if the remote + * command is not found. + */ +#define RERR_CMD_FAILED 124 +#define RERR_CMD_KILLED 125 +#define RERR_CMD_RUN 126 +#define RERR_CMD_NOTFOUND 127