summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-04-15 08:23:18 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-04-15 08:23:18 +0000
commit1dd62c62c0737b023d2921ba3ac1f4ba4834bce6 (patch)
tree0fb47014324f0439b15f8b9b7ca8b2f513c3662a /usr.bin
parent9944a844211dd2152cf38c56165670f28f833033 (diff)
some more errno use in cvs_log(); ok joris@.
Diffstat (limited to 'usr.bin')
-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, '/');