summaryrefslogtreecommitdiff
path: root/dd.c
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2000-12-07 19:56:48 +0000
committerMark Whitley <markw@lineo.com>2000-12-07 19:56:48 +0000
commitf57c944e09417edcbcd69f2b01b937cadef39db2 (patch)
treea55822621d54bd82c54e272fa986e45698fea0f1 /dd.c
parent7b5c16ebe5f1b057603cf1c0b0187be418725c42 (diff)
downloadbusybox-w32-f57c944e09417edcbcd69f2b01b937cadef39db2.tar.gz
busybox-w32-f57c944e09417edcbcd69f2b01b937cadef39db2.tar.bz2
busybox-w32-f57c944e09417edcbcd69f2b01b937cadef39db2.zip
Changed names of functions in utility.c and all affected files, to make
compliant with the style guide. Everybody rebuild your tags file!
Diffstat (limited to 'dd.c')
-rw-r--r--dd.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/dd.c b/dd.c
index 044f167c3..626b54898 100644
--- a/dd.c
+++ b/dd.c
@@ -71,28 +71,28 @@ extern int dd_main(int argc, char **argv)
71 else if (outFile == NULL && (strncmp(*argv, "of", 2) == 0)) 71 else if (outFile == NULL && (strncmp(*argv, "of", 2) == 0))
72 outFile = ((strchr(*argv, '=')) + 1); 72 outFile = ((strchr(*argv, '=')) + 1);
73 else if (strncmp("count", *argv, 5) == 0) { 73 else if (strncmp("count", *argv, 5) == 0) {
74 count = getNum((strchr(*argv, '=')) + 1); 74 count = atoi_w_units((strchr(*argv, '=')) + 1);
75 if (count < 0) { 75 if (count < 0) {
76 errorMsg("Bad count value %s\n", *argv); 76 error_msg("Bad count value %s\n", *argv);
77 goto usage; 77 goto usage;
78 } 78 }
79 } else if (strncmp(*argv, "bs", 2) == 0) { 79 } else if (strncmp(*argv, "bs", 2) == 0) {
80 blockSize = getNum((strchr(*argv, '=')) + 1); 80 blockSize = atoi_w_units((strchr(*argv, '=')) + 1);
81 if (blockSize <= 0) { 81 if (blockSize <= 0) {
82 errorMsg("Bad block size value %s\n", *argv); 82 error_msg("Bad block size value %s\n", *argv);
83 goto usage; 83 goto usage;
84 } 84 }
85 } else if (strncmp(*argv, "skip", 4) == 0) { 85 } else if (strncmp(*argv, "skip", 4) == 0) {
86 skipBlocks = getNum((strchr(*argv, '=')) + 1); 86 skipBlocks = atoi_w_units((strchr(*argv, '=')) + 1);
87 if (skipBlocks <= 0) { 87 if (skipBlocks <= 0) {
88 errorMsg("Bad skip value %s\n", *argv); 88 error_msg("Bad skip value %s\n", *argv);
89 goto usage; 89 goto usage;
90 } 90 }
91 91
92 } else if (strncmp(*argv, "seek", 4) == 0) { 92 } else if (strncmp(*argv, "seek", 4) == 0) {
93 seekBlocks = getNum((strchr(*argv, '=')) + 1); 93 seekBlocks = atoi_w_units((strchr(*argv, '=')) + 1);
94 if (seekBlocks <= 0) { 94 if (seekBlocks <= 0) {
95 errorMsg("Bad seek value %s\n", *argv); 95 error_msg("Bad seek value %s\n", *argv);
96 goto usage; 96 goto usage;
97 } 97 }
98 } else if (strncmp(*argv, "conv", 4) == 0) { 98 } else if (strncmp(*argv, "conv", 4) == 0) {
@@ -119,7 +119,7 @@ extern int dd_main(int argc, char **argv)
119 * here anyways... */ 119 * here anyways... */
120 120
121 /* free(buf); */ 121 /* free(buf); */
122 fatalPerror("%s", inFile); 122 perror_msg_and_die("%s", inFile);
123 } 123 }
124 124
125 if (outFile == NULL) 125 if (outFile == NULL)
@@ -134,7 +134,7 @@ extern int dd_main(int argc, char **argv)
134 134
135 /* close(inFd); 135 /* close(inFd);
136 free(buf); */ 136 free(buf); */
137 fatalPerror("%s", outFile); 137 perror_msg_and_die("%s", outFile);
138 } 138 }
139 139
140 lseek(inFd, (off_t) (skipBlocks * blockSize), SEEK_SET); 140 lseek(inFd, (off_t) (skipBlocks * blockSize), SEEK_SET);
@@ -146,13 +146,13 @@ extern int dd_main(int argc, char **argv)
146 ibs=BUFSIZ; 146 ibs=BUFSIZ;
147 147
148 while (totalSize > outTotal) { 148 while (totalSize > outTotal) {
149 inCc = fullRead(inFd, buf, ibs); 149 inCc = full_read(inFd, buf, ibs);
150 inTotal += inCc; 150 inTotal += inCc;
151 if ( (sync==TRUE) && (inCc>0) ) 151 if ( (sync==TRUE) && (inCc>0) )
152 while (inCc<ibs) 152 while (inCc<ibs)
153 buf[inCc++]='\0'; 153 buf[inCc++]='\0';
154 154
155 if ((outCc = fullWrite(outFd, buf, inCc)) < 1){ 155 if ((outCc = full_write(outFd, buf, inCc)) < 1){
156 if (outCc < 0 ){ 156 if (outCc < 0 ){
157 perror("Error during write"); 157 perror("Error during write");
158 } 158 }