From f642adf736cd5d948b9ca2719370c097b7f8fc34 Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 17 May 2021 11:54:14 +0000 Subject: [PATCH] Introduce some error exit codes which are in sync with the ones from proper rsync. This should help to make the tool behave more like the real thing. OK benno@ --- usr.bin/rsync/extern.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/usr.bin/rsync/extern.h b/usr.bin/rsync/extern.h index b18213d2d31..f780967d3b9 100644 --- a/usr.bin/rsync/extern.h +++ b/usr.bin/rsync/extern.h @@ -1,4 +1,4 @@ -/* $Id: extern.h,v 1.36 2021/03/31 19:45:16 job Exp $ */ +/* $Id: extern.h,v 1.37 2021/05/17 11:54:14 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -41,6 +41,19 @@ #define CSUM_LENGTH_PHASE1 (2) #define CSUM_LENGTH_PHASE2 (16) +/* + * Rsync error codes. + */ +#define ERR_SYNTAX 1 +#define ERR_PROTOCOL 2 +#define ERR_SOCK_IO 10 +#define ERR_FILE_IO 11 +#define ERR_WIREPROTO 12 +#define ERR_IPC 14 /* catchall for any kind of syscall error */ +#define ERR_TERMIMATED 16 +#define ERR_WAITPID 21 +#define ERR_NOMEM 22 + /* * Use this for --timeout. * All poll events will use it and catch time-outs. -- 2.20.1