projects
/
platform
/
upstream
/
libinput.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3844856
)
test: return the right value from open_restricted
author
Peter Hutterer
<peter.hutterer@who-t.net>
Wed, 6 May 2015 01:55:48 +0000
(11:55 +1000)
committer
Peter Hutterer
<peter.hutterer@who-t.net>
Wed, 6 May 2015 01:56:40 +0000
(11:56 +1000)
fd or negative errno on failure.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest.c
patch
|
blob
|
history
diff --git
a/test/litest.c
b/test/litest.c
index
d3b5d6c
..
d0043da
100644
(file)
--- 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