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
0002024 [BusyBox] Standards Compliance minor always 02-02-08 19:35 02-10-08 03:13
Reporter Craig View Status public  
Assigned To BusyBox
Priority normal Resolution no change required  
Status closed   Product Version
Summary 0002024: Command substitution in busybox-1.8.2 does not work
Description I have busybox in /tmp/myroot

# mount -t proc proc /tmp/myroot/proc/
# chroot /tmp/myroot/ /bin/sh
/ # sed -n 's/^ *\([0-9]\+\) \+misc$/\1/p' /proc/devices
10
/ # A=`sed -n 's/^ *\([0-9]\+\) \+misc$/\1/p' /proc/devices`
/ # echo $A
                                
/ # A=`ls`
/ # echo $A
bin dev devmap_mknod.sh etc linuxrc new proc usr
/ #

Somehow the substitution does not work for the sed line, any hints? What's wrong here? I'm desperate :(

If interested, also see:
http://www.mail-archive.com/busybox@busybox.net/msg02975.html [^]
Additional Information
Attached Files  .config [^] (20,544 bytes) 02-10-08 00:30
 sed-subst.patch [^] (343 bytes) 02-10-08 01:21

- Relationships

- Notes
(0003654)
vda
02-03-08 14:09

Please post your .config
 
(0003774)
iluxa
02-10-08 00:30

I have the same problem. .config attached.
 
(0003794)
iluxa
02-10-08 01:21

OK. Seems that the problem is related to the way sed handles output. Seems like in case it's not line-buffered, it somehow gets discarded (FILE* isn't getting flushed/closed?). I didn't track exact problem down, but attached patch seems to
get me where I need (it simply flushes output file every time something is written to it).
 
(0003804)
iluxa
02-10-08 01:46

Bah. Turns out I forgot to remove -Wl,--gc-sections from scripts/trylink...
 

- Issue History
Date Modified Username Field Change
02-02-08 19:35 Craig New Issue
02-02-08 19:35 Craig Status new => assigned
02-02-08 19:35 Craig Assigned To  => BusyBox
02-03-08 14:09 vda Note Added: 0003654
02-10-08 00:30 iluxa File Added: .config
02-10-08 00:30 iluxa Note Added: 0003774
02-10-08 01:21 iluxa Note Added: 0003794
02-10-08 01:21 iluxa File Added: sed-subst.patch
02-10-08 01:46 iluxa Note Added: 0003804
02-10-08 03:13 vda Status assigned => closed
02-10-08 03:13 vda Resolution open => no change required


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker