bug#67490: [PATCH] tail: fix following /proc and /sys files when using a 64K page size

2023-11-29 Thread dann frazier
On Mon, Nov 27, 2023 at 07:10:26PM +, Pádraig Brady wrote: > On 27/11/2023 16:24, dann frazier wrote: > > * src/tail.c (file_lines): Use fstat() to determine a file's block > > size and dynamically allocate a buffer of that size for traversing > > backwards. > > Thanks for the patch. > Could y

bug#67490: [PATCH v2] tail: fix tailing sysfs files on large page kernels

2023-11-29 Thread dann frazier
Changes from v1: - Fallback to BUFSIZ if fstat fails instead of exiting. - Add a comment block to explain why the blksize is used in file_lines() (which I hope also clarifies why it is not needed elsewhere). - Only use blksize if it is > BUFSIZ (I had regressed to 4K reads, oops). - Update c