summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-07-27 14:15:25 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-07-27 14:15:25 +0000
commitc84d65c448c435d1b165331c8a49a7d06aa82d6b (patch)
tree2838950a0ca9fa07d572d21f4f05eb9506d7d856 /usr.bin/cvs
parentfd4b56f2ae0fa786e406e2e505ab2921475377c6 (diff)
add trace message in cvs_connect(); ok jfb@ joris@.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/proto.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/usr.bin/cvs/proto.c b/usr.bin/cvs/proto.c
index 73abc47ade4..e1fb0e5c2eb 100644
--- a/usr.bin/cvs/proto.c
+++ b/usr.bin/cvs/proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proto.c,v 1.70 2005/07/26 20:58:44 moritz Exp $ */
+/* $OpenBSD: proto.c,v 1.71 2005/07/27 14:15:24 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -183,7 +183,7 @@ int
cvs_connect(struct cvsroot *root)
{
int argc, infd[2], outfd[2], errfd[2];
- char *argv[16], *cvs_server_cmd, *vresp;
+ char *argv[16], *cvs_server_cmd, tmsg[1024], *vresp;
if (root->cr_method == CVS_METHOD_PSERVER) {
cvs_log(LP_ERR, "no pserver support due to security issues");
@@ -257,6 +257,15 @@ cvs_connect(struct cvsroot *root)
argv[argc++] = "server";
argv[argc] = NULL;
+ if (cvs_trace == 1) {
+ tmsg[0] = '\0';
+ for (argc = 0; argv[argc] != NULL; argc++) {
+ strlcat(tmsg, argv[argc], sizeof(tmsg));
+ strlcat(tmsg, " ", sizeof(tmsg));
+ }
+ }
+ cvs_log(LP_TRACE, "Starting server: %s", tmsg);
+
execvp(argv[0], argv);
cvs_log(LP_ERRNO, "failed to exec");
exit(1);