Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/msdosfs pull up rev 1.88 from trunk (requested by j...
details: https://anonhg.NetBSD.org/src/rev/f5b48aedce25
branches: netbsd-1-4
changeset: 469668:f5b48aedce25
user: cgd <cgd%NetBSD.org@localhost>
date: Fri Nov 05 07:50:23 1999 +0000
description:
pull up rev 1.88 from trunk (requested by jdolecek):
Set iovec offset correctly in msdosfs_readdir() so that some long
filename entries won't be ignored when the contents of the directory
don't fit in the user buffer all at once. Fixes PR#4492.
diffstat:
sys/msdosfs/msdosfs_vnops.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (51 lines):
diff -r f1ef3b896e61 -r f5b48aedce25 sys/msdosfs/msdosfs_vnops.c
--- a/sys/msdosfs/msdosfs_vnops.c Fri Nov 05 07:39:39 1999 +0000
+++ b/sys/msdosfs/msdosfs_vnops.c Fri Nov 05 07:50:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_vnops.c,v 1.79.2.4 1999/08/31 15:36:47 he Exp $ */
+/* $NetBSD: msdosfs_vnops.c,v 1.79.2.5 1999/11/05 07:50:23 cgd Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -1467,7 +1467,7 @@
struct uio *uio = ap->a_uio;
off_t *cookies = NULL;
int ncookies = 0, nc = 0;
- off_t offset;
+ off_t offset, uio_off;
int chksum = -1;
#ifdef MSDOSFS_DEBUG
@@ -1501,6 +1501,7 @@
return (EINVAL);
lost = uio->uio_resid - count;
uio->uio_resid = count;
+ uio_off = uio->uio_offset;
if (ap->a_ncookies) {
nc = uio->uio_resid / 16;
@@ -1552,6 +1553,7 @@
if (error)
goto out;
offset += sizeof(struct direntry);
+ uio_off = offset;
if (cookies) {
*cookies++ = offset;
ncookies++;
@@ -1666,6 +1668,7 @@
brelse(bp);
goto out;
}
+ uio_off = offset + sizeof(struct direntry);
if (cookies) {
*cookies++ = offset + sizeof(struct direntry);
ncookies++;
@@ -1679,7 +1682,7 @@
}
out:
- uio->uio_offset = offset;
+ uio->uio_offset = uio_off;
uio->uio_resid += lost;
if (dep->de_FileSize - (offset - bias) <= 0)
*ap->a_eofflag = 1;
Home |
Main Index |
Thread Index |
Old Index