Added a fatalPerror function to simplify error handling.

This commit is contained in:
Matt Kraai
2000-10-25 15:10:08 +00:00
parent b60208dd8f
commit 324a778f31
5 changed files with 23 additions and 8 deletions

View File

@@ -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);