OpenBSD CVS

CVS log for src/usr.bin/cvs/init.c


[BACK] Up to [local] / src / usr.bin / cvs

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: OPENBSD_5_3_BASE


Revision 1.38 / (download) - annotate - [select for diffs], Sun Oct 31 15:37:34 2010 UTC (13 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.37: +2 -2 lines
Diff to previous 1.37 (colored)

init was passing a writable file descriptor into rcs_open which was then
failing to fdopen() it as readable. It doesn't need to pass in the fd at
all, so just change it to pass -1 which makes cvs init work again.

In fact, the fd should never need to be writable - it is only used for
reading. RCS_WRITE triggers a rewrite on the file on rcs_close() but
this is done by using a temporary and rename(2) (RCS_WRITE is a poor
name for the flag). So while here, add a couple of comments to hopefully
make it a little clearer. There is some confusion about how this is used
in other places but checking those is a separate issue.

with and ok tobias

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.