From 594ac08ee4888800f45f3229059b0bcb5d56b45f Mon Sep 17 00:00:00 2001 From: Peter Valchev Date: Fri, 1 Aug 2003 16:47:26 +0000 Subject: 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 --- usr.bin/vi/common/exf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'usr.bin') 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; -- cgit v1.2.3