X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fcommon%2Fjoystick.c;h=a3d6abd6acc37803809c75f6cbd887336bf54c0f;hp=94c85feba4ba1f1111e07d928879a04854e68b02;hb=211d7eb1de2d3a9cd97846deb9a85a934dae2981;hpb=d3e5eadbdcce508c48258b15664baa753ce6fc81 diff --git a/ui/common/joystick.c b/ui/common/joystick.c index 94c85fe..a3d6abd 100644 --- a/ui/common/joystick.c +++ b/ui/common/joystick.c @@ -20,7 +20,6 @@ #include "config.h" #endif -#define _GNU_SOURCE #include #include #include @@ -94,13 +93,13 @@ struct pjs *pjs_init(void *ctx, int (*map)(const struct js_event *)) talloc_set_destructor(pjs, pjs_destructor); - pb_log("%s: using %s\n", __func__, dev_name); + pb_debug("%s: using %s\n", __func__, dev_name); return pjs; out_err: - close(pjs->fd); - pjs->fd = 0; + if (pjs->fd >= 0) + close(pjs->fd); talloc_free(pjs); return NULL; }