On 10/22/12 18:29, Dave Chinner wrote:
On Mon, Oct 22, 2012 at 04:38:00PM -0500, Mark Tinguely wrote:
xfs_io> lseek -r -d 0
xfs_io> lseek -r -h 0
xfs_io> lseek -r -a 0
+#define _LARGEFILE64_SOURCE /* See feature_test_macros(7) */
That's defined by _GNU_SOURCE, which is set in the makefiles, so not
Okay, I think a couple of the header files are redundantly redundant too.
+" returns the next hole or data offset at or after the specified offset\n"
+" 'lseek -d 512' - offset of data at or following offset 512\n"
+" Repositions and returns the offset of either the next data or hole.\n"
+" There is an implied hole at the end of file. If the specified offset is\n"
+" past end of file, or there is no data past the specied offset, the offset\n"
+" -1 is returned.\n"
I'd prefer that "EOF" rather than "-1" is printed in this case.
<deleted mess of things to clean up>
Given that we only support pread and pwrite operations, the
repositioning of the file pointer is irrelevant so probably should
not be mentioned. If it was relevant, then we'd also need to support
the other seek modes to reposition the file pointer. So jsut
mentioning that it returns the offset of the next ... is probably
agreed. I did not the other lseek() whence options for that very reason.
Thanks for the feedback.
PS. To Christoph: Yes, a test will be added.