diff options
author | Eric Andersen | 2002-10-10 04:20:21 +0000 |
---|---|---|
committer | Eric Andersen | 2002-10-10 04:20:21 +0000 |
commit | 71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f (patch) | |
tree | 802990cf39a805f253b9d32f3888a7c749babd01 /archival | |
parent | fdfe298a966da0e6eecdc355efd640acf73c00e5 (diff) | |
download | busybox-71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f.zip busybox-71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f.tar.gz |
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')
-rw-r--r-- | archival/libunarchive/data_extract_all.c | 2 | ||||
-rw-r--r-- | archival/tar.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c index 39af2e3..f839be3 100644 --- a/archival/libunarchive/data_extract_all.c +++ b/archival/libunarchive/data_extract_all.c @@ -16,7 +16,7 @@ extern void data_extract_all(archive_handle_t *archive_handle) int res; if (archive_handle->flags & ARCHIVE_CREATE_LEADING_DIRS) { - char *name = strdup(file_header->name); + char *name = xstrdup(file_header->name); make_directory (dirname(name), 0777, FILEUTILS_RECUR); free(name); } diff --git a/archival/tar.c b/archival/tar.c index e6c134e..dba6bbc 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -302,7 +302,7 @@ static inline int writeTarHeader(struct TarBallInfo *tbInfo, if ((size = full_write(tbInfo->tarFd, (char *) &header, sizeof(struct TarHeader))) < 0) { - error_msg(io_error, real_name, strerror(errno)); + error_msg(io_error, real_name); return (FALSE); } /* Pad the header up to the tar block size */ @@ -426,7 +426,7 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf, /* open the file we want to archive, and make sure all is well */ if ((inputFileFd = open(fileName, O_RDONLY)) < 0) { - error_msg("%s: Cannot open: %s", fileName, strerror(errno)); + perror_msg("%s: Cannot open", fileName); return (FALSE); } @@ -434,13 +434,13 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf, while ((size = full_read(inputFileFd, buffer, sizeof(buffer))) > 0) { if (full_write(tbInfo->tarFd, buffer, size) != size) { /* Output file seems to have a problem */ - error_msg(io_error, fileName, strerror(errno)); + error_msg(io_error, fileName); return (FALSE); } readSize += size; } if (size == -1) { - error_msg(io_error, fileName, strerror(errno)); + error_msg(io_error, fileName); return (FALSE); } /* Pad the file up to the tar block size */ @@ -483,7 +483,7 @@ static inline int writeTarFile(const char *tarName, const int verboseFlag, } if (tbInfo.tarFd < 0) { - perror_msg("Error opening '%s'", tarName); + perror_msg("%s: Cannot open", tarName); freeHardLinkInfo(&tbInfo.hlInfoHead); return (FALSE); } @@ -491,7 +491,7 @@ static inline int writeTarFile(const char *tarName, const int verboseFlag, /* Store the stat info for the tarball's file, so * can avoid including the tarball into itself.... */ if (fstat(tbInfo.tarFd, &tbInfo.statBuf) < 0) - error_msg_and_die(io_error, tarName, strerror(errno)); + error_msg_and_die(io_error, tarName); #ifdef CONFIG_FEATURE_TAR_GZIP if (gzip) { |