summaryrefslogtreecommitdiff
path: root/archival/tar.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-10-10 04:20:21 +0000
committerEric Andersen <andersen@codepoet.org>2002-10-10 04:20:21 +0000
commit71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f (patch)
tree802990cf39a805f253b9d32f3888a7c749babd01 /archival/tar.c
parentfdfe298a966da0e6eecdc355efd640acf73c00e5 (diff)
downloadbusybox-w32-71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f.tar.gz
busybox-w32-71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f.tar.bz2
busybox-w32-71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f.zip
last_patch61 from vodz:
New complex patch for decrease size devel version. Requires previous patch. Also removed small problems from dutmp and tar applets. Also includes vodz' last_patch61_2: Last patch correcting comment for #endif and more integrated with libbb (very reduce size if used "cat" applet also). Requires last_patch61 for modutils/config.in.
Diffstat (limited to 'archival/tar.c')
-rw-r--r--archival/tar.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/archival/tar.c b/archival/tar.c
index e6c134e3b..dba6bbcc4 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -302,7 +302,7 @@ static inline int writeTarHeader(struct TarBallInfo *tbInfo,
302 if ((size = 302 if ((size =
303 full_write(tbInfo->tarFd, (char *) &header, 303 full_write(tbInfo->tarFd, (char *) &header,
304 sizeof(struct TarHeader))) < 0) { 304 sizeof(struct TarHeader))) < 0) {
305 error_msg(io_error, real_name, strerror(errno)); 305 error_msg(io_error, real_name);
306 return (FALSE); 306 return (FALSE);
307 } 307 }
308 /* Pad the header up to the tar block size */ 308 /* Pad the header up to the tar block size */
@@ -426,7 +426,7 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf,
426 426
427 /* open the file we want to archive, and make sure all is well */ 427 /* open the file we want to archive, and make sure all is well */
428 if ((inputFileFd = open(fileName, O_RDONLY)) < 0) { 428 if ((inputFileFd = open(fileName, O_RDONLY)) < 0) {
429 error_msg("%s: Cannot open: %s", fileName, strerror(errno)); 429 perror_msg("%s: Cannot open", fileName);
430 return (FALSE); 430 return (FALSE);
431 } 431 }
432 432
@@ -434,13 +434,13 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf,
434 while ((size = full_read(inputFileFd, buffer, sizeof(buffer))) > 0) { 434 while ((size = full_read(inputFileFd, buffer, sizeof(buffer))) > 0) {
435 if (full_write(tbInfo->tarFd, buffer, size) != size) { 435 if (full_write(tbInfo->tarFd, buffer, size) != size) {
436 /* Output file seems to have a problem */ 436 /* Output file seems to have a problem */
437 error_msg(io_error, fileName, strerror(errno)); 437 error_msg(io_error, fileName);
438 return (FALSE); 438 return (FALSE);
439 } 439 }
440 readSize += size; 440 readSize += size;
441 } 441 }
442 if (size == -1) { 442 if (size == -1) {
443 error_msg(io_error, fileName, strerror(errno)); 443 error_msg(io_error, fileName);
444 return (FALSE); 444 return (FALSE);
445 } 445 }
446 /* Pad the file up to the tar block size */ 446 /* Pad the file up to the tar block size */
@@ -483,7 +483,7 @@ static inline int writeTarFile(const char *tarName, const int verboseFlag,
483 } 483 }
484 484
485 if (tbInfo.tarFd < 0) { 485 if (tbInfo.tarFd < 0) {
486 perror_msg("Error opening '%s'", tarName); 486 perror_msg("%s: Cannot open", tarName);
487 freeHardLinkInfo(&tbInfo.hlInfoHead); 487 freeHardLinkInfo(&tbInfo.hlInfoHead);
488 return (FALSE); 488 return (FALSE);
489 } 489 }
@@ -491,7 +491,7 @@ static inline int writeTarFile(const char *tarName, const int verboseFlag,
491 /* Store the stat info for the tarball's file, so 491 /* Store the stat info for the tarball's file, so
492 * can avoid including the tarball into itself.... */ 492 * can avoid including the tarball into itself.... */
493 if (fstat(tbInfo.tarFd, &tbInfo.statBuf) < 0) 493 if (fstat(tbInfo.tarFd, &tbInfo.statBuf) < 0)
494 error_msg_and_die(io_error, tarName, strerror(errno)); 494 error_msg_and_die(io_error, tarName);
495 495
496#ifdef CONFIG_FEATURE_TAR_GZIP 496#ifdef CONFIG_FEATURE_TAR_GZIP
497 if (gzip) { 497 if (gzip) {