From nobody Thu Oct 07 06:05:02 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 91B2D17EE6CF; Thu, 7 Oct 2021 06:05:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HQ14t3kdMz3M3S; Thu, 7 Oct 2021 06:05:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FC8F6998; Thu, 7 Oct 2021 06:05:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1976529M073372; Thu, 7 Oct 2021 06:05:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1976525Y073371; Thu, 7 Oct 2021 06:05:02 GMT (envelope-from git) Date: Thu, 7 Oct 2021 06:05:02 GMT Message-Id: <202110070605.1976525Y073371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 67bceb38f463 - main - i2c(8): fix option handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67bceb38f463d8a929c55efdcfcfefc9aedfeff6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=67bceb38f463d8a929c55efdcfcfefc9aedfeff6 commit 67bceb38f463d8a929c55efdcfcfefc9aedfeff6 Author: Martin Birgmeier AuthorDate: 2021-10-07 05:20:56 +0000 Commit: Robert Wing CommitDate: 2021-10-07 05:56:20 +0000 i2c(8): fix option handling Recognize the '-o' option when processing command line arguments. Fixes: 9c10d00bf8cd ("i2c(8): Add interpreted mode for batch/scripted...") PR: 258572 --- usr.sbin/i2c/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/i2c/i2c.c b/usr.sbin/i2c/i2c.c index 87bb1f0fe983..2ab7c55772de 100644 --- a/usr.sbin/i2c/i2c.c +++ b/usr.sbin/i2c/i2c.c @@ -744,7 +744,7 @@ main(int argc, char** argv) struct options i2c_opt; const char *dev, *err_msg; int fd, error = 0, ch; - const char *optflags = "a:f:d:o:w:c:m:n:sbvrh"; + const char *optflags = "a:f:d:o:iw:c:m:n:sbvrh"; char do_what = 0; dev = I2C_DEV; @@ -763,7 +763,7 @@ main(int argc, char** argv) /* Find out what we are going to do */ - while ((ch = getopt(argc, argv, "a:f:d:iw:c:m:n:sbvrh")) != -1) { + while ((ch = getopt(argc, argv, optflags)) != -1) { switch(ch) { case 'a': case 'i':