blob: 9824a34d6928b7dd9a4e16b71ca03949f1864176 [file] [log] [blame]
Martin Poolaf642a62000-11-10 03:28:15 +00001/*
Wayne Davison0f78b812006-04-25 20:23:34 +00002 * Error codes returned by rsync.
3 *
4 * Copyright (C) 1998-2000 Andrew Tridgell
Wayne Davison3e2e4b52019-03-16 09:15:49 -07005 * Copyright (C) 2003-2019 Wayne Davison
Wayne Davison0f78b812006-04-25 20:23:34 +00006 *
7 * This program is free software; you can redistribute it and/or modify
Wayne Davison8e41b682007-07-10 13:55:49 +00008 * 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.
Wayne Davison0f78b812006-04-25 20:23:34 +000011 *
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 *
Wayne Davisone7c67062006-04-25 23:51:12 +000017 * You should have received a copy of the GNU General Public License along
Wayne Davison4fd842f2007-07-07 05:33:14 +000018 * with this program; if not, visit the http://fsf.org website.
Martin Poolaf642a62000-11-10 03:28:15 +000019 */
Andrew Tridgell65417571998-11-03 07:08:27 +000020
Wayne Davison0f78b812006-04-25 20:23:34 +000021/* If you change these, please also update the string mappings in log.c and
22 * the EXIT VALUES in rsync.yo. */
23
Martin Pool56cf38a2002-04-09 05:29:26 +000024#define RERR_OK 0
Andrew Tridgell65417571998-11-03 07:08:27 +000025#define RERR_SYNTAX 1 /* syntax or usage error */
26#define RERR_PROTOCOL 2 /* protocol incompatibility */
27#define RERR_FILESELECT 3 /* errors selecting input/output files, dirs */
Wayne Davisone0ed4e42003-12-15 08:04:14 +000028#define RERR_UNSUPPORTED 4 /* requested action not supported */
David Dykstra088aac82002-02-06 21:20:48 +000029#define RERR_STARTCLIENT 5 /* error starting client-server protocol */
Andrew Tridgell65417571998-11-03 07:08:27 +000030
31#define RERR_SOCKETIO 10 /* error in socket IO */
32#define RERR_FILEIO 11 /* error in file IO */
33#define RERR_STREAMIO 12 /* error in rsync protocol data stream */
34#define RERR_MESSAGEIO 13 /* errors with program diagnostics */
35#define RERR_IPC 14 /* error in IPC code */
Wayne Davison60168412005-09-26 17:11:03 +000036#define RERR_CRASHED 15 /* sibling crashed */
Wayne Davison90eca402005-09-26 17:06:33 +000037#define RERR_TERMINATED 16 /* sibling terminated abnormally */
Andrew Tridgell65417571998-11-03 07:08:27 +000038
Wayne Davison9e905552005-12-16 23:48:28 +000039#define RERR_SIGNAL1 19 /* status returned when sent SIGUSR1 */
40#define RERR_SIGNAL 20 /* status returned when sent SIGINT, SIGTERM, SIGHUP */
Andrew Tridgell65417571998-11-03 07:08:27 +000041#define RERR_WAITCHILD 21 /* some error returned by waitpid() */
42#define RERR_MALLOC 22 /* error allocating core memory buffers */
Andrew Tridgell19b27a42001-03-23 01:26:04 +000043#define RERR_PARTIAL 23 /* partial transfer */
Wayne Davisone0ed4e42003-12-15 08:04:14 +000044#define RERR_VANISHED 24 /* file(s) vanished on sender side */
Wayne Davison821ff7f2005-03-05 18:58:32 +000045#define RERR_DEL_LIMIT 25 /* skipped some deletes due to --max-delete */
Andrew Tridgell65417571998-11-03 07:08:27 +000046
47#define RERR_TIMEOUT 30 /* timeout in data send/receive */
Wayne Davisonba22c9e2007-11-28 00:28:26 -080048#define RERR_CONTIMEOUT 35 /* timeout waiting for daemon connection */
Andrew Tridgell19b27a42001-03-23 01:26:04 +000049
50/* Although it doesn't seem to be specified anywhere,
51 * ssh and the shell seem to return these values:
52 *
53 * 124 if the command exited with status 255
54 * 125 if the command is killed by a signal
55 * 126 if the command cannot be run
56 * 127 if the command is not found
57 *
58 * and we could use this to give a better explanation if the remote
59 * command is not found.
60 */
61#define RERR_CMD_FAILED 124
62#define RERR_CMD_KILLED 125
63#define RERR_CMD_RUN 126
64#define RERR_CMD_NOTFOUND 127