From: Dmitry V. Levin Date: Thu, 21 Apr 2016 20:37:50 +0000 (+0000) Subject: tests/epoll_ctl.c: print syscall() result using %ld format X-Git-Tag: v4.12~358 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=becfc0eb0aa3ddaf0eb799b661fefb387faad90f;p=strace tests/epoll_ctl.c: print syscall() result using %ld format --- diff --git a/tests/epoll_ctl.c b/tests/epoll_ctl.c index b636a7d4..13ca3b69 100644 --- a/tests/epoll_ctl.c +++ b/tests/epoll_ctl.c @@ -15,18 +15,17 @@ main(void) struct epoll_event *const ev = tail_alloc(sizeof(*ev)); ev->events = EPOLLIN; - int rc = syscall(__NR_epoll_ctl, -1, EPOLL_CTL_ADD, -2, ev); + long rc = syscall(__NR_epoll_ctl, -1, EPOLL_CTL_ADD, -2, ev); printf("epoll_ctl(-1, EPOLL_CTL_ADD, -2, {EPOLLIN," - " {u32=%u, u64=%" PRIu64 "}}) = %d %s (%m)\n", - ev->data.u32, ev->data.u64, rc, - errno2name()); + " {u32=%u, u64=%" PRIu64 "}}) = %ld %s (%m)\n", + ev->data.u32, ev->data.u64, rc, errno2name()); rc = syscall(__NR_epoll_ctl, -3, EPOLL_CTL_DEL, -4, ev); - printf("epoll_ctl(-3, EPOLL_CTL_DEL, -4, %p) = %d %s (%m)\n", + printf("epoll_ctl(-3, EPOLL_CTL_DEL, -4, %p) = %ld %s (%m)\n", ev, rc, errno2name()); rc = syscall(__NR_epoll_ctl, -1L, EPOLL_CTL_MOD, -16L, 0); - printf("epoll_ctl(-1, EPOLL_CTL_MOD, -16, NULL) = %d %s (%m)\n", + printf("epoll_ctl(-1, EPOLL_CTL_MOD, -16, NULL) = %ld %s (%m)\n", rc, errno2name()); puts("+++ exited with 0 +++");