Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/gzip



Module Name:    src
Committed By:   mrg
Date:           Thu Jan  8 02:18:23 UTC 2026

Modified Files:
        src/usr.bin/gzip: gzip.c

Log Message:
avoid small reads when there's a preferred IO size.

a discussion on port-sparc here:
   https://mail-index.netbsd.org/port-sparc/2025/12/29/msg003063.html
showed that the "file type" 4-byte read was failing on tape devices
as they need a specific IO size to work.

since we already pass this 4 bytes to the real decompressor, avoid this
problem by checking if there's a st_blksize value from stat(2) and use
a buffer of that size for the first read.

rename handle_stdin() to handle_fd_decomp() and use the same backend
for stdin as well as readable non-file files (device, fifo, socket).

tested by Nobuyoshi SATO on port-sparc, atf, and a few other manual
things.


To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/usr.bin/gzip/gzip.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index