diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-04-25 17:59:17 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-04-25 17:59:17 +0000 |
commit | 60b100f461d17044e7e904c95955b4389322b4f5 (patch) | |
tree | b48c0955da3c7d31cb6061d3508bb5d3ae211e73 /usr.bin | |
parent | 948b72c9a135a04cadb7d569abfe4a17c69116cb (diff) |
* add missing 'R' flag in diff synopsis
* add the CVS_EX_BADROOT return code to indicate that there was no
CVSROOT given or it was invalid
ok joris, xsa
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/cmd.c | 11 | ||||
-rw-r--r-- | usr.bin/cvs/cvs.c | 12 | ||||
-rw-r--r-- | usr.bin/cvs/cvs.h | 3 |
3 files changed, 14 insertions, 12 deletions
diff --git a/usr.bin/cvs/cmd.c b/usr.bin/cvs/cmd.c index 9869dd0f8dc..8b18fc7ad56 100644 --- a/usr.bin/cvs/cmd.c +++ b/usr.bin/cvs/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.14 2005/04/18 21:06:46 jfb Exp $ */ +/* $OpenBSD: cmd.c,v 1.15 2005/04/25 17:59:16 jfb Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -78,13 +78,8 @@ cvs_startcmd(struct cvs_cmd *cmd, int argc, char **argv) return (ret); root = CVS_DIR_ROOT(cvs_files); - if (root == NULL && (root = cvsroot_get(".")) == NULL) { - cvs_log(LP_ERR, - "No CVSROOT specified! Please use the `-d' option"); - cvs_log(LP_ERR, - "or set the CVSROOT enviroment variable."); - return (CVS_EX_USAGE); - } + if (root == NULL && (root = cvsroot_get(".")) == NULL) + return (CVS_EX_BADROOT); if (root->cr_method != CVS_METHOD_LOCAL) { if (cvs_connect(root) < 0) diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c index d246c11467b..9b9edf26404 100644 --- a/usr.bin/cvs/cvs.c +++ b/usr.bin/cvs/cvs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.c,v 1.59 2005/04/22 15:06:28 xsa Exp $ */ +/* $OpenBSD: cvs.c,v 1.60 2005/04/25 17:59:16 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -123,8 +123,8 @@ struct cvs_cmd cvs_cdt[] = { }, { CVS_OP_DIFF, "diff", { "di", "dif" }, &cvs_diff, - "[-cilNpu] [-D date] [-r rev] ...", - "cD:ilNpr:Ru", + "[-cilNpRu] [-D date] [-r rev] ...", + "cD:ilNpRr:u", "Show differences between revisions", NULL }, @@ -435,6 +435,12 @@ main(int argc, char **argv) case CVS_EX_FILE: cvs_log(LP_ABORT, "an operation on a file or directory failed"); break; + case CVS_EX_BADROOT: + cvs_log(LP_ABORT, + "No CVSROOT specified! Please use the `-d' option"); + cvs_log(LP_ABORT, + "or set the CVSROOT enviroment variable."); + break; default: break; } diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h index 7a4c1773551..98cd159f24e 100644 --- a/usr.bin/cvs/cvs.h +++ b/usr.bin/cvs/cvs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.h,v 1.52 2005/04/20 23:11:30 jfb Exp $ */ +/* $OpenBSD: cvs.h,v 1.53 2005/04/25 17:59:16 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -52,6 +52,7 @@ #define CVS_EX_PROTO 3 #define CVS_EX_FILE 4 #define CVS_EX_BADTAG 5 +#define CVS_EX_BADROOT 6 /* operations */ #define CVS_OP_UNKNOWN 0 |