mirror of
https://repo.or.cz/socat.git
synced 2025-07-06 13:06:33 +00:00
New option f-setpipe-sz
This commit is contained in:
parent
5ee79624b6
commit
e015aaaee6
14 changed files with 236 additions and 32 deletions
7
filan.c
7
filan.c
|
@ -146,10 +146,10 @@ int filan_fd(int fd, FILE *outfile) {
|
|||
;
|
||||
#if HAVE_POLL
|
||||
if (Poll(&ufds, 1, 0) < 0) {
|
||||
Warn4("poll({%d, %hd, %hd}, 1, 0): %s",
|
||||
Warn4("\tpoll({%d, %hd, %hd}, 1, 0): %s",
|
||||
ufds.fd, ufds.events, ufds.revents, strerror(errno));
|
||||
} else {
|
||||
fputs("poll: ", outfile);
|
||||
fputs("\tpoll: ", outfile);
|
||||
if (ufds.revents & POLLIN) fputs("IN,", outfile);
|
||||
if (ufds.revents & POLLPRI) fputs("PRI,", outfile);
|
||||
if (ufds.revents & POLLOUT) fputs("OUT,", outfile);
|
||||
|
@ -378,6 +378,9 @@ int filan_stat(
|
|||
if (statfd >= 0) { /*!indent */
|
||||
switch (buf->st_mode&S_IFMT) {
|
||||
case (S_IFIFO): /* 1, FIFO */
|
||||
#if defined(F_GETPIPE_SZ)
|
||||
fprintf(outfile, "\tF_GETPIPE_SZ=%d", Fcntl(statfd, F_GETPIPE_SZ));
|
||||
#endif
|
||||
break;
|
||||
case (S_IFCHR): /* 2, character device */
|
||||
cdevan(statfd, outfile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue