Subject: kern/2602: flock can return EOPNOTSUPP (error in manpage)
To: None <gnats-bugs@NetBSD.ORG>
From: Kent S. Gordon <kgor@ksg.com>
List: netbsd-bugs
Date: 07/04/1996 13:44:36
>Number: 2602
>Category: kern
>Synopsis: flock can return EOPNOTSUPP (error in manpage)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 4 15:05:01 1996
>Last-Modified:
>Originator: Kent S. Gordon
>Organization:
Gordon Family
>Release: 1.2_BETA
>Environment:
System: NetBSD ggzoo.ksg.com 1.2_BETA NetBSD 1.2_BETA (GGZOO) #87: Tue Jul 2 00:52:52 CDT 1996 root@ggzoo.ksg.com:/usr/src/sys/arch/i386/compile/GGZOO i386
>Description:
The man page for flock(2) says that only error returned are
EWOULDBLOCK, EBADF, and EINVAL. Looking at the code in
kern_descrip.c, it shows a return of EOPNOTSUPP. The man page should
be changed to reflect the current code. This change broke mtools-3.0.
>How-To-Repeat:
This code fragment has not been tested. I looked at the
source to see the problem.
int x, rc;
x = open("/dev/fd0a", O_RDWR, 0666);
rc = flock(x,LOCK_EX);
errno is now set to EOPNOTSUPP.
>Fix:
Change either the code in the kernel or the man page for flock(2).
>Audit-Trail:
>Unformatted: