From owner-svn-src-head@FreeBSD.ORG Sat Dec 6 06:50:09 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E49BD1065673; Sat, 6 Dec 2008 06:50:09 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D2FCE8FC0C; Sat, 6 Dec 2008 06:50:09 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB66o94j085968; Sat, 6 Dec 2008 06:50:09 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB66o991085967; Sat, 6 Dec 2008 06:50:09 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200812060650.mB66o991085967@svn.freebsd.org> From: Tim Kientzle Date: Sat, 6 Dec 2008 06:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185680 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2008 06:50:10 -0000 Author: kientzle Date: Sat Dec 6 06:50:09 2008 New Revision: 185680 URL: http://svn.freebsd.org/changeset/base/185680 Log: Conditionalize a bunch of debugging messages; this also eliminates what should be the only remaining stdio dependency. Modified: head/lib/libarchive/archive_read_support_format_iso9660.c Modified: head/lib/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- head/lib/libarchive/archive_read_support_format_iso9660.c Sat Dec 6 06:45:15 2008 (r185679) +++ head/lib/libarchive/archive_read_support_format_iso9660.c Sat Dec 6 06:50:09 2008 (r185680) @@ -224,7 +224,9 @@ static int archive_read_format_iso9660_r static int archive_read_format_iso9660_read_header(struct archive_read *, struct archive_entry *); static const char *build_pathname(struct archive_string *, struct file_info *); +#ifdef DEBUG static void dump_isodirrec(FILE *, const unsigned char *isodirrec); +#endif static time_t time_from_tm(struct tm *); static time_t isodate17(const unsigned char *); static time_t isodate7(const unsigned char *); @@ -558,6 +560,7 @@ parse_file_info(struct iso9660 *iso9660, parse_rockridge(iso9660, file, rr_start, rr_end); } +#ifdef DEBUG /* DEBUGGING: Warn about attributes I don't yet fully support. */ if ((flags & ~0x02) != 0) { fprintf(stderr, "\n ** Unrecognized flag: "); @@ -580,6 +583,7 @@ parse_file_info(struct iso9660 *iso9660, dump_isodirrec(stderr, isodirrec); fprintf(stderr, "\n"); } +#endif return (file); } @@ -854,6 +858,7 @@ parse_rockridge(struct iso9660 *iso9660, default: /* The FALLTHROUGHs above leave us here for * any unsupported extension. */ +#ifdef DEBUG { const unsigned char *t; fprintf(stderr, "\nUnsupported RRIP extension for %s\n", file->name); @@ -862,6 +867,8 @@ parse_rockridge(struct iso9660 *iso9660, fprintf(stderr, " %02x", *t); fprintf(stderr, "\n"); } +#endif + break; } @@ -903,7 +910,7 @@ next_entry_seek(struct archive_read *a, /* CE area precedes actual file data? Ignore it. */ if (file->ce_offset > file->offset) { -fprintf(stderr, " *** Discarding CE data.\n"); + /* fprintf(stderr, " *** Discarding CE data.\n"); */ file->ce_offset = 0; file->ce_size = 0; } @@ -1078,6 +1085,7 @@ build_pathname(struct archive_string *as return (as->s); } +#ifdef DEBUG static void dump_isodirrec(FILE *out, const unsigned char *isodirrec) { @@ -1102,3 +1110,4 @@ dump_isodirrec(FILE *out, const unsigned fprintf(out, " `%.*s'", toi(isodirrec + DR_name_len_offset, DR_name_len_size), isodirrec + DR_name_offset); } +#endif