summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2013-12-12 06:51:08 +0000
committerguenther <guenther@openbsd.org>2013-12-12 06:51:08 +0000
commit7498de10fc1aaf36334e01ab8082a184fc0bd619 (patch)
tree356513b91769a3d9666b91d0379c0ec7401b8f61 /sys
parentEliminate (most) double decrements of remaining space in the pretty (diff)
downloadwireguard-openbsd-7498de10fc1aaf36334e01ab8082a184fc0bd619.tar.xz
wireguard-openbsd-7498de10fc1aaf36334e01ab8082a184fc0bd619.zip
Set the d_off member as getdents() expects in ntfs_readdir()
ok and nudge jsing@
Diffstat (limited to 'sys')
-rw-r--r--sys/ntfs/ntfs_vnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/ntfs/ntfs_vnops.c b/sys/ntfs/ntfs_vnops.c
index c8245f350fa..9cec95d37be 100644
--- a/sys/ntfs/ntfs_vnops.c
+++ b/sys/ntfs/ntfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntfs_vnops.c,v 1.33 2013/12/02 16:05:07 jsing Exp $ */
+/* $OpenBSD: ntfs_vnops.c,v 1.34 2013/12/12 06:51:08 guenther Exp $ */
/* $NetBSD: ntfs_vnops.c,v 1.6 2003/04/10 21:57:26 jdolecek Exp $ */
/*
@@ -554,6 +554,7 @@ ntfs_readdir(void *v)
cde->d_fileno = iep->ie_number;
cde->d_type = (iep->ie_fflag & NTFS_FFLAG_DIR) ? DT_DIR : DT_REG;
cde->d_reclen = sizeof(struct dirent);
+ cde->d_off = uio->uio_offset + sizeof(struct dirent);
DPRINTF("%s\n", cde->d_type == DT_DIR ? "dir" : "reg");
error = uiomove((void *)cde, sizeof(struct dirent), uio);