summaryrefslogtreecommitdiffstats
path: root/contrib/file/is_tar.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2009-01-02 03:10:55 +0000
committerobrien <obrien@FreeBSD.org>2009-01-02 03:10:55 +0000
commit729acffa050ba99227c27884a5760fdd3d6959b2 (patch)
treed5289d633f1b84fbbf947f98b34ff58109fccca7 /contrib/file/is_tar.c
parent964611a3050b11c026667dbb4ae98380fe18252a (diff)
parent05dd1f1bd993ec12015e6782ea5c46b6a0b69ecb (diff)
downloadFreeBSD-src-729acffa050ba99227c27884a5760fdd3d6959b2.zip
FreeBSD-src-729acffa050ba99227c27884a5760fdd3d6959b2.tar.gz
Record that base/vendor/file/dist@186675 was merged.
Merge base/vendor/file/dist@186675@186690, bringing FILE 4.26 to 8-CURRENT.
Diffstat (limited to 'contrib/file/is_tar.c')
-rw-r--r--contrib/file/is_tar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/file/is_tar.c b/contrib/file/is_tar.c
index 142b487..a931111 100644
--- a/contrib/file/is_tar.c
+++ b/contrib/file/is_tar.c
@@ -45,7 +45,7 @@
#include "tar.h"
#ifndef lint
-FILE_RCSID("@(#)$File: is_tar.c,v 1.29 2007/10/17 19:33:31 christos Exp $")
+FILE_RCSID("@(#)$File: is_tar.c,v 1.31 2008/02/04 20:51:17 christos Exp $")
#endif
#define isodigit(c) ( ((c) >= '0') && ((c) <= '7') )
@@ -53,7 +53,7 @@ FILE_RCSID("@(#)$File: is_tar.c,v 1.29 2007/10/17 19:33:31 christos Exp $")
private int is_tar(const unsigned char *, size_t);
private int from_oct(int, const char *); /* Decode octal number */
-static const char *tartype[] = {
+static const char tartype[][32] = {
"tar archive",
"POSIX tar archive",
"POSIX tar archive (GNU)",
@@ -85,7 +85,8 @@ file_is_tar(struct magic_set *ms, const unsigned char *buf, size_t nbytes)
* Return
* 0 if the checksum is bad (i.e., probably not a tar archive),
* 1 for old UNIX tar file,
- * 2 for Unix Std (POSIX) tar file.
+ * 2 for Unix Std (POSIX) tar file,
+ * 3 for GNU tar file.
*/
private int
is_tar(const unsigned char *buf, size_t nbytes)
OpenPOWER on IntegriCloud