[PATCH evemu] Print uname in the header comments

Benjamin Tissoires benjamin.tissoires at gmail.com
Thu Jun 11 08:57:24 PDT 2015


On Wed, Jun 10, 2015 at 9:14 PM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> Knowing what approximate kernel version this was recorded against help
> identify a few bugs before we spend too much time trying to reproduce it on
> other kernels.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---

Applied and pushed:
  095fc44..b905290  master -> master

Cheers,
Benjamin

>  src/evemu.c | 18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/src/evemu.c b/src/evemu.c
> index b98d340..b800998 100644
> --- a/src/evemu.c
> +++ b/src/evemu.c
> @@ -52,6 +52,7 @@
>  #include <poll.h>
>  #include <ctype.h>
>  #include <unistd.h>
> +#include <sys/utsname.h>
>
>  #include "version.h"
>
> @@ -343,12 +344,25 @@ static void write_desc(const struct evemu_device *dev, FILE *fp)
>  #endif
>  }
>
> -int evemu_write(const struct evemu_device *dev, FILE *fp)
> +static void
> +write_header(FILE *fp)
>  {
> -       int i;
> +       struct utsname u;
>
>         fprintf(fp, "# EVEMU %d.%d\n", EVEMU_FILE_MAJOR, EVEMU_FILE_MINOR);
>
> +       if (uname(&u) == -1)
> +               return;
> +
> +       fprintf(fp, "# Kernel: %s\n", u.release);
> +}
> +
> +int evemu_write(const struct evemu_device *dev, FILE *fp)
> +{
> +       int i;
> +
> +       write_header(fp);
> +
>         write_desc(dev, fp);
>
>         fprintf(fp, "N: %s\n", evemu_get_name(dev));
> --
> 2.4.1
>


More information about the Input-tools mailing list