Fix the fcntl entry points; cmd is a command, not the flags themselves.

Pointed out by Christos (he wrote the broken code originally, and I copied
it to another file later :-)
This commit is contained in:
thorpej 2004-11-28 07:44:05 +00:00
parent c7464d49db
commit 29671d6616
2 changed files with 6 additions and 6 deletions

@ -1,4 +1,4 @@
/* $NetBSD: dmover_io.c,v 1.13 2003/09/13 08:32:12 jdolecek Exp $ */
/* $NetBSD: dmover_io.c,v 1.14 2004/11/28 07:44:05 thorpej Exp $ */
/*
* Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dmover_io.c,v 1.13 2003/09/13 08:32:12 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: dmover_io.c,v 1.14 2004/11/28 07:44:05 thorpej Exp $");
#include <sys/param.h>
#include <sys/queue.h>
@ -588,7 +588,7 @@ static int
dmio_fcntl(struct file *fp, u_int cmd, void *data, struct proc *p)
{
if (cmd == FNONBLOCK || cmd == FASYNC)
if (cmd == F_SETFL)
return (0);
return (EOPNOTSUPP);

@ -1,4 +1,4 @@
/* $NetBSD: kern_systrace.c,v 1.40 2004/05/26 16:28:05 christos Exp $ */
/* $NetBSD: kern_systrace.c,v 1.41 2004/11/28 07:44:05 thorpej Exp $ */
/*
* Copyright 2002, 2003 Niels Provos <provos@citi.umich.edu>
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_systrace.c,v 1.40 2004/05/26 16:28:05 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_systrace.c,v 1.41 2004/11/28 07:44:05 thorpej Exp $");
#include "opt_systrace.h"
@ -438,7 +438,7 @@ int
systracef_fcntl(struct file *fp, u_int cmd, void *data, struct proc *p)
{
if (cmd == FNONBLOCK || cmd == FASYNC)
if (cmd == F_SETFL)
return 0;
return (EOPNOTSUPP);