diff options
author | Karel Zak | 2015-06-16 14:43:59 +0200 |
---|---|---|
committer | Karel Zak | 2015-06-16 14:44:05 +0200 |
commit | 1200cfbfbdd99c69a6c8b930f18e79f41cad7352 (patch) | |
tree | 1ab7fbcc211cca3e1cb9861a645c68eb2adbf991 /term-utils/script.c | |
parent | script: add support for SCRIPT_DEBUG= (diff) | |
download | kernel-qcow2-util-linux-1200cfbfbdd99c69a6c8b930f18e79f41cad7352.tar.gz kernel-qcow2-util-linux-1200cfbfbdd99c69a6c8b930f18e79f41cad7352.tar.xz kernel-qcow2-util-linux-1200cfbfbdd99c69a6c8b930f18e79f41cad7352.zip |
script: debug poll() results
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'term-utils/script.c')
-rw-r--r-- | term-utils/script.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/term-utils/script.c b/term-utils/script.c index d8def5b82..bf03b6297 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -390,8 +390,11 @@ static void do_io(struct script_control *ctl) if (pfd[i].revents == 0) continue; - DBG(POLL, ul_debug(" active pfd[%zu].fd=%d", i, pfd[i].fd)); - + DBG(POLL, ul_debug(" active pfd[%zu].fd=%d %s %s %s", + i, pfd[i].fd, + pfd[i].revents & POLLIN ? "POOLIN" : "", + pfd[i].revents & POLLHUP ? "POLLHUP" : "", + pfd[i].revents & POLLERR ? "POLLERR" : "")); switch (i) { case POLLFD_STDIN: case POLLFD_MASTER: |