]> Cypherpunks repositories - gostls13.git/commit
syscall: store skip count in file descriptor offset
authorKeith Randall <keithr@alum.mit.edu>
Wed, 10 Apr 2019 18:06:58 +0000 (11:06 -0700)
committerKeith Randall <khr@golang.org>
Wed, 10 Apr 2019 20:06:50 +0000 (20:06 +0000)
commita6af1041f6889fddd71c2a08308f52637b3f345d
treed750289580ee31b0d28a921b8593fa81a6402de4
parentfda5e6d6fa7abfe974a58dfeeceb95a8165d1b63
syscall: store skip count in file descriptor offset

Multiple calls to ReadDirent expect to return subsequent
portions of the directory listing. There's no place to store
our progress other than the file descriptor offset.

Fortunately, the file descriptor offset doesn't need to be
a real offset. We can store any int64 we want there.

Fixes #31368

Change-Id: I49e4e0e7ff707d3e96aa5d43e3b0199531013cde
Reviewed-on: https://go-review.googlesource.com/c/go/+/171477
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/syscall/dirent_bsd_test.go
src/syscall/syscall_darwin.go