From owner-freebsd-current@freebsd.org Thu May 13 19:13:15 2021 Return-Path: Delivered-To: freebsd-current@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 6381062BAE6 for ; Thu, 13 May 2021 19:13:15 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4Fh1XC1YV0z3nGD for ; Thu, 13 May 2021 19:13:15 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: by mailman.nyi.freebsd.org (Postfix) id 33A2062BEAB; Thu, 13 May 2021 19:13:15 +0000 (UTC) Delivered-To: current@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 3366962BAE5 for ; Thu, 13 May 2021 19:13:15 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fh1XB6X3vz3nCp for ; Thu, 13 May 2021 19:13:14 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 14DJDCls077840; Thu, 13 May 2021 12:13:12 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 14DJDCZa077839; Thu, 13 May 2021 12:13:12 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202105131913.14DJDCZa077839@gndrsh.dnsmgr.net> Subject: Re: HEADSUP: i2c(8) has been washed and ironed In-Reply-To: <6070.1620907795@critter.freebsd.dk> To: Poul-Henning Kamp Date: Thu, 13 May 2021 12:13:12 -0700 (PDT) CC: current@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4Fh1XB6X3vz3nCp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2021 19:13:15 -0000 > I have renovated the i2c(8) program and while I belive all argument > processing is 100% compatible, various undocumented aspects of the > program may have changed, amongst these precisely what goes to > stdout and stderr. > > Apologies if this breaks any of your scripts. > > > There is one aspect of this program which I have not changed, but > which bugs me utterly: All arguments are in hex, except [-c count] > which is decimal. > > My personal preference would be if all the arguments called strtoul(3) > with zero third argument, so that users can use decimal, octal or > hex as they prefer, but I fear that would break pretty much every > single script. > > Alternatively [-c count] could be changed to be hex like the rest. What about adding a new flag to enable strtoul behavior? Or invoked by another name i2cX and install a hard link? > > phk@FreeBSD.ORG | TCP/IP since RFC 956 -- Rod Grimes rgrimes@freebsd.org