summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2003-08-01 16:47:26 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2003-08-01 16:47:26 +0000
commit594ac08ee4888800f45f3229059b0bcb5d56b45f (patch)
tree4d582652dd446647fbbb4b0bfd7e2a573a3a2378 /usr.bin
parent3dd3bfc6568ccc6d1bcfa15e05f8aea1c94c2204 (diff)
when the -R option (read-only) is specified, there is no need to print
a warning that the file is read-only, it's obviously what's expected... ok fgsch henning
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/vi/common/exf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/vi/common/exf.c b/usr.bin/vi/common/exf.c
index f26a46b58a1..0943febb5c3 100644
--- a/usr.bin/vi/common/exf.c
+++ b/usr.bin/vi/common/exf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exf.c,v 1.18 2003/07/02 00:21:16 avsm Exp $ */
+/* $OpenBSD: exf.c,v 1.19 2003/08/01 16:47:25 pvalchev Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -353,8 +353,10 @@ file_init(sp, frp, rcv_name, flags)
break;
case LOCK_UNAVAIL:
readonly = 1;
- msgq_str(sp, M_INFO, oname,
- "239|%s already locked, session is read-only");
+ if (!O_ISSET(sp, O_READONLY)) {
+ msgq_str(sp, M_INFO, oname,
+ "239|%s already locked, session is read-only");
+ }
break;
case LOCK_SUCCESS:
break;