diff options
author | 2006-06-04 14:56:09 +0000 | |
---|---|---|
committer | 2006-06-04 14:56:09 +0000 | |
commit | fd4438604b44a9d7853edda41d3c1b4a669a1e4e (patch) | |
tree | 3f0de7872a8440a6917b272f7947f87cc6180125 | |
parent | lets not stop looking for a branch if the first one (diff) | |
download | wireguard-openbsd-fd4438604b44a9d7853edda41d3c1b4a669a1e4e.tar.xz wireguard-openbsd-fd4438604b44a9d7853edda41d3c1b4a669a1e4e.zip |
fix output if file is lost, unknown, or in the Attic; OK joris@.
-rw-r--r-- | usr.bin/cvs/status.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/cvs/status.c b/usr.bin/cvs/status.c index 74031556617..6be3278e64d 100644 --- a/usr.bin/cvs/status.c +++ b/usr.bin/cvs/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.62 2006/06/01 20:00:52 joris Exp $ */ +/* $OpenBSD: status.c,v 1.63 2006/06/04 14:56:09 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -117,7 +117,17 @@ cvs_status_local(struct cvs_file *cf) cf->file_ent->ce_conflict != NULL) status = "File had conflicts on merge"; - cvs_printf("File: %-17s\tStatus: %s\n\n", cf->file_name, status); + if (cf->file_status == FILE_LOST || + cf->file_status == FILE_UNKNOWN || + cf->file_rcs->rf_inattic == 1) { + l = snprintf(buf, sizeof(buf), "no file %s\t", cf->file_name); + if (l == -1 || l >= (int)sizeof(buf)) + fatal("cvs_status_local: overflow"); + } else + if (strlcpy(buf, cf->file_name, sizeof(buf)) >= sizeof(buf)) + fatal("cvs_status_local: overflow"); + + cvs_printf("File: %-17s\tStatus: %s\n\n", buf, status); if (cf->file_ent == NULL) { l = snprintf(buf, sizeof(buf), |