[LTP] [PATCH 1/2] lapi: Add uinput.h

Petr Vorel pvorel@suse.cz
Wed Oct 25 09:39:52 CEST 2023


Hi Richie,

> > +++ b/configure.ac
> > @@ -67,6 +67,7 @@ AC_CHECK_HEADERS_ONCE([ \
> >      linux/tls.h \
> >      linux/tty.h \
> >      linux/types.h \
> > +    linux/uinput.h \

> Do we use this?
Yes, see below.

> >      linux/userfaultfd.h \
> >      netinet/sctp.h \
> >      pthread.h \
> > diff --git a/include/lapi/uinput.h b/include/lapi/uinput.h
> > new file mode 100644
> > index 000000000..bdd6f466f
> > --- /dev/null
> > +++ b/include/lapi/uinput.h
> > @@ -0,0 +1,15 @@
> > +// SPDX-License-Identifier: GPL-2.0-or-later
> > +/*
> > + * Copyright (c) 2023 Petr Vorel <pvorel@suse.cz>
> > + */
> > +
> > +#ifndef LAPI_UINPUT_H__
> > +#define LAPI_UINPUT_H__
> > +
> > +#include <linux/uinput.h>
Here. We have policy, that we first load the header and then check for a
fallback.

Kind regards,
Petr

> > +
> > +#ifndef UI_GET_SYSNAME
> > +# define UI_GET_SYSNAME(len)	_IOC(_IOC_READ, UINPUT_IOCTL_BASE, 44, len)
> > +#endif
> > +
> > +#endif	/* LAPI_UINPUT_H__ */


More information about the ltp mailing list