[Bug 3769] New: Non compliant option on od

bugzilla at busybox.net bugzilla at busybox.net
Sat May 21 09:13:12 UTC 2011


           Summary: Non compliant option on od
           Product: Busybox
           Version: 1.16.x
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Standard Compliance
        AssignedTo: unassigned at busybox.net
        ReportedBy: jimfr06 at gmail.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0

First I want to apologize in advance if my report is not complete, because I
don't have the hardware/software I report on.
I just report it because I ran into it while improving a script to make it run
on Synology DS1010+ that uses 

BusyBox v1.16.1 (2011-02-25 19:05:47 CST) multi-call binary.

The whole story (with explained and workaround-ed differences) is here
http://forum.ubuntu-fr.org/viewtopic.php?id=408024&p=2 (sorry it is in French),
starting at post #36 and next.

The "bug" occurs on 'od', which is not part of the 'core' for Synology DS1010+
but belongs to 'texutils'. Sorry don't know which version of 'textutil' it is
exactly, but it is the one available for Synology DS1010+ with the extension

So here is what the help of od says:

od --help
Usage: od [OPTION]... [FILE]...
  or:  od --traditional [FILE] [[+]OFFSET [[+]LABEL]]

Write an unambiguous representation, octal bytes by default,
of FILE to standard output.  With more than one FILE argument,
concatenate them in the listed order to form the input.
With no FILE, or when FILE is -, read standard input.

All arguments to long options are mandatory for short options.
  -A, --address-radix=RADIX   decide how file offsets are printed
  -j, --skip-bytes=BYTES      skip BYTES input bytes first
  -N, --read-bytes=BYTES      limit dump to BYTES input bytes
  -s, --strings[=BYTES]       output strings of at least BYTES graphic chars

Please notice the -s (lowercase 's'), short option for --string

(Be aware also that in the process, the tester warped to Busybox 1.10.3, I
don't know it that has an effect on the options recognized by 'od')

Unfortunately that is NOT COMPLIANT.
The compliant short form is -S (uppercase 'S')

But I ran into the bug myself on GNU version of 'od' because there is a
translation bug I filed on the ubuntu tracking system (link here:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/784758 )

The "bug" in the GNU world is only translation as you can see here :

$ env LANGUAGE=en_GB:en od --help | grep strings
  -S, --strings[=BYTES]       output strings of at least BYTES graphic chars

$ env LANGUAGE=fr_FR:fr od --help | grep strings
  -s, --strings[=BYTES]       affiche les chaînes d'au moins BYTES caractères

So may be it was this old bug that tricked you into using a "non-compliant"
short form for --string. The "bug" in still there on the GNU version for French
translations (and potentially others?) but it is correct in english.

In both case, the 'man' that is in English displays the correct option.

The GNU 'od' accepts -S (uppercase 'S') as short for --string
For the GNU 'od' -s (lowercase 's') seems to have other meaning than --string.

Of course the bug is "minor" as you can still workaround (didn't test) using
the long form --string

Best regards, in the hope my report helps better compliance of your fantastic
work (with no increase in the footprint of Busybox as it is only a "typo").

Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the busybox-cvs mailing list