Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/gpioctl If we can't read a pin while listing pins, ...



details:   https://anonhg.NetBSD.org/src/rev/a4587e601be0
branches:  trunk
changeset: 372631:a4587e601be0
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Tue Dec 13 21:47:36 2022 +0000

description:
If we can't read a pin while listing pins, simply continue on to next
pin rather than abort.

diffstat:

 usr.sbin/gpioctl/gpioctl.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b745c234e63b -r a4587e601be0 usr.sbin/gpioctl/gpioctl.c
--- a/usr.sbin/gpioctl/gpioctl.c        Tue Dec 13 21:29:04 2022 +0000
+++ b/usr.sbin/gpioctl/gpioctl.c        Tue Dec 13 21:47:36 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gpioctl.c,v 1.27 2019/10/20 09:41:53 tnn Exp $ */
+/* $NetBSD: gpioctl.c,v 1.28 2022/12/13 21:47:36 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2008, 2010, 2011, 2013 Marc Balmer <mbalmer%NetBSD.org@localhost>
@@ -17,7 +17,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: gpioctl.c,v 1.27 2019/10/20 09:41:53 tnn Exp $");
+__RCSID("$NetBSD: gpioctl.c,v 1.28 2022/12/13 21:47:36 jakllsch Exp $");
 
 /*
  * Program to control GPIO devices.
@@ -362,7 +362,7 @@
                memset(&req, 0, sizeof(req));
                req.gp_pin = i;
                if (ioctl(devfd, GPIOREAD, &req) == -1)
-                       err(EXIT_FAILURE, "GPIOREAD");
+                       continue;
                if (!quiet)
                        printf("%d: %s\n", i, req.gp_name);
        }



Home | Main Index | Thread Index | Old Index