[#6282] hush: write errors in redirects write too much data
Submitted By: Martin Strubel
Open Date
2010-10-05 07:25:50
Priority:
Low Assignee:
Nobody
Status:
Open Fixed In Release:
N/A
Found In Release:
snaps Release:
trunk svn9843
Category:
Kernel Functions Board:
Custom
Processor:
ALL Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
N/A
Uboot version or rev.:
Toolchain version or rev.:
trunk
App binary format:
N/A
Summary: hush: write errors in redirects write too much data
Details:
If a GPIO is exported from a script twice, like shown below, it obviously causes the wrong GPIO to be exported.
Reproduce:
/ # echo 11 >/sys/class/gpio/export ; ls /sys/class/gpio/
export gpio11 gpiochip0 unexport
/ # echo 11 >/sys/class/gpio/export ; ls /sys/class/gpio/
export gpio1 gpio11 gpiochip0 unexport
^^^^^
Follow-ups
--- Mike Frysinger 2010-10-06 02:52:13
not a GPIO bug. this is how the shell works when a redirected write fails.
simply strace it and you'll see that it writes too many bytes.
...
write(1, "11\n", 3) = -1 EBUSY (Device or
resource busy)
write(1, "1", 1) = 1
...
not that big of a deal. dont write incorrect shell scripts.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found