diff options
author | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-08-03 15:41:12 +0000 |
---|---|---|
committer | landley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-08-03 15:41:12 +0000 |
commit | 5e2a5391f9142bca773aab4c829615895b69a6b7 (patch) | |
tree | e4a2769349867c441cf2983d83097bb66701a733 /coreutils/dd.c | |
parent | e883e03918a0e26e390ea23996abdb8fc1925f88 (diff) | |
download | busybox-w32-5e2a5391f9142bca773aab4c829615895b69a6b7.tar.gz busybox-w32-5e2a5391f9142bca773aab4c829615895b69a6b7.tar.bz2 busybox-w32-5e2a5391f9142bca773aab4c829615895b69a6b7.zip |
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
git-svn-id: svn://busybox.net/trunk/busybox@15767 69ca8d6d-28ef-0310-b511-8ec308f3f277
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) { |