From owner-dev-commits-src-main@freebsd.org Wed May 12 21:39:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7891464D233; Wed, 12 May 2021 21:39:31 +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 4FgSqR2gWzz3MYv; Wed, 12 May 2021 21:39:31 +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 4CC7812F82; Wed, 12 May 2021 21:39:31 +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 14CLdVMa093861; Wed, 12 May 2021 21:39:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14CLdVRh093860; Wed, 12 May 2021 21:39:31 GMT (envelope-from git) Date: Wed, 12 May 2021 21:39:31 GMT Message-Id: <202105122139.14CLdVRh093860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 29c6e6e279b3 - main - More refactoring & polishing. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 29c6e6e279b3bbab78510ff03922e7fb85f93ee2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2021 21:39:31 -0000 The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=29c6e6e279b3bbab78510ff03922e7fb85f93ee2 commit 29c6e6e279b3bbab78510ff03922e7fb85f93ee2 Author: Poul-Henning Kamp AuthorDate: 2021-05-12 21:37:00 +0000 Commit: Poul-Henning Kamp CommitDate: 2021-05-12 21:39:19 +0000 More refactoring & polishing. Do not call usage() without telling why. Extract '-a' mode into a function, and sanitize hexdumping. Revise manpage to match reality of code. --- usr.sbin/i2c/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/i2c/i2c.c b/usr.sbin/i2c/i2c.c index c862666fc9a7..588aad8592ee 100644 --- a/usr.sbin/i2c/i2c.c +++ b/usr.sbin/i2c/i2c.c @@ -79,7 +79,7 @@ usage(const char *msg) if (msg != NULL) fprintf(stderr, "%s\n", msg); fprintf(stderr, "usage: %s -a addr [-f device] [-d [r|w]] [-o offset] " - "[-w [0|8|16]] [-c count] [-m [tr|ss|rs|no]] [-b] [-v]\n", + "[-w [0|8|16|16LE|16BE]] [-c count] [-m [tr|ss|rs|no]] [-b] [-v]\n", getprogname()); fprintf(stderr, " %s -s [-f device] [-n skip_addr] -v\n", getprogname());