summaryrefslogtreecommitdiffstats
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorxsa <xsa@openbsd.org>2005-04-15 08:23:17 +0000
committerxsa <xsa@openbsd.org>2005-04-15 08:23:17 +0000
commit83d37f6360a6e837213e590db303d2569c28fc44 (patch)
tree4b0b42da1ccce4691d9e161a8a34602c938466d0 /usr.bin/cvs
parentspacing, and a typo; (diff)
downloadwireguard-openbsd-83d37f6360a6e837213e590db303d2569c28fc44.tar.xz
wireguard-openbsd-83d37f6360a6e837213e590db303d2569c28fc44.zip
some more errno use in cvs_log(); ok joris@.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/repo.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/cvs/repo.c b/usr.bin/cvs/repo.c
index 013f3538441..dc32fb43740 100644
--- a/usr.bin/cvs/repo.c
+++ b/usr.bin/cvs/repo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: repo.c,v 1.1 2005/02/16 15:41:15 jfb Exp $ */
+/* $OpenBSD: repo.c,v 1.2 2005/04/15 08:23:17 xsa Exp $ */
/*
* Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -366,7 +366,8 @@ cvs_repo_find(CVSREPO *repo, const char *path)
CVSRPENT *sf, *cf;
if ((len = strlcpy(pbuf, path, sizeof(pbuf))) >= sizeof(pbuf)) {
- cvs_log(LP_ERR, "path %s too long", path);
+ errno = ENAMETOOLONG;
+ cvs_log(LP_ERRNO, "%s", path);
return (NULL);
}
@@ -378,8 +379,8 @@ cvs_repo_find(CVSREPO *repo, const char *path)
pp = pbuf;
do {
if (cf->cr_type != CVS_RPENT_DIR) {
- cvs_log(LP_ERR,
- "part of the path %s is not a directory", path);
+ errno = ENOTDIR;
+ cvs_log(LP_ERRNO, "%s", path);
return (NULL);
}
sp = strchr(pp, '/');