diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-04-12 17:20:02 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-04-12 17:20:02 +0000 |
commit | e02939f51910ce46d40b5c81d0e6918f8e7cd18d (patch) | |
tree | b25d82218818797d0c0a036852eb6ae767d3af65 /usr.bin | |
parent | 07e9e7f707935f59a84b87509784625ee31f487f (diff) |
use the new CVS_EX_* error codes here as well.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/cmd.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/cvs/cmd.c b/usr.bin/cvs/cmd.c index ece600cdce3..f988c0a7919 100644 --- a/usr.bin/cvs/cmd.c +++ b/usr.bin/cvs/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.10 2005/04/12 14:58:40 joris Exp $ */ +/* $OpenBSD: cmd.c,v 1.11 2005/04/12 17:20:01 joris Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -72,7 +72,7 @@ cvs_startcmd(struct cvs_cmd *cmd, int argc, char **argv) cvs_files = cvs_file_get(".", c->file_flags); if (cvs_files == NULL) - return (-1); + return (CVS_EX_DATA); if ((c->cmd_helper != NULL) && ((ret = c->cmd_helper()) < 0)) return (ret); @@ -83,17 +83,17 @@ cvs_startcmd(struct cvs_cmd *cmd, int argc, char **argv) "No CVSROOT specified! Please use the `-d' option"); cvs_log(LP_ERR, "or set the CVSROOT enviroment variable."); - return (1); + return (CVS_EX_USAGE); } if (root->cr_method != CVS_METHOD_LOCAL) { if (cvs_connect(root) < 0) - return (-1); + return (CVS_EX_PROTO); if (c->cmd_flags & CVS_CMD_SENDARGS1) { for (i = 0; i < argc; i++) { if (cvs_sendarg(root, argv[i], 0) < 0) - return (-1); + return (CVS_EX_PROTO); } } @@ -104,7 +104,7 @@ cvs_startcmd(struct cvs_cmd *cmd, int argc, char **argv) if (c->cmd_flags & CVS_CMD_NEEDLOG) { if (cvs_logmsg_send(root, cvs_msg) < 0) - return (-1); + return (CVS_EX_PROTO); } } @@ -120,19 +120,19 @@ cvs_startcmd(struct cvs_cmd *cmd, int argc, char **argv) if (root->cr_method != CVS_METHOD_LOCAL) { if (c->cmd_flags & CVS_CMD_SENDDIR) { if (cvs_senddir(root, cvs_files) < 0) - return (-1); + return (CVS_EX_PROTO); } if (c->cmd_flags & CVS_CMD_SENDARGS2) { for (i = 0; i < argc; i++) { if (cvs_sendarg(root, argv[i], 0) < 0) - return (-1); + return (CVS_EX_PROTO); } } if (cvs_sendreq(root, c->cmd_req, (cmd->cmd_op == CVS_OP_INIT) ? root->cr_dir : NULL) < 0) - return (-1); + return (CVS_EX_PROTO); } return (0); |