summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_misc.c
diff options
context:
space:
mode:
authornjoly <njoly@NetBSD.org>2009-07-22 15:49:29 +0000
committernjoly <njoly@NetBSD.org>2009-07-22 15:49:29 +0000
commit3d5d2c8f61a66de6ebc070ced948a79d30e27fbf (patch)
treee2af1fd2a4f10cc3e101d5ddf9ddd2f59746166d /sys/compat/linux/common/linux_misc.c
parentd493d48c2e0fa6739a75e9db24a51f989cfeaf0d (diff)
Make compat linux/linux32 getdents(2) fail with ENOTDIR instead of
EINVAL when file descriptor does not refer to a directory.
Diffstat (limited to 'sys/compat/linux/common/linux_misc.c')
-rw-r--r--sys/compat/linux/common/linux_misc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/compat/linux/common/linux_misc.c b/sys/compat/linux/common/linux_misc.c
index 3923a9cc549..dd0976efc9c 100644
--- a/sys/compat/linux/common/linux_misc.c
+++ b/sys/compat/linux/common/linux_misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.208 2009/05/15 17:02:54 pooka Exp $ */
+/* $NetBSD: linux_misc.c,v 1.209 2009/07/22 15:49:29 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.208 2009/05/15 17:02:54 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.209 2009/07/22 15:49:29 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -702,7 +702,7 @@ linux_sys_getdents(struct lwp *l, const struct linux_sys_getdents_args *uap, reg
vp = (struct vnode *)fp->f_data;
if (vp->v_type != VDIR) {
- error = EINVAL;
+ error = ENOTDIR;
goto out1;
}