[BusyBox 0001192]: applets/usage_compressed cannot parse od(1) output on Mac OS X (fix attached)
bugs at busybox.net
bugs at busybox.net
Sat Feb 3 07:49:18 UTC 2007
The following issue has been SUBMITTED.
======================================================================
http://busybox.net/bugs/view.php?id=1192
======================================================================
Reported By: mattj
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 1192
Category: Other
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
======================================================================
Date Submitted: 02-02-2007 23:49 PST
Last Modified: 02-02-2007 23:49 PST
======================================================================
Summary: applets/usage_compressed cannot parse od(1) output
on Mac OS X (fix attached)
Description:
On Mac OS X (10.4.8) (and presumably other BSD systems) the output of od(1)
differs from Linux.
Mac:
echo foo | od -v -t x1
0000000 66 6f 6f 0a
Linux:
0000000 66 6f 6f 0a
The multiple spaces result in sed producing a bogus C file that gives
compile errors.
static const char packed_usage[] =
"\x \x42\x 5a\x 68\x 31\x 31\x 41\x 59\x 26\x 53\x 59\x 9b\x ea\x 54\x
c8\x 00\x 00"
A trivial patch to ignore extra spaces:
--- usage_compressed.old 2007-02-03 16:36:59.000000000 +0900
+++ usage_compressed 2007-02-03 16:36:42.000000000 +0900
@@ -14,6 +14,6 @@
echo 'static const char packed_usage[] = '
"$loc/usage" | bzip2 -1 | od -v -t x1 \
-| $SED -e 's/^[^ ]*//' -e 's/ \(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
+| $SED -e 's/^[^ ]*//' -e 's/ +\(..\)/\\x\1/g' -e 's/^\(.*\)$/"\1"/'
echo ';'
echo '#define SIZEOF_usage_messages' `expr 0 + $sz`
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
02-02-07 23:49 mattj New Issue
02-02-07 23:49 mattj Status new => assigned
02-02-07 23:49 mattj Assigned To => BusyBox
======================================================================
More information about the busybox-cvs
mailing list