[PATCH libinput 1/3] test: move the interface declaration down

Hans de Goede hdegoede at redhat.com
Mon Jun 16 03:00:00 PDT 2014


Hi,

On 06/13/2014 04:48 AM, Peter Hutterer wrote:
> No functional changes, just some prep work.

The commit message seems wrong, as the interface declaration is
actually being moved up, not down (*).

With a fixed commit message this is:

Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans


*) Must not make a joke about everything being upside down in Australia :)

> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  test/litest.c | 35 +++++++++++++++++------------------
>  1 file changed, 17 insertions(+), 18 deletions(-)
> 
> diff --git a/test/litest.c b/test/litest.c
> index 0a9cc72..d3f8f0d 100644
> --- a/test/litest.c
> +++ b/test/litest.c
> @@ -267,6 +267,23 @@ litest_log_handler(enum libinput_log_priority pri,
>  	vfprintf(stderr, format, args);
>  }
>  
> +static int
> +open_restricted(const char *path, int flags, void *userdata)
> +{
> +	return open(path, flags);
> +}
> +
> +static void
> +close_restricted(int fd, void *userdata)
> +{
> +	close(fd);
> +}
> +
> +struct libinput_interface interface = {
> +	.open_restricted = open_restricted,
> +	.close_restricted = close_restricted,
> +};
> +
>  static const struct option opts[] = {
>  	{ "list", 0, 0, 'l' },
>  	{ "verbose", 0, 0, 'v' },
> @@ -335,24 +352,6 @@ litest_run(int argc, char **argv) {
>  	return failed;
>  }
>  
> -static int
> -open_restricted(const char *path, int flags, void *userdata)
> -{
> -	return open(path, flags);
> -}
> -
> -static void
> -close_restricted(int fd, void *userdata)
> -{
> -	close(fd);
> -}
> -
> -const struct libinput_interface interface = {
> -	.open_restricted = open_restricted,
> -	.close_restricted = close_restricted,
> -};
> -
> -
>  static struct input_absinfo *
>  merge_absinfo(const struct input_absinfo *orig,
>  	      const struct input_absinfo *override)
> 


More information about the wayland-devel mailing list