mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-10 21:00:21 +01:00
test: return the right value from open_restricted
fd or negative errno on failure. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
3844856302
commit
1ea69203ac
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue