ioctl_nr is passed signed to the kernel, but many users refer
to ioctl's in unsigned 32 bit notation.
Let's use stroll to set it, to let people specify either
negative numbers or large positive numbers.
Also improve error reporting.
Reported-By: Alex Piliev <ktnr74@motorola.com>
Change-Id: I789434895b70b051d4d5c1a5db566a1925478ef0
- Deal with some signedness issues
- Deal with some size issues
- Deal with NULL pointer issues
- Deal with some -Wunused issues
Change-Id: I1479dd90d690084491bae3475f2c547833519a57
1) Implement documented but unimplemented read-only option.
2) Allow standard input to be used as the <device> by passing
"-". On some devices, opening the device has side effects.
Allowing standard input can prevent this by using a sequence
of something like:
# Open the device on file descriptor 3
exec 3<> /dev/something
ioctl -d - 0 0 <&3
ioctl -d - 1 0 <&3
dd if=myfile >&3
# Close file descriptor 3
exec 3>&-
Change-Id: If17ac3cffa7ccb159051550724b4ce7d8efa5feb
Signed-off-by: Scott Anderson <saa@android.com>