Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/sys/compat/linux/common Pull up following revision(s) (re...
details: https://anonhg.NetBSD.org/src/rev/546e251cf9e1
branches: netbsd-6
changeset: 776512:546e251cf9e1
user: bouyer <bouyer%NetBSD.org@localhost>
date: Sat Dec 14 19:31:17 2013 +0000
description:
Pull up following revision(s) (requested by hauke in ticket #993):
sys/compat/linux/common/linux_misc.c: revision 1.227
On linux_sys_getdents, insert d_type at the end of each record.
Fixes PR kern/47806.
diffstat:
sys/compat/linux/common/linux_misc.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 26df5dcfbdb3 -r 546e251cf9e1 sys/compat/linux/common/linux_misc.c
--- a/sys/compat/linux/common/linux_misc.c Sat Dec 14 19:29:29 2013 +0000
+++ b/sys/compat/linux/common/linux_misc.c Sat Dec 14 19:31:17 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.219 2011/10/14 09:23:28 hannken Exp $ */
+/* $NetBSD: linux_misc.c,v 1.219.8.1 2013/12/14 19:31:17 bouyer 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.219 2011/10/14 09:23:28 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.219.8.1 2013/12/14 19:31:17 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -780,9 +780,10 @@
}
idb.d_off = (linux_off_t)off;
idb.d_reclen = (u_short)linux_reclen;
+ /* Linux puts d_type at the end of each record */
+ *((char *)&idb + idb.d_reclen - 1) = bdp->d_type;
}
strcpy(idb.d_name, bdp->d_name);
- idb.d_name[strlen(idb.d_name) + 1] = bdp->d_type;
if ((error = copyout((void *)&idb, outp, linux_reclen)))
goto out;
/* advance past this real entry */
Home |
Main Index |
Thread Index |
Old Index