]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
script: debug poll() results
authorKarel Zak <kzak@redhat.com>
Tue, 16 Jun 2015 12:43:59 +0000 (14:43 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 16 Jun 2015 12:44:05 +0000 (14:44 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/script.c

index d8def5b82882dc7d935db78717b8f83c06508c51..bf03b62975f03619df61182697175bd292529beb 100644 (file)
@@ -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: