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