From 324a778f31ac99f2c9d947a99dc4c37902bde6fe Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Wed, 25 Oct 2000 15:10:08 +0000 Subject: Added a fatalPerror function to simplify error handling. --- coreutils/dd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'coreutils') 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) * here anyways... */ /* free(buf); */ - perror(inFile); - exit(FALSE); + fatalPerror("%s", inFile); } if (outFile == NULL) @@ -132,8 +131,7 @@ extern int dd_main(int argc, char **argv) /* close(inFd); free(buf); */ - perror(outFile); - exit(FALSE); + fatalPerror("%s", outFile); } lseek(inFd, (off_t) (skipBlocks * blockSize), SEEK_SET); -- cgit v1.2.3