summaryrefslogtreecommitdiff
path: root/media.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-06-08 14:27:50 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-06-08 14:33:10 +0200
commit25ed35b7c2705f53471118437a538bc9a60701be (patch)
tree24f193fbdcd70711adea490f722d6929a12d3115 /media.c
parent37702f7e2290e1ab84057279d4d94b4e26ed199f (diff)
strerror takes a non-negative integer
Negative error codes were passed untouched to strerror which then reported an unknown error. Use the positive error code instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'media.c')
-rw-r--r--media.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/media.c b/media.c
index f20f061..59a3a58 100644
--- a/media.c
+++ b/media.c
@@ -503,7 +503,7 @@ struct media_device *media_open(const char *name, int verbose)
ret = media_enum_entities(media);
if (ret < 0) {
printf("%s: Unable to enumerate entities for device %s (%s)\n",
- __func__, name, strerror(ret));
+ __func__, name, strerror(-ret));
media_close(media);
return NULL;
}