diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-13 16:23:46 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-03-15 10:52:37 +0000 |
commit | 5252ff6c6a2b5028cf21c6cc09964bbdefb035ac (patch) | |
tree | 2c1f4bc65debbc027b8ced28dd1aeaf8a3cea70d | |
parent | a6c4295bf7b06a6433aaa97058c6856a6a0933ec (diff) |
lib/sw_sync: Cleanup up error message for sw_sync_timeline_inc()
do_ioctl() generates an incompressible error string, replace with a
functio so that the assert is readable.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | lib/sw_sync.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/sw_sync.c b/lib/sw_sync.c index 619049b3..06e0fea0 100644 --- a/lib/sw_sync.c +++ b/lib/sw_sync.c @@ -119,9 +119,21 @@ int sw_sync_timeline_create_fence(int fd, uint32_t seqno) return fence; } +static int __sw_sync_timeline_inc(int fd, uint32_t count) +{ + int err; + + err = 0; + if (igt_ioctl(fd, INT_SYNC_IOC_INC, &count)) + err = -errno; + + errno = 0; + return err; +} + void sw_sync_timeline_inc(int fd, uint32_t count) { - do_ioctl(fd, INT_SYNC_IOC_INC, &count); + igt_assert_eq(__sw_sync_timeline_inc(fd, count), 0); } int sync_fence_merge(int fd1, int fd2) |