Use proper error message when fstat(2) fails on stdout.
PR: bin/159746 Submitted by: Alex K.
This commit is contained in:
parent
0fdc094d92
commit
c64014573d
@ -260,7 +260,7 @@ raw_cat(int rfd)
|
||||
wfd = fileno(stdout);
|
||||
if (buf == NULL) {
|
||||
if (fstat(wfd, &sbuf))
|
||||
err(1, "%s", filename);
|
||||
err(1, "stdout");
|
||||
if (S_ISREG(sbuf.st_mode)) {
|
||||
/* If there's plenty of RAM, use a large copy buffer */
|
||||
if (sysconf(_SC_PHYS_PAGES) > PHYSPAGES_THRESHOLD)
|
||||
|
Loading…
Reference in New Issue
Block a user