diff options
author | Bernhard Reutner-Fischer | 2006-05-27 09:36:43 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2006-05-27 09:36:43 +0000 |
commit | 95a040fac831a5b8c2297328ec0b3ada4024ee7a (patch) | |
tree | 20e06d7e76a02600a77fba6d92c24a645cf1944c /findutils | |
parent | 8bb50782a5f0dd955a6fe18d381eb9322d1447e7 (diff) | |
download | busybox-95a040fac831a5b8c2297328ec0b3ada4024ee7a.zip busybox-95a040fac831a5b8c2297328ec0b3ada4024ee7a.tar.gz |
- use the defines CURRENT_TTY and VC_1; also shrink xargs a tiny bit:
add/remove: 0/0 grow/shrink: 2/6 up/down: 5/-37 (-32)
function old new delta
static.add_interface 271 274 +3
static.glob3 36 38 +2
static.renice_main 409 408 -1
static.readcmd 1083 1081 -2
static.changepath 176 174 -2
static.parse_opts 56 51 -5
static.rx_main 1095 1088 -7
static.xargs_main 759 739 -20
----------------------------------------------------------------
Result :-) -32
Diffstat (limited to 'findutils')
-rw-r--r-- | findutils/xargs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/findutils/xargs.c b/findutils/xargs.c index 5a5e1c6..ec6d99c 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c @@ -311,9 +311,7 @@ static int xargs_ask_confirmation(void) int c, savec; if (!tty_stream) { - tty_stream = fopen("/dev/tty", "r"); - if (!tty_stream) - bb_perror_msg_and_die("/dev/tty"); + tty_stream = bb_xfopen(CURRENT_TTY, "r"); /* pranoidal security by vodz */ fcntl(fileno(tty_stream), F_SETFD, FD_CLOEXEC); } |