From owner-svn-src-all@FreeBSD.ORG Sat Jun 20 06:02:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6198106564A; Sat, 20 Jun 2009 06:02:21 +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 A41D18FC14; Sat, 20 Jun 2009 06:02:21 +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 n5K62Lt6066198; Sat, 20 Jun 2009 06:02:21 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5K62Lfl066196; Sat, 20 Jun 2009 06:02:21 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200906200602.n5K62Lfl066196@svn.freebsd.org> From: Tim Kientzle Date: Sat, 20 Jun 2009 06:02:21 +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: r194525 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jun 2009 06:02:22 -0000 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;