* ground up. It still has remnents of the old code lying about, but it is
* very different now (i.e., cleaner, less global variables, etc.)
*
- * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
- * Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org>
+ * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org>
*
* Based in part in the tar implementation in sash
* Copyright (c) 1999 by David I. Bell
while (1) {
char buf;
- int n = read(gzipStatusPipe[0], &buf, 1);
+ int n = bb_full_read(gzipStatusPipe[0], &buf, 1);
if (n == 0 && vfork_exec_errno != 0) {
errno = vfork_exec_errno;
}
if(opt & TAR_OPT_VERBOSE) {
if ((tar_handle->action_header == header_list) ||
- (tar_handle->action_header == header_verbose_list)) {
+ (tar_handle->action_header == header_verbose_list))
+ {
tar_handle->action_header = header_verbose_list;
} else {
tar_handle->action_header = header_list;
}
#endif
#ifdef CONFIG_FEATURE_TAR_BZIP2
- if(opt & TAR_OPT_GZIP) {
+ if(opt & TAR_OPT_BZIP2) {
get_header_ptr = get_header_tar_bz2;
}
#endif
gzipFlag = TRUE;
}
# endif /* CONFIG_FEATURE_TAR_GZIP */
+# ifdef CONFIG_FEATURE_TAR_BZIP2
+ if (get_header_ptr == get_header_tar_bz2) {
+ bb_error_msg_and_die("Creating bzip2 compressed archives is not currently supported.");
+ }
+# endif /* CONFIG_FEATURE_TAR_BZIP2 */
- if (tar_handle->action_header == header_verbose_list) {
+ if ((tar_handle->action_header == header_list) ||
+ (tar_handle->action_header == header_verbose_list)) {
verboseFlag = TRUE;
}
writeTarFile(tar_filename, verboseFlag, tar_handle->accept,