diff options
author | 2005-10-26 09:53:35 +0000 | |
---|---|---|
committer | 2005-10-26 09:53:35 +0000 | |
commit | d6b28c1c7f8d204722221647cf930fc9a8a57fa2 (patch) | |
tree | df003196601aad7e651a9e74018f19728292b981 | |
parent | add checks in skip for walking off the file. (diff) | |
download | wireguard-openbsd-d6b28c1c7f8d204722221647cf930fc9a8a57fa2.tar.xz wireguard-openbsd-d6b28c1c7f8d204722221647cf930fc9a8a57fa2.zip |
correct -R behaviour;
-rw-r--r-- | usr.bin/rcs/rlog.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/rcs/rlog.c b/usr.bin/rcs/rlog.c index d6f0246964e..548c4d8814e 100644 --- a/usr.bin/rcs/rlog.c +++ b/usr.bin/rcs/rlog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rlog.c,v 1.8 2005/10/25 17:19:31 xsa Exp $ */ +/* $OpenBSD: rlog.c,v 1.9 2005/10/26 09:53:35 xsa Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -105,11 +105,16 @@ rlog_main(int argc, char **argv) if (rcs_statfile(argv[i], fpath, sizeof(fpath)) < 0) continue; + if (Rflag == 1) { + printf("%s\n", fpath); + continue; + } + if ((file = rcs_open(fpath, RCS_READ)) == NULL) continue; - if (Rflag == 0) - rlog_file(argv[i], fpath, file); + rlog_file(argv[i], fpath, file); + rcs_close(file); } |