From ec5e60c41edb9f5fc736af4785ed210d71c24a8b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 21 Feb 2014 15:58:20 +1000 Subject: [PATCH] Reset the fd to -1 after PreInit We open and remove the device immediately, but the fd was left on the old value. This makes debugging harder, since the fd looks correct when it isn't. Signed-off-by: Peter Hutterer --- src/libinput.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libinput.c b/src/libinput.c index 7632406..827ad17 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -580,6 +580,7 @@ static int xf86libinput_pre_init(InputDriverPtr drv, libinput_device_ref(device); libinput_path_remove_device(device); + pInfo->fd = -1; pInfo->private = driver_data; driver_data->path = path; driver_data->device = device;