Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jan 2009 22:56:42 -0800
From:      Tim Kientzle <kientzle@freebsd.org>
To:        Giorgos Keramidas <keramida@freebsd.org>
Cc:        Christoph Mallon <christoph.mallon@gmx.de>, freebsd-current@freebsd.org
Subject:   Re: [PATCH] bsdcpio core dump
Message-ID:  <4976C72A.50505@freebsd.org>
In-Reply-To: <87d4eh8wj3.fsf@kobe.laptop>
References:  <87skndg0cv.fsf@kobe.laptop> <497641FC.30209@gmx.de> <87d4eh8wj3.fsf@kobe.laptop>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <christoph.mallon@gmx.de> 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);
> 
> 
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4976C72A.50505>