diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-04-12 14:58:41 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-04-12 14:58:41 +0000 |
commit | 4b03ee4a3e530b1453fb0907ac8166baf63bf053 (patch) | |
tree | 0dc798db78780d1cd2e362c04dbcd0e8f3ae7f47 /usr.bin/cvs/add.c | |
parent | 77e328103b64f6514f65aa663caf3bee705dae4d (diff) |
introduce our own set of error codes used by the commands to report
what exactly went wrong in case of an error.
ok jfb@
Diffstat (limited to 'usr.bin/cvs/add.c')
-rw-r--r-- | usr.bin/cvs/add.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/cvs/add.c b/usr.bin/cvs/add.c index ec1d35c98d6..33152ae090d 100644 --- a/usr.bin/cvs/add.c +++ b/usr.bin/cvs/add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: add.c,v 1.18 2005/04/11 18:02:58 joris Exp $ */ +/* $OpenBSD: add.c,v 1.19 2005/04/12 14:58:40 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -73,17 +73,17 @@ cvs_add_options(char *opt, int argc, char **argv, int *arg) cvs_log(LP_ERR, "invalid RCS keyword expansion mode"); rcs_kflag_usage(); - return (1); + return (CVS_EX_USAGE); } break; case 'm': if ((cvs_msg = strdup(optarg)) == NULL) { cvs_log(LP_ERRNO, "failed to copy message"); - return (-1); + return (CVS_EX_DATA); } break; default: - return (1); + return (CVS_EX_USAGE); } } @@ -100,7 +100,7 @@ cvs_add_sendflags(struct cvsroot *root) strlcpy(buf, "-k", sizeof(buf)); strlcat(buf, koptstr, sizeof(buf)); if (cvs_sendarg(root, buf, 0) < 0) - return (-1); + return (CVS_EX_PROTO); } return (0); |