From: Jonathan Cameron <jic23@kernel.org>
To: Hartmut Knaack <knaack.h@gmx.de>,
Linus Walleij <linus.walleij@linaro.org>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: event_monitor: report unsupported events
Date: Sat, 15 Aug 2015 16:17:11 +0100 [thread overview]
Message-ID: <55CF57F7.3040108@kernel.org> (raw)
In-Reply-To: <55CA4302.8080609@gmx.de>
On 11/08/15 19:46, Hartmut Knaack wrote:
> Linus Walleij schrieb am 11.08.2015 um 14:34:
>> This makes the event monitor bail out with a helpful error
>> message if a device does not support events, as a related
>> fix to iio core now makes it return -ENODEV properly.
>>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> Acked-by: Hartmut Knaack <knaack.h@gmx.de>
Applied to the togreg branch of iio.git
Thanks,
Jonathan
>> ---
>> tools/iio/iio_event_monitor.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
>> index cd3fd41b481d..d51eb04202e9 100644
>> --- a/tools/iio/iio_event_monitor.c
>> +++ b/tools/iio/iio_event_monitor.c
>> @@ -284,7 +284,11 @@ int main(int argc, char **argv)
>> ret = ioctl(fd, IIO_GET_EVENT_FD_IOCTL, &event_fd);
>> if (ret == -1 || event_fd == -1) {
>> ret = -errno;
>> - fprintf(stderr, "Failed to retrieve event fd\n");
>> + if (ret == -ENODEV)
>> + fprintf(stderr,
>> + "This device does not support events\n");
>> + else
>> + fprintf(stderr, "Failed to retrieve event fd\n");
>> if (close(fd) == -1)
>> perror("Failed to close character device file");
>>
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2015-08-15 15:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-11 12:34 [PATCH] iio: event_monitor: report unsupported events Linus Walleij
2015-08-11 18:46 ` Hartmut Knaack
2015-08-15 15:17 ` Jonathan Cameron [this message]
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=55CF57F7.3040108@kernel.org \
--to=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.