All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Chen <marcochen.dev@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Hartmut Knaack" <knaack.h@gmx.de>,
	"Daniel Baluta" <daniel.baluta@intel.com>,
	"Linus Walleij" <linusw@kernel.org>,
	linux-iio@vger.kernel.org, skhan@linuxfoundation.org,
	linux-kernel-mentees@lists.linux.dev
Subject: [PATCH 0/2] tools: iio: iio_generic_buffer: fix exit status
Date: Fri, 27 Nov 2026 03:57:20 -0500	[thread overview]
Message-ID: <20261127085722.126797-1-marcochen.dev@gmail.com> (raw)

This series fixes a wrong exit status in two cases for 
iio_generic_buffer. These issues were found during the process of 
using iio_generic_buffer in a bash shell script while testing
buffered reads with the max30102 pulse oximeter.

All patches were tested on a Raspberry Pi 4 running the IIO
subsystem tree testing branch with the max30102. 

For patch 1, a normal buffered capture exited with 1 before and
0 after, with and without the -e flag.

For patch 2, running iio_generic_buffer as a non-root user exited
with 0 before and 254 (-ENOENT) after.

Marco Chen (2):
  tools: iio: iio_generic_buffer: return 0 on success
  tools: iio: iio_generic_buffer: return error if no channels can be
    enabled

 tools/iio/iio_generic_buffer.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


base-commit: 39508411b82d4dc29dd245bb471ec9ecc1111c9d
-- 
2.56.1


             reply	other threads:[~2026-11-27  8:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  8:57 Marco Chen [this message]
2026-11-27  8:57 ` [PATCH 1/2] tools: iio: iio_generic_buffer: return 0 on success Marco Chen
2026-11-27  8:57 ` [PATCH 2/2] tools: iio: iio_generic_buffer: return error if no channels can be enabled Marco Chen
2026-11-27 11:36 ` [PATCH 0/2] tools: iio: iio_generic_buffer: fix exit status Arnav Kapoor
     [not found]   ` <CAAZOf24WuvdmyvpAhZsxafTiscSnjvW8Rt0fZjK9QHkfK8PN9Q@mail.gmail.com>
2026-11-28 18:44     ` Marco Chen
2026-11-29  1:32       ` Jonathan Cameron

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=20261127085722.126797-1-marcochen.dev@gmail.com \
    --to=marcochen.dev@gmail.com \
    --cc=andy@kernel.org \
    --cc=daniel.baluta@intel.com \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=linusw@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=nuno.sa@analog.com \
    --cc=skhan@linuxfoundation.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.