From: Peter Hutterer Date: Wed, 6 May 2015 01:55:48 +0000 (+1000) Subject: test: return the right value from open_restricted X-Git-Tag: upstream/0.15.0+92+gec468e8~75 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ea69203acd49d5b1182a184babbc05f096be939;p=platform%2Fupstream%2Flibinput.git test: return the right value from open_restricted fd or negative errno on failure. Signed-off-by: Peter Hutterer --- diff --git a/test/litest.c b/test/litest.c index d3b5d6cb..d0043da2 100644 --- a/test/litest.c +++ b/test/litest.c @@ -393,7 +393,8 @@ litest_log_handler(struct libinput *libinput, static int open_restricted(const char *path, int flags, void *userdata) { - return open(path, flags); + int fd = open(path, flags); + return fd < 0 ? -errno : fd; } static void