]> git.ipfire.org Git - thirdparty/coreutils.git/commit
wc: fix reading of /proc files on aarch64
authorPádraig Brady <P@draigBrady.com>
Wed, 1 Jul 2015 21:37:26 +0000 (22:37 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 2 Jul 2015 02:53:59 +0000 (03:53 +0100)
commita645ce6c04719ad616ecd3bd7a16cd14772d6a74
treeb223ae17b9c075d76178b4ee1b02b232012c77ae
parent8bf2af685cf2cb1291fb03ec8a6942c26a7e0bd7
wc: fix reading of /proc files on aarch64

tests/misc/wc-proc.sh fails when the page size is 64K

* src/wc.c (wc): The lseek adjustment should be based on st_blksize,
rather than on the internal buffer size.  This is significant on
aarch64 where st_blksize in /proc is the 64K (the page size) and
thus larger than the internal buffer.
* src/split.c (main): Even though the similar processing is done
on the internal buffer size, that's based on st_blksize and
so fine in this regard.  Add an assert to enforce this.
Avoid this path for the undocumented ---io-blksize option.
src/split.c
src/wc.c