diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-03-09 01:54:04 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-03-09 01:54:04 +0000 |
commit | 971628717dda13f28d89cd6cca330eaeec805c9c (patch) | |
tree | 0146eb7cc05e2d96aaf841fa9ce5253fd8c72da2 /usr.bin | |
parent | 71af4d99e4d432e46531b8ff25f4978ec0fc5e72 (diff) |
pass user_supplied to struct cvs_file so it can be used
in the callbacks to verify if this file was specified on the command line.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/admin.c | 4 | ||||
-rw-r--r-- | usr.bin/cvs/file.c | 8 | ||||
-rw-r--r-- | usr.bin/cvs/file.h | 5 |
3 files changed, 10 insertions, 7 deletions
diff --git a/usr.bin/cvs/admin.c b/usr.bin/cvs/admin.c index 3e8775fdba6..1a858a0a755 100644 --- a/usr.bin/cvs/admin.c +++ b/usr.bin/cvs/admin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: admin.c,v 1.55 2008/02/04 15:07:32 tobias Exp $ */ +/* $OpenBSD: admin.c,v 1.56 2008/03/09 01:54:03 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * Copyright (c) 2005 Joris Vink <joris@openbsd.org> @@ -249,7 +249,7 @@ cvs_admin_local(struct cvs_file *cf) strerror(errno)); /* XXX: S_ISREG() check instead of blindly using CVS_FILE? */ - ocf = cvs_file_get_cf(d, f, ofd, CVS_FILE); + ocf = cvs_file_get_cf(d, f, ofd, CVS_FILE, 0); ocf->file_rcs = rcs_open(fpath, ofd, RCS_READ, 0444); if (ocf->file_rcs == NULL) diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index fad4f0b3e77..3825c8c39ae 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.229 2008/03/09 01:25:31 joris Exp $ */ +/* $OpenBSD: file.c,v 1.230 2008/03/09 01:54:03 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -217,7 +217,8 @@ cvs_file_get(const char *name, int user_supplied, struct cvs_flisthead *fl) } struct cvs_file * -cvs_file_get_cf(const char *d, const char *f, int fd, int type) +cvs_file_get_cf(const char *d, const char *f, int fd, + int type, int user_supplied) { struct cvs_file *cf; char *p, rpath[MAXPATHLEN]; @@ -236,6 +237,7 @@ cvs_file_get_cf(const char *d, const char *f, int fd, int type) cf->repo_fd = -1; cf->file_type = type; cf->file_status = cf->file_flags = 0; + cf->user_supplied = user_supplied; cf->file_ent = NULL; if (current_cvsroot->cr_method != CVS_METHOD_LOCAL || @@ -328,7 +330,7 @@ cvs_file_walklist(struct cvs_flisthead *fl, struct cvs_recursion *cr) } } - cf = cvs_file_get_cf(d, f, fd, type); + cf = cvs_file_get_cf(d, f, fd, type, l->user_supplied); if (cf->file_type == CVS_DIR) { cvs_file_walkdir(cf, cr); } else { diff --git a/usr.bin/cvs/file.h b/usr.bin/cvs/file.h index fa02b80511c..55d0a00f7c6 100644 --- a/usr.bin/cvs/file.h +++ b/usr.bin/cvs/file.h @@ -1,4 +1,4 @@ -/* $OpenBSD: file.h,v 1.47 2008/03/09 01:25:31 joris Exp $ */ +/* $OpenBSD: file.h,v 1.48 2008/03/09 01:54:03 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> @@ -47,6 +47,7 @@ struct cvs_file { int file_status; int file_flags; int in_attic; + int user_supplied; RCSNUM *file_rcsrev; RCSFILE *file_rcs; @@ -110,6 +111,6 @@ int cvs_file_cmpname(const char *, const char *); int cvs_file_cmp(const char *, const char *); int cvs_file_copy(const char *, const char *); -struct cvs_file *cvs_file_get_cf(const char *, const char *, int, int); +struct cvs_file *cvs_file_get_cf(const char *, const char *, int, int, int); #endif /* FILE_H */ |