diff options
author | Ron Yorston <rmy@pobox.com> | 2018-02-22 11:40:53 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2018-02-22 11:40:53 +0000 |
commit | 4e6d0dc9476e5cf43ff0bc5e66a54d812ddb4225 (patch) | |
tree | 03dfcab70ff58cae77db6a7ad75dfac3203765c7 /arch | |
parent | 1efab55196bea6d93aa26ca2fb1d3d358f16452f (diff) | |
download | busybox-w32-4e6d0dc9476e5cf43ff0bc5e66a54d812ddb4225.tar.gz busybox-w32-4e6d0dc9476e5cf43ff0bc5e66a54d812ddb4225.tar.bz2 busybox-w32-4e6d0dc9476e5cf43ff0bc5e66a54d812ddb4225.zip |
win32: handle /dev/zero and /dev/urandom in open and read functions
Currently /dev/zero is handled as a special case in dd. Add hacks
to the open and read functions in mingw.c to handle the zero and
urandom devices.
- Opening /dev/zero or /dev/urandom actually opens the special
Windows file 'nul' which behaves like /dev/null. This allows
manipulation of the file descriptor with things like seek and
close
- When /dev/zero or /dev/urandom is opened the resulting file
descriptor is stored and used to override the behaviour of read.
- No attempt is made to track duplicated file descriptors, so using
these devices for redirections in the shell isn't going to work
and won't be permitted. (Could be, but won't.)
- Limited control of the special file descriptors is provided by
allowing the internal variables to be changed.
- The numbers from /dev/urandom aren't very random.
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions