BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001192 [BusyBox] Other minor always 02-02-07 23:49 02-03-07 04:46
Reporter mattj View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version 1.4.x
Summary 0001192: 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`

Additional Information
Attached Files

- Relationships

- Notes
(0002088)
vda
02-03-07 04:46

fixed in rev 17736, thanks
 

- 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
02-03-07 04:46 vda Status assigned => closed
02-03-07 04:46 vda Note Added: 0002088
02-03-07 04:46 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker