diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-12 22:17:44 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-12 22:17:44 +0100 |
commit | 3e97eeb408a1107b0ffacc6ba39682428c4598f1 (patch) | |
tree | f6f7df81821d543bef855f961a76b09e79d49855 /coreutils | |
parent | 8cbc300d083001bccac4f33bf61b9dc97f29cb04 (diff) | |
download | busybox-w32-3e97eeb408a1107b0ffacc6ba39682428c4598f1.tar.gz busybox-w32-3e97eeb408a1107b0ffacc6ba39682428c4598f1.tar.bz2 busybox-w32-3e97eeb408a1107b0ffacc6ba39682428c4598f1.zip |
apply post-1.15.2 fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to '')
-rw-r--r-- | coreutils/split.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/coreutils/split.c b/coreutils/split.c index f1ec64be0..55927a491 100644 --- a/coreutils/split.c +++ b/coreutils/split.c | |||
@@ -79,9 +79,13 @@ int split_main(int argc UNUSED_PARAM, char **argv) | |||
79 | 79 | ||
80 | argv += optind; | 80 | argv += optind; |
81 | if (argv[0]) { | 81 | if (argv[0]) { |
82 | int fd; | ||
82 | if (argv[1]) | 83 | if (argv[1]) |
83 | sfx = argv[1]; | 84 | sfx = argv[1]; |
84 | xmove_fd(xopen(argv[0], O_RDONLY), 0); | 85 | fd = open_or_warn_stdin(argv[0]); |
86 | if (fd == -1) | ||
87 | return EXIT_FAILURE; | ||
88 | xmove_fd(fd, STDIN_FILENO); | ||
85 | } else { | 89 | } else { |
86 | argv[0] = (char *) bb_msg_standard_input; | 90 | argv[0] = (char *) bb_msg_standard_input; |
87 | } | 91 | } |