bin/145748: hexdump(1) %s format qualifier broken

Wayne Sierke ws at au.dyndns.ws
Tue Apr 20 14:50:03 UTC 2010


The following reply was made to PR bin/145748; it has been noted by GNATS.

From: Wayne Sierke <ws at au.dyndns.ws>
To: Garrett Cooper <yanegomi at gmail.com>
Cc: bug-followup at 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)).
 
 


More information about the freebsd-bugs mailing list