From owner-cvs-src@FreeBSD.ORG Sat Apr 14 22:34:11 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 626B616A406; Sat, 14 Apr 2007 22:34:11 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 52F1D13C458; Sat, 14 Apr 2007 22:34:11 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l3EMYBX2003429; Sat, 14 Apr 2007 22:34:11 GMT (envelope-from kientzle@repoman.freebsd.org) Received: (from kientzle@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l3EMYAcb003428; Sat, 14 Apr 2007 22:34:10 GMT (envelope-from kientzle) Message-Id: <200704142234.l3EMYAcb003428@repoman.freebsd.org> From: Tim Kientzle Date: Sat, 14 Apr 2007 22:34:10 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libarchive Makefile archive.h.in archive_read_support_format_ar.c archive_write_set_format_ar.c archive_write_set_format_by_name.c src/lib/libarchive/test test_read_format_ar.c test_write_format_ar.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Apr 2007 22:34:11 -0000 kientzle 2007-04-14 22:34:10 UTC FreeBSD src repository Modified files: lib/libarchive Makefile archive.h.in archive_read_support_format_ar.c archive_write_set_format_ar.c archive_write_set_format_by_name.c lib/libarchive/test test_read_format_ar.c test_write_format_ar.c Log: Overhaul of 'ar' support: * use "AR_GNU" as the format name instead of AR_SVR4 (it's what everyone is going to call it anyway) * Simplify numeric parsing to unsigned (none of the numeric values should ever be negative); don't run off end of numeric fields. * Finish parsing the common header fields before the next I/O request (which might dump the contents) * Be smarter about format guessing and trimming filenames. * Most of the magic values are only used in one place, so just inline them. * Many more comments. * Be smarter about handling damaged entries; return something reasonable. * Call it a "filename table" instead of a "string table" * Update tests. Enable selection of 'ar', 'arbsd', and 'argnu' formats by name (this allows bsdtar to create ar format archives). The 'ar' writer still needs some work; it should reject entries that aren't regular files and should probably also strip leading paths from filenames. Revision Changes Path 1.69 +1 -0 src/lib/libarchive/Makefile 1.42 +1 -1 src/lib/libarchive/archive.h.in 1.4 +206 -216 src/lib/libarchive/archive_read_support_format_ar.c 1.2 +2 -2 src/lib/libarchive/archive_write_set_format_ar.c 1.6 +4 -0 src/lib/libarchive/archive_write_set_format_by_name.c 1.2 +16 -5 src/lib/libarchive/test/test_read_format_ar.c 1.2 +5 -4 src/lib/libarchive/test/test_write_format_ar.c