From: Jonathan Cameron <jic23@kernel.org>
To: Crestez Dan Leonard <leonard.crestez@intel.com>,
linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Daniel Baluta <daniel.baluta@intel.com>
Subject: Re: [PATCH] iio: generic_buffer: Fix --trigger-num option
Date: Sat, 11 Jun 2016 17:38:32 +0100 [thread overview]
Message-ID: <aca4a66a-e317-c727-5980-df75671bdd90@kernel.org> (raw)
In-Reply-To: <d3181955589a6b6745cb008edbc24d2a1b8b0892.1464980098.git.leonard.crestez@intel.com>
On 03/06/16 19:56, Crestez Dan Leonard wrote:
> Initialize trig_num to -1 and handle trig_num=0 as a valid id.
Good spot.
Applied to the togreg branch of iio.git.
Thanks,
Jonathan
>
> Fixes: 7c7e9dad (iio: iio_generic_buffer: Add --trigger-num option)
> Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
> ---
> tools/iio/iio_generic_buffer.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/iio/iio_generic_buffer.c b/tools/iio/iio_generic_buffer.c
> index e8c3052..0e8a1f7 100644
> --- a/tools/iio/iio_generic_buffer.c
> +++ b/tools/iio/iio_generic_buffer.c
> @@ -341,7 +341,7 @@ int main(int argc, char **argv)
>
> char *data = NULL;
> ssize_t read_size;
> - int dev_num = -1, trig_num;
> + int dev_num = -1, trig_num = -1;
> char *buffer_access = NULL;
> int scan_size;
> int noevents = 0;
> @@ -456,7 +456,7 @@ int main(int argc, char **argv)
>
> if (notrigger) {
> printf("trigger-less mode selected\n");
> - } if (trig_num > 0) {
> + } if (trig_num >= 0) {
> char *trig_dev_name;
> ret = asprintf(&trig_dev_name, "%strigger%d", iio_dir, trig_num);
> if (ret < 0) {
>
prev parent reply other threads:[~2016-06-11 16:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 18:56 [PATCH] iio: generic_buffer: Fix --trigger-num option Crestez Dan Leonard
2016-06-11 16:38 ` 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=aca4a66a-e317-c727-5980-df75671bdd90@kernel.org \
--to=jic23@kernel.org \
--cc=daniel.baluta@intel.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=leonard.crestez@intel.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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