diff options
author | Matt Kraai <kraai@debian.org> | 2000-10-25 15:10:08 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2000-10-25 15:10:08 +0000 |
commit | 324a778f31ac99f2c9d947a99dc4c37902bde6fe (patch) | |
tree | 137420d5835bb40bc9712e895da5377c664bd4b3 /coreutils | |
parent | b60208dd8fe3328a5db8be1dc958e62c9898a73b (diff) | |
download | busybox-w32-324a778f31ac99f2c9d947a99dc4c37902bde6fe.tar.gz busybox-w32-324a778f31ac99f2c9d947a99dc4c37902bde6fe.tar.bz2 busybox-w32-324a778f31ac99f2c9d947a99dc4c37902bde6fe.zip |
Added a fatalPerror function to simplify error handling.
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/dd.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c index 1002c0771..6868a913e 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
@@ -116,8 +116,7 @@ extern int dd_main(int argc, char **argv) | |||
116 | * here anyways... */ | 116 | * here anyways... */ |
117 | 117 | ||
118 | /* free(buf); */ | 118 | /* free(buf); */ |
119 | perror(inFile); | 119 | fatalPerror("%s", inFile); |
120 | exit(FALSE); | ||
121 | } | 120 | } |
122 | 121 | ||
123 | if (outFile == NULL) | 122 | if (outFile == NULL) |
@@ -132,8 +131,7 @@ extern int dd_main(int argc, char **argv) | |||
132 | 131 | ||
133 | /* close(inFd); | 132 | /* close(inFd); |
134 | free(buf); */ | 133 | free(buf); */ |
135 | perror(outFile); | 134 | fatalPerror("%s", outFile); |
136 | exit(FALSE); | ||
137 | } | 135 | } |
138 | 136 | ||
139 | lseek(inFd, (off_t) (skipBlocks * blockSize), SEEK_SET); | 137 | lseek(inFd, (off_t) (skipBlocks * blockSize), SEEK_SET); |