diff options
author | peter <peter@FreeBSD.org> | 1997-05-17 14:04:18 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-05-17 14:04:18 +0000 |
commit | 9d520c8a553dc94877f83f7a0ea1930ec04fb6fe (patch) | |
tree | 4774ce2527ff92fde95f2500cff0bc30466c2876 /contrib/cvs | |
parent | 2b6097ead395b5f74ff086294c4f98df30336c06 (diff) | |
download | FreeBSD-src-9d520c8a553dc94877f83f7a0ea1930ec04fb6fe.zip FreeBSD-src-9d520c8a553dc94877f83f7a0ea1930ec04fb6fe.tar.gz |
Catch write-lock attempts immediately if running in read-only mode rather
than depending on getting a write fail.
Diffstat (limited to 'contrib/cvs')
-rw-r--r-- | contrib/cvs/src/lock.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/cvs/src/lock.c b/contrib/cvs/src/lock.c index 1ff6864..6b8fa3d 100644 --- a/contrib/cvs/src/lock.c +++ b/contrib/cvs/src/lock.c @@ -319,6 +319,11 @@ Writer_Lock (list) if (noexec) return (0); + if (readonlyfs) { + error (0, 0, "write lock failed - read-only repository"); + return (1); + } + /* We only know how to do one list at a time */ if (locklist != (List *) NULL) { |