linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@gmail.com>
To: Frank Praznik <frank.praznik@oh.rr.com>
Cc: linux-input <linux-input@vger.kernel.org>,
	Jiri Kosina <jkosina@suse.cz>,
	David Herrmann <dh.herrmann@gmail.com>
Subject: Re: [PATCH 6/6] HID: Update the hidraw sample with the usage of HIDIOCGRAWCLIENTADDR
Date: Fri, 31 Jan 2014 14:18:00 -0500	[thread overview]
Message-ID: <CAN+gG=GtVBGrm+mPZ3kp1JVoapf6t-XZYjCf4t1k5aQpioRZjA@mail.gmail.com> (raw)
In-Reply-To: <1391189573-2591-7-git-send-email-frank.praznik@oh.rr.com>

On Fri, Jan 31, 2014 at 12:32 PM, Frank Praznik <frank.praznik@oh.rr.com> wrote:
> Add the HIDIOCGRAWCLIENTADDR ioctl to the hidraw sample program.
>

I would personally squash this one with the previous one, but this is
more a matter of taste IMO.

> Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
> ---
>  samples/hidraw/hid-example.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/samples/hidraw/hid-example.c b/samples/hidraw/hid-example.c
> index 512a7e5..dbf072d 100644
> --- a/samples/hidraw/hid-example.c
> +++ b/samples/hidraw/hid-example.c
> @@ -23,6 +23,10 @@
>  #define HIDIOCSFEATURE(len)    _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
>  #define HIDIOCGFEATURE(len)    _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
>  #endif
> +#ifndef HIDIOCGRAWCLIENTADDR
> +#warning Please have your distro update the userspace kernel headers
> +#define HIDIOCGRAWCLIENTADDR(len) _IOC(_IOC_READ, 'H', 0x08, len)
> +#endif
>
>  /* Unix */
>  #include <sys/ioctl.h>
> @@ -93,6 +97,13 @@ int main(int argc, char **argv)
>         else
>                 printf("Raw Phys: %s\n", buf);
>
> +       /* Get Client Address */
> +       res = ioctl(fd, HIDIOCGRAWCLIENTADDR(256), buf);
> +       if (res < 0)
> +               perror("HIDIOCGRAWCLIENTADDR");
> +       else
> +               printf("Raw Client Address: %s\n", buf);
> +
>         /* Get Raw Info */
>         res = ioctl(fd, HIDIOCGRAWINFO, &info);
>         if (res < 0) {
> --
> 1.8.5.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-01-31 19:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31 17:32 [PATCH 0/6] HID: Add a stable method for retrieving the client MAC address of a HID device Frank Praznik
2014-01-31 17:32 ` [PATCH 1/6] HID: Add the client_addr member to the hid_device struct Frank Praznik
2014-01-31 19:12   ` Benjamin Tissoires
2014-01-31 17:32 ` [PATCH 2/6] HID: hidp: Store the device MAC in client_addr Frank Praznik
2014-01-31 17:32 ` [PATCH 3/6] HID: Add support for setting client_addr in uhid Frank Praznik
2014-01-31 19:16   ` Benjamin Tissoires
2014-01-31 17:32 ` [PATCH 4/6] HID: Add the HIDIOCGRAWCLIENTADDR ioctl to hidraw Frank Praznik
2014-01-31 19:19   ` Benjamin Tissoires
2014-01-31 17:32 ` [PATCH 5/6] HID: Add the HIDIOCGRAWCLIENTADDR ioctl to the hidraw documentation Frank Praznik
2014-01-31 19:17   ` Benjamin Tissoires
2014-01-31 17:32 ` [PATCH 6/6] HID: Update the hidraw sample with the usage of HIDIOCGRAWCLIENTADDR Frank Praznik
2014-01-31 19:18   ` Benjamin Tissoires [this message]
2014-01-31 19:10 ` [PATCH 0/6] HID: Add a stable method for retrieving the client MAC address of a HID device Benjamin Tissoires
2014-01-31 20:04   ` Frank Praznik
2014-01-31 20:45     ` Benjamin Tissoires
2014-02-01 16:06       ` Frank Praznik
2014-02-01 16:28         ` Benjamin Tissoires
2014-02-03 16:24           ` David Herrmann
2014-02-03 17:31             ` Frank Praznik
2014-02-03 17:45               ` David Herrmann
2014-02-03 17:57                 ` Dmitry Torokhov
2014-02-03 18:06                   ` David Herrmann
2014-02-03 18:33                     ` Frank Praznik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAN+gG=GtVBGrm+mPZ3kp1JVoapf6t-XZYjCf4t1k5aQpioRZjA@mail.gmail.com' \
    --to=benjamin.tissoires@gmail.com \
    --cc=dh.herrmann@gmail.com \
    --cc=frank.praznik@oh.rr.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).