summaryrefslogtreecommitdiffstats
path: root/term-utils/script.c
diff options
context:
space:
mode:
authorKarel Zak2015-06-16 14:43:59 +0200
committerKarel Zak2015-06-16 14:44:05 +0200
commit1200cfbfbdd99c69a6c8b930f18e79f41cad7352 (patch)
tree1ab7fbcc211cca3e1cb9861a645c68eb2adbf991 /term-utils/script.c
parentscript: add support for SCRIPT_DEBUG= (diff)
downloadkernel-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.c7
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: