Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/linux/common Make linux_sys_getdents64 fails with...



details:   https://anonhg.NetBSD.org/src/rev/c7d1a16294bf
branches:  trunk
changeset: 769145:c7d1a16294bf
user:      njoly <njoly%NetBSD.org@localhost>
date:      Thu Sep 01 12:44:10 2011 +0000

description:
Make linux_sys_getdents64 fails with ENOTDIR instead of EINVAL, when fd
does not refer to a directory.

diffstat:

 sys/compat/linux/common/linux_file64.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d0ce47a6478b -r c7d1a16294bf sys/compat/linux/common/linux_file64.c
--- a/sys/compat/linux/common/linux_file64.c    Thu Sep 01 12:29:41 2011 +0000
+++ b/sys/compat/linux/common/linux_file64.c    Thu Sep 01 12:44:10 2011 +0000
@@ -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;
        }
 



Home | Main Index | Thread Index | Old Index