Module Name: src Committed By: jakllsch Date: Tue Dec 13 21:47:36 UTC 2022
Modified Files: src/usr.sbin/gpioctl: gpioctl.c Log Message: If we can't read a pin while listing pins, simply continue on to next pin rather than abort. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/gpioctl/gpioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/gpioctl/gpioctl.c diff -u src/usr.sbin/gpioctl/gpioctl.c:1.27 src/usr.sbin/gpioctl/gpioctl.c:1.28 --- src/usr.sbin/gpioctl/gpioctl.c:1.27 Sun Oct 20 09:41:53 2019 +++ src/usr.sbin/gpioctl/gpioctl.c Tue Dec 13 21:47:36 2022 @@ -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 <mbal...@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); }