aboutsummaryrefslogtreecommitdiff
path: root/archival/ar.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-09-22 03:36:27 +0000
committerMatt Kraai <kraai@debian.org>2000-09-22 03:36:27 +0000
commitd995493987065846ab8cc7360879e0841826b068 (patch)
treeaadcda8d0b7e84696d6422ae502044419953d8c6 /archival/ar.c
parenta2f2a8f8c0c2c9881f9548c045c19b2b5fb11b5d (diff)
downloadbusybox-w32-d995493987065846ab8cc7360879e0841826b068.tar.gz
busybox-w32-d995493987065846ab8cc7360879e0841826b068.tar.bz2
busybox-w32-d995493987065846ab8cc7360879e0841826b068.zip
Clean up error messages.
Diffstat (limited to 'archival/ar.c')
-rw-r--r--archival/ar.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/archival/ar.c b/archival/ar.c
index 241c1fac2..59c3a7754 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -21,7 +21,7 @@
21 * along with this program; if not, write to the Free Software 21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 * 23 *
24 * Last modified 9 September 2000 24 * Last modified 20 September 2000
25 */ 25 */
26#include <stdio.h> 26#include <stdio.h>
27#include <string.h> 27#include <string.h>
@@ -158,7 +158,7 @@ static int checkArMagic(int srcFd)
158 158
159 headerStart = lseek(srcFd, 0, SEEK_CUR); 159 headerStart = lseek(srcFd, 0, SEEK_CUR);
160 if (fullRead(srcFd, arMagic, 8) != 8) { 160 if (fullRead(srcFd, arMagic, 8) != 8) {
161 printf("fatal error/n"); 161 errorMsg("fatal error\n");
162 return (FALSE); 162 return (FALSE);
163 } 163 }
164 lseek(srcFd, headerStart, SEEK_SET); 164 lseek(srcFd, headerStart, SEEK_SET);
@@ -338,16 +338,13 @@ extern int ar_main(int argc, char **argv)
338 } 338 }
339 } 339 }
340 340
341 /* check the src filename was specified */ 341 /* check the src filename was specified */
342 if (optind == argc) { 342 if (optind == argc)
343 usage(ar_usage); 343 usage(ar_usage);
344 return(FALSE);
345 }
346 344
347 if ( (srcFd = open(argv[optind], O_RDONLY)) < 0) { 345 if ( (srcFd = open(argv[optind], O_RDONLY)) < 0)
348 errorMsg("Cannot read %s\n", optarg); 346 fatalError("Cannot read %s\n", argv[optind]);
349 return (FALSE); 347
350 }
351 optind++; 348 optind++;
352 entry = (headerL_t *) xmalloc(sizeof(headerL_t)); 349 entry = (headerL_t *) xmalloc(sizeof(headerL_t));
353 header = (headerL_t *) xmalloc(sizeof(headerL_t)); 350 header = (headerL_t *) xmalloc(sizeof(headerL_t));