Date: Sat, 20 Jun 2009 06:02:21 +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: r194525 - head/lib/libarchive Message-ID: <200906200602.n5K62Lfl066196@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kientzle Date: Sat Jun 20 06:02:21 2009 New Revision: 194525 URL: http://svn.freebsd.org/changeset/base/194525 Log: Fix "tar --options=iso9660:joliet" and other uses of format-specific options. Modified: head/lib/libarchive/archive_read.c Modified: head/lib/libarchive/archive_read.c ============================================================================== --- head/lib/libarchive/archive_read.c Sat Jun 20 05:36:53 2009 (r194524) +++ head/lib/libarchive/archive_read.c Sat Jun 20 06:02:21 2009 (r194525) @@ -117,6 +117,7 @@ archive_read_set_format_options(struct a struct archive_read *a; struct archive_format_descriptor *format; char key[64], val[64]; + char *valp; size_t i; int len, r; @@ -135,10 +136,10 @@ archive_read_set_format_options(struct a while ((len = __archive_parse_options(s, format->name, sizeof(key), key, sizeof(val), val)) > 0) { - if (val[0] == '\0') - r = format->options(a, key, NULL); - else - r = format->options(a, key, val); + valp = val[0] == '\0' ? NULL : val; + a->format = format; + r = format->options(a, key, valp); + a->format = NULL; if (r == ARCHIVE_FATAL) return (r); s += len;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906200602.n5K62Lfl066196>