diff options
Diffstat (limited to 'coreutils/dd.c')
-rw-r--r-- | coreutils/dd.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c index 3d6f7cd2d..052cd2902 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
@@ -8,14 +8,6 @@ | |||
8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <sys/types.h> | ||
12 | #include <sys/stat.h> | ||
13 | #include <stdlib.h> | ||
14 | #include <stdio.h> | ||
15 | #include <unistd.h> | ||
16 | #include <string.h> | ||
17 | #include <fcntl.h> | ||
18 | #include <signal.h> // For FEATURE_DD_SIGNAL_HANDLING | ||
19 | #include "busybox.h" | 11 | #include "busybox.h" |
20 | 12 | ||
21 | static const struct suffix_mult dd_suffixes[] = { | 13 | static const struct suffix_mult dd_suffixes[] = { |
@@ -110,7 +102,7 @@ int dd_main(int argc, char **argv) | |||
110 | else obuf = ibuf; | 102 | else obuf = ibuf; |
111 | 103 | ||
112 | if (infile != NULL) { | 104 | if (infile != NULL) { |
113 | ifd = bb_xopen(infile, O_RDONLY); | 105 | ifd = xopen(infile, O_RDONLY); |
114 | } else { | 106 | } else { |
115 | ifd = STDIN_FILENO; | 107 | ifd = STDIN_FILENO; |
116 | infile = bb_msg_standard_input; | 108 | infile = bb_msg_standard_input; |
@@ -123,7 +115,7 @@ int dd_main(int argc, char **argv) | |||
123 | oflag |= O_TRUNC; | 115 | oflag |= O_TRUNC; |
124 | } | 116 | } |
125 | 117 | ||
126 | ofd = bb_xopen3(outfile, oflag, 0666); | 118 | ofd = xopen3(outfile, oflag, 0666); |
127 | 119 | ||
128 | if (seek && trunc_flag) { | 120 | if (seek && trunc_flag) { |
129 | if (ftruncate(ofd, seek * obs) < 0) { | 121 | if (ftruncate(ofd, seek * obs) < 0) { |