From owner-freebsd-current@FreeBSD.ORG Wed Jan 21 06:56:45 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DC87106566B; Wed, 21 Jan 2009 06:56:45 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 536058FC08; Wed, 21 Jan 2009 06:56:45 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.23] (h-66-166-149-52.snvacaid.covad.net [66.166.149.52]) by kientzle.com (8.12.9/8.12.9) with ESMTP id n0L6uiC1076450; Tue, 20 Jan 2009 22:56:44 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <4976C72A.50505@freebsd.org> Date: Tue, 20 Jan 2009 22:56:42 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Giorgos Keramidas References: <87skndg0cv.fsf@kobe.laptop> <497641FC.30209@gmx.de> <87d4eh8wj3.fsf@kobe.laptop> In-Reply-To: <87d4eh8wj3.fsf@kobe.laptop> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Christoph Mallon , freebsd-current@freebsd.org Subject: Re: [PATCH] bsdcpio core dump X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 06:56:46 -0000 Please try r187521, which should fix the core dump. I'll look at the error message more closely tomorrow. Cheers, Tim Giorgos Keramidas wrote: > On Tue, 20 Jan 2009 22:28:28 +0100, Christoph Mallon wrote: > >>Giorgos Keramidas schrieb: >> >>>diff -r cb9a95f8dfb3 usr.bin/cpio/cpio.c >>>--- a/usr.bin/cpio/cpio.c Tue Jan 20 21:45:52 2009 +0200 >>>+++ b/usr.bin/cpio/cpio.c Tue Jan 20 22:56:48 2009 +0200 >>>@@ -623,12 +623,12 @@ >>> r = archive_write_header(cpio->archive, entry); >>> if (r != ARCHIVE_OK) >>>- cpio_warnc(archive_errno(cpio->archive), >>>+ cpio_warnc(0, >>> "%s: %s", >>>- destpath, >>>+ srcpath, >>> archive_error_string(cpio->archive)); >> >>Wouldn't it be better to remove the manually appended error string, >>i.e. ": %s" ... archive_error_string(), instead of circumventing the >>generic error reporting magic provided by cpio_warnc()? > > > That's probably better. It's why I split the patch in two parts, so > Tim can review them separately and pick whatever is nicer :) > > It might be better to use: > > cpio_warnc(archive_errno(cpio->archive), > "%s", srcpath); > > >