summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2008-12-06 06:50:09 +0000
committerkientzle <kientzle@FreeBSD.org>2008-12-06 06:50:09 +0000
commit6a6f3afd427e8715d86d4389bb1174a76ee02aa4 (patch)
tree39ec252204fe4c8d98a9aeb2e161ffb7eee56878 /lib
parente59163f249e40175754ba81c7d87afbe5d1ed3b5 (diff)
downloadFreeBSD-src-6a6f3afd427e8715d86d4389bb1174a76ee02aa4.zip
FreeBSD-src-6a6f3afd427e8715d86d4389bb1174a76ee02aa4.tar.gz
Conditionalize a bunch of debugging messages; this also
eliminates what should be the only remaining stdio dependency.
Diffstat (limited to 'lib')
-rw-r--r--lib/libarchive/archive_read_support_format_iso9660.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libarchive/archive_read_support_format_iso9660.c b/lib/libarchive/archive_read_support_format_iso9660.c
index 0ec55aa..a154408 100644
--- a/lib/libarchive/archive_read_support_format_iso9660.c
+++ b/lib/libarchive/archive_read_support_format_iso9660.c
@@ -224,7 +224,9 @@ static int archive_read_format_iso9660_read_data_skip(struct archive_read *);
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, struct file_info *parent,
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, struct file_info *parent,
dump_isodirrec(stderr, isodirrec);
fprintf(stderr, "\n");
}
+#endif
return (file);
}
@@ -854,6 +858,7 @@ parse_rockridge(struct iso9660 *iso9660, struct file_info *file,
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, struct file_info *file,
fprintf(stderr, " %02x", *t);
fprintf(stderr, "\n");
}
+#endif
+ break;
}
@@ -903,7 +910,7 @@ next_entry_seek(struct archive_read *a, struct iso9660 *iso9660,
/* 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, struct file_info *file)
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 char *isodirrec)
fprintf(out, " `%.*s'",
toi(isodirrec + DR_name_len_offset, DR_name_len_size), isodirrec + DR_name_offset);
}
+#endif
OpenPOWER on IntegriCloud