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

Richard Palethorpe rpalethorpe@suse.de
Wed Oct 25 09:52:18 CEST 2023


Hello,

Petr Vorel <pvorel@suse.cz> writes:

> 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.

But we don't check if the header exists with HAVE_LINUX_UINPUT_H before
loading it?

>
> 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__ */


-- 
Thank you,
Richard.


More information about the ltp mailing list