From owner-freebsd-bugs@FreeBSD.ORG Tue Apr 20 14:50:02 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E96801065670 for ; Tue, 20 Apr 2010 14:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D915E8FC08 for ; Tue, 20 Apr 2010 14:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o3KEo2bO055951 for ; Tue, 20 Apr 2010 14:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3KEo23m055950; Tue, 20 Apr 2010 14:50:02 GMT (envelope-from gnats) Date: Tue, 20 Apr 2010 14:50:02 GMT Message-Id: <201004201450.o3KEo23m055950@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Wayne Sierke Cc: Subject: Re: bin/145748: hexdump(1) %s format qualifier broken X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Wayne Sierke List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2010 14:50:03 -0000 The following reply was made to PR bin/145748; it has been noted by GNATS. From: Wayne Sierke To: Garrett Cooper Cc: bug-followup@freebsd.org Subject: Re: bin/145748: hexdump(1) %s format qualifier broken Date: Wed, 21 Apr 2010 00:03:30 +0930 > The fact that "%4s" fails and isn't noted in the addendum is a failure > according to the specifications of hexdump as per the manpage; "%.4s" > passing is a reasonable workaround for broken "%[:digit:]s" > functionality. I should have made my earlier reply more explicit. It doesn't seem to be a failure. The part of the hexdump(1) manpage quoted previously: o A byte count or field precision is required for each ``s'' con- version character (unlike the fprintf(3) default which prints the entire string if the precision is unspecified). And as observed hexdump does accept the required value when passed a "field precision" - the numeric value immediately after the period in "%.4s" (NB not a "field width" - as described in fprintf(3) and slightly more clearly in printf(3)).