summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/archive_write_set_format_pax.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2008-03-15 11:04:45 +0000
committerkientzle <kientzle@FreeBSD.org>2008-03-15 11:04:45 +0000
commitc7c16fc8e2290dbc1ecf74bf5a5b22c219104a4b (patch)
tree7be5eb8b35baa3907c7b49e38c58aafb5bc3c194 /lib/libarchive/archive_write_set_format_pax.c
parent7ff9ac24d8fa720bddbe14c01be346f6a72b047c (diff)
downloadFreeBSD-src-c7c16fc8e2290dbc1ecf74bf5a5b22c219104a4b.zip
FreeBSD-src-c7c16fc8e2290dbc1ecf74bf5a5b22c219104a4b.tar.gz
Remove the duplicate "archive_format" and "archive_format_name" fields
from the private archive_write structure and fix up all writers to use the format fields in the base "archive" structure. This error made it impossible to query the format after setting up a writer because the write format was stored in an inaccessible place.
Diffstat (limited to 'lib/libarchive/archive_write_set_format_pax.c')
-rw-r--r--lib/libarchive/archive_write_set_format_pax.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libarchive/archive_write_set_format_pax.c b/lib/libarchive/archive_write_set_format_pax.c
index 3004e76..6f05a99 100644
--- a/lib/libarchive/archive_write_set_format_pax.c
+++ b/lib/libarchive/archive_write_set_format_pax.c
@@ -85,8 +85,8 @@ archive_write_set_format_pax_restricted(struct archive *_a)
struct archive_write *a = (struct archive_write *)_a;
int r;
r = archive_write_set_format_pax(&a->archive);
- a->archive_format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
- a->archive_format_name = "restricted POSIX pax interchange";
+ a->archive.archive_format = ARCHIVE_FORMAT_TAR_PAX_RESTRICTED;
+ a->archive.archive_format_name = "restricted POSIX pax interchange";
return (r);
}
@@ -116,8 +116,8 @@ archive_write_set_format_pax(struct archive *_a)
a->format_finish = archive_write_pax_finish;
a->format_destroy = archive_write_pax_destroy;
a->format_finish_entry = archive_write_pax_finish_entry;
- a->archive_format = ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE;
- a->archive_format_name = "POSIX pax interchange";
+ a->archive.archive_format = ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE;
+ a->archive.archive_format_name = "POSIX pax interchange";
return (ARCHIVE_OK);
}
@@ -701,7 +701,7 @@ archive_write_pax_header(struct archive_write *a,
* already set (we're already generating an extended header, so
* may as well include these).
*/
- if (a->archive_format != ARCHIVE_FORMAT_TAR_PAX_RESTRICTED ||
+ if (a->archive.archive_format != ARCHIVE_FORMAT_TAR_PAX_RESTRICTED ||
need_extension) {
if (archive_entry_mtime(entry_main) < 0 ||
@@ -764,7 +764,7 @@ archive_write_pax_header(struct archive_write *a,
* Pax-restricted does not store data for hardlinks, in order
* to improve compatibility with ustar.
*/
- if (a->archive_format != ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE &&
+ if (a->archive.archive_format != ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE &&
hardlink != NULL)
archive_entry_set_size(entry_main, 0);
OpenPOWER on IntegriCloud