diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2014-10-10 08:03:40 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2014-10-10 08:03:40 +0000 |
commit | f2761b1ba56e6db237cbcabca3204a3d707b2e72 (patch) | |
tree | 43a7404c6786c422dd5c44950a094a5dafa9997a | |
parent | 5553dd5f46ba6f3b442e6fd3b239e44d3486bcc9 (diff) |
Explicitly handle -l and -u combinations. From Fritjof Bornebusch; ok daniel@
-rw-r--r-- | usr.bin/rcs/rcsprog.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c index 31d7f92e476..f8af1060429 100644 --- a/usr.bin/rcs/rcsprog.c +++ b/usr.bin/rcs/rcsprog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsprog.c,v 1.152 2014/10/02 06:23:15 otto Exp $ */ +/* $OpenBSD: rcsprog.c,v 1.153 2014/10/10 08:03:39 otto Exp $ */ /* * Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -235,8 +235,10 @@ rcs_main(int argc, char **argv) lkmode = RCS_LOCK_STRICT; break; case 'l': - /* XXX - Check with -u flag. */ + if (rcsflags & RCSPROG_UFLAG) + warnx("-u overridden by -l"); lrev = rcs_optarg; + rcsflags &= ~RCSPROG_UFLAG; rcsflags |= RCSPROG_LFLAG; break; case 'm': @@ -273,8 +275,10 @@ rcs_main(int argc, char **argv) lkmode = RCS_LOCK_LOOSE; break; case 'u': - /* XXX - Check with -l flag. */ + if (rcsflags & RCSPROG_LFLAG) + warnx("-l overridden by -u"); urev = rcs_optarg; + rcsflags &= ~RCSPROG_LFLAG; rcsflags |= RCSPROG_UFLAG; break; case 'V': |