Module Name: src
Committed By: njoly
Date: Thu Sep 1 12:44:10 UTC 2011
Modified Files:
src/sys/compat/linux/common: linux_file64.c
Log Message:
Make linux_sys_getdents64 fails with ENOTDIR instead of EINVAL, when fd
does not refer to a directory.
To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/compat/linux/common/linux_file64.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/compat/linux/common/linux_file64.c
diff -u src/sys/compat/linux/common/linux_file64.c:1.51 src/sys/compat/linux/common/linux_file64.c:1.52
--- src/sys/compat/linux/common/linux_file64.c:1.51 Thu Jun 24 13:03:07 2010
+++ src/sys/compat/linux/common/linux_file64.c Thu Sep 1 12:44:10 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_file64.c,v 1.51 2010/06/24 13:03:07 hannken Exp $ */
+/* $NetBSD: linux_file64.c,v 1.52 2011/09/01 12:44:10 njoly Exp $ */
/*-
* Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.51 2010/06/24 13:03:07 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.52 2011/09/01 12:44:10 njoly Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -254,7 +254,7 @@
vp = (struct vnode *)fp->f_data;
if (vp->v_type != VDIR) {
- error = EINVAL;
+ error = ENOTDIR;
goto out1;
}