diff options
| author | jakllsch <jakllsch@NetBSD.org> | 2022-12-13 21:47:36 +0000 |
|---|---|---|
| committer | jakllsch <jakllsch@NetBSD.org> | 2022-12-13 21:47:36 +0000 |
| commit | fa616ef49c60897405cf48a7cb989addbcfafda2 (patch) | |
| tree | b479b75ecd75922fe8bd6776cf87706c87a3d650 | |
| parent | 61dea29bd3104fb25a29a71a567040c841ab7365 (diff) | |
If we can't read a pin while listing pins, simply continue on to next
pin rather than abort.
| -rw-r--r-- | usr.sbin/gpioctl/gpioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/gpioctl/gpioctl.c b/usr.sbin/gpioctl/gpioctl.c index 26c0f100028..e42c9e7220b 100644 --- a/usr.sbin/gpioctl/gpioctl.c +++ b/usr.sbin/gpioctl/gpioctl.c @@ -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> @@ -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 @@ gpiolist() 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); } |
