* Copyright (c) 1999 by David I. Bell
* Permission is granted to use, distribute, or modify this source,
* provided that this copyright notice remains intact.
- * Permission to distribute sash derived code under the GPL has been granted.
+ * Permission to distribute sash derived code under GPL has been granted.
*
* Based in part on the tar implementation from busybox-0.28
* Copyright (C) 1995 Bruce Perens
*
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include <fnmatch.h>
#include "libbb.h"
-#include "unarchive.h"
+#include "archive.h"
/* FIXME: Stop using this non-standard feature */
#ifndef FNM_LEADING_DIR
# define FNM_LEADING_DIR 0
/* Store the stat info for the tarball's file, so
* can avoid including the tarball into itself.... */
- if (fstat(tbInfo.tarFd, &tbInfo.tarFileStatBuf) < 0)
- bb_perror_msg_and_die("can't stat tar file");
+ xfstat(tbInfo.tarFd, &tbInfo.tarFileStatBuf, "can't stat tar file");
#if ENABLE_FEATURE_SEAMLESS_GZ || ENABLE_FEATURE_SEAMLESS_BZ2
if (gzip)
/* Prepend '-' to the first argument if required */
opt_complementary = "--:" // first arg is options
"tt:vv:" // count -t,-v
- "?:" // bail out with usage instead of error return
"X::T::" // cumulative lists
#if ENABLE_FEATURE_TAR_LONG_OPTIONS && ENABLE_FEATURE_TAR_FROM
"\xff::" // cumulative lists for --exclude