diff options
author | Russell King <rmk@arm.linux.org.uk> | 2017-11-03 14:39:45 +0000 |
---|---|---|
committer | Russell King <rmk@arm.linux.org.uk> | 2017-11-03 14:39:45 +0000 |
commit | e907c63249dbd3c2e4621db64c61d47c8a252384 (patch) | |
tree | 164beff498b70fbcf5fcd5481c50bf9f08011940 | |
parent | 33eaf0503c30ae741b04bfa3069fcb6fff8b94e3 (diff) |
etnaviv: add default string for error codes
Add a default string for error codes that consists of the error code
and the errno.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
-rw-r--r-- | etnaviv/etnaviv_utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/etnaviv/etnaviv_utils.c b/etnaviv/etnaviv_utils.c index 4e0fc1d..f80b417 100644 --- a/etnaviv/etnaviv_utils.c +++ b/etnaviv/etnaviv_utils.c @@ -61,8 +61,12 @@ static const char *etnaviv_errors[] = { const char *etnaviv_strerror(int err) { + static char buf[80]; const char *str = NULL; + sprintf(buf, "code=%d:errno=%d", err, errno); + str = buf; + if (err < 0) { if (err >= VIV_STATUS_GPU_NOT_RESPONDING) str = etnaviv_errors[-1 - err]; |