diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-04-25 07:40:34 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-04-25 07:45:56 +0100 |
commit | b918a3ba15b510edfeb37a375ffacd5bdb5e1410 (patch) | |
tree | 8212d92bc231cf3ed11f4abf6c318f6836362be7 /lib/intel_chipset.c | |
parent | 5d7649690c80b531a4949e275926315a749455e3 (diff) |
Reset errno to 0 after success
errno is only valid after a syscall wrapper (e.g. ioctl()) reports an
error. However, we report the last errno value as a part of the
igt_assert() output and so we display spurious values such as:
Test requirement not met in function gem_require_ring, file ioctl_wrappers.c:802:
Last errno: 11, Resource temporarily unavailable
Test requirement: (!((((intel_get_drm_devid(fd)) == 0x0102 || ...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/intel_chipset.c')
-rw-r--r-- | lib/intel_chipset.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/intel_chipset.c b/lib/intel_chipset.c index eeafa314..c79374b8 100644 --- a/lib/intel_chipset.c +++ b/lib/intel_chipset.c @@ -144,6 +144,7 @@ intel_get_drm_devid(int fd) ret = ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp, sizeof(gp)); assert(ret == 0); + errno = 0; } return devid; |