diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-03-31 17:18:25 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-03-31 17:18:25 +0000 |
commit | d12b410212d7ed81fe58d1a88dbd4d13dbd87054 (patch) | |
tree | e2fbd12a1cd5f540b6c22867ec7d379dfb15dca8 /usr.bin | |
parent | c9c3443f54b3fd9ef8fd8f42d5e9c4760e21cce9 (diff) |
make sure the server command can still be reached with the
new framework.
ok xsa@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/cmd.c | 10 | ||||
-rw-r--r-- | usr.bin/cvs/cvs.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/cvs.h | 3 | ||||
-rw-r--r-- | usr.bin/cvs/server.c | 5 |
4 files changed, 17 insertions, 5 deletions
diff --git a/usr.bin/cvs/cmd.c b/usr.bin/cvs/cmd.c index 78c9e13ccce..f9e08c78f29 100644 --- a/usr.bin/cvs/cmd.c +++ b/usr.bin/cvs/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.4 2005/03/31 15:47:17 joris Exp $ */ +/* $OpenBSD: cmd.c,v 1.5 2005/03/31 17:18:24 joris Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -51,6 +51,14 @@ cvs_startcmd(struct cvs_cmd *cmd, int argc, char **argv) struct cvsroot *root; struct cvs_cmd_info *c = cmd->cmd_info; + /* if the command requested is the server one, just call the + * cvs_server() function to handle it, and return after it. + */ + if (cmd->cmd_op == CVS_OP_SERVER) { + ret = cvs_server(argc, argv); + return (ret); + } + if (c->cmd_options != NULL) { if ((ret = c->cmd_options(cmd->cmd_opts, argc, argv, &i))) return (ret); diff --git a/usr.bin/cvs/cvs.c b/usr.bin/cvs/cvs.c index bad1d2bce23..dfda9e452ab 100644 --- a/usr.bin/cvs/cvs.c +++ b/usr.bin/cvs/cvs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.c,v 1.45 2005/03/30 17:43:04 joris Exp $ */ +/* $OpenBSD: cvs.c,v 1.46 2005/03/31 17:18:24 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -238,7 +238,7 @@ struct cvs_cmd cvs_cdt[] = { NULL }, { - CVS_OP_SERVER, "server", {}, NULL, + CVS_OP_SERVER, "server", {}, &cmd_server, "", "", "Server mode", diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h index 5094c2fead1..569b4c0638d 100644 --- a/usr.bin/cvs/cvs.h +++ b/usr.bin/cvs/cvs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cvs.h,v 1.47 2005/03/30 17:43:04 joris Exp $ */ +/* $OpenBSD: cvs.h,v 1.48 2005/03/31 17:18:24 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -332,6 +332,7 @@ extern struct cvs_cmd_info cvs_status; extern struct cvs_cmd_info cvs_tag; extern struct cvs_cmd_info cvs_update; extern struct cvs_cmd_info cvs_version; +extern struct cvs_cmd_info cmd_server; int cvs_startcmd (struct cvs_cmd *, int, char **); int cvs_server (int, char **); diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c index 31c9f6ed433..bf553733af7 100644 --- a/usr.bin/cvs/server.c +++ b/usr.bin/cvs/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.7 2005/03/28 23:08:24 jfb Exp $ */ +/* $OpenBSD: server.c,v 1.8 2005/03/31 17:18:24 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -45,6 +45,9 @@ u_int cvs_nbarg = 0; u_int cvs_utf8ok = 0; u_int cvs_case = 0; +struct cvs_cmd_info cmd_server = { + NULL, NULL, NULL, NULL, NULL, 0, 0, 0 }; + /* * cvs_server() * |