aboutsummaryrefslogtreecommitdiff
path: root/coreutils/dd.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-08-03 15:41:12 +0000
committerRob Landley <rob@landley.net>2006-08-03 15:41:12 +0000
commitd921b2ecc0d294ad4bf8c7458fc52a60c28727d2 (patch)
treee4a2769349867c441cf2983d83097bb66701a733 /coreutils/dd.c
parent6dce0b6fa79f2d4bb7e9d90e1fbc0f6beb25f855 (diff)
downloadbusybox-w32-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.tar.gz
busybox-w32-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.tar.bz2
busybox-w32-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.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.)
Diffstat (limited to 'coreutils/dd.c')
-rw-r--r--coreutils/dd.c12
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
21static const struct suffix_mult dd_suffixes[] = { 13static 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) {