Date: Sat, 6 Dec 2008 06:50:09 +0000 (UTC) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185680 - head/lib/libarchive Message-ID: <200812060650.mB66o991085967@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812060650.mB66o991085967>