<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-1541</id>
	<title>Nabble - Gnu - Cpio</title>
	<updated>2009-12-17T08:12:49Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Gnu---Cpio-f1541.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Gnu---Cpio-f1541.html" />
	<subtitle type="html">Discussions and bug reports for GNU cpio. GNU cpio copies files into or out of a cpio or tar archive. The archive can be another file on the disk, a magnetic tape, or a pipe.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26830567</id>
	<title>Re: cpio causing problem with pkgadd installation.</title>
	<published>2009-12-17T08:12:49Z</published>
	<updated>2009-12-17T08:12:49Z</updated>
	<author>
		<name>Sergey Poznyakoff-2</name>
	</author>
	<content type="html">hichem badsi &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26830567&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;badhichem@...&lt;/a&gt;&amp;gt; ha escrit:
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;when trying to install package using &amp;quot;pkgadd&amp;quot; command &amp;nbsp;i have the
&lt;br&gt;&lt;br&gt;pkgadd is not the part of GNU cpio.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;following error on SunOS 5.10 Generic_118833-17 sun4u sparc
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;SUNW,Sun-Fire-V440:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;cpio: bad magic number/header
&lt;br&gt;&lt;br&gt;That's not GNU cpio. &amp;nbsp;GNU cpio does not issue such diagnostic message.
&lt;br&gt;Please direct your questions to the authors of the cpio program you
&lt;br&gt;use.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Sergey
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cpio-causing-problem-with-pkgadd-installation.-tp26828785p26830567.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26828785</id>
	<title>cpio causing problem with pkgadd installation.</title>
	<published>2009-12-15T03:34:05Z</published>
	<updated>2009-12-15T03:34:05Z</updated>
	<author>
		<name>hichem badsi</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;hello,&lt;br&gt;when trying to install package using &amp;quot;pkgadd&amp;quot; command  i have the following error on SunOS 5.10 Generic_118833-17 sun4u sparc SUNW,Sun-Fire-V440:&lt;br&gt;&lt;br&gt;&lt;b&gt;&lt;br&gt;cpio&lt;/b&gt;: bad magic number/header&lt;br&gt;
1 errors&lt;br&gt;pkgadd: ERROR: attempt to process datastream failed&lt;br&gt;- process &amp;lt;/usr/bin/&lt;b&gt;cpio&lt;/b&gt; -icdumD -C 512&amp;gt; failed exit code 1&lt;br&gt;pkgadd: ERROR: unable to unpack datastream&lt;br&gt;&lt;br&gt;&lt;br&gt;please can you explain me the meaning of this probleme and how can i solve it !&lt;br&gt;
&lt;br&gt;THANK YOU.&lt;br&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cpio-causing-problem-with-pkgadd-installation.-tp26828785p26828785.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26736913</id>
	<title>GNU cpio unable to write to rmt tape</title>
	<published>2009-12-10T14:51:07Z</published>
	<updated>2009-12-10T14:51:07Z</updated>
	<author>
		<name>Bruce McDaniel-2</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 3.2//EN&quot;&gt;
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;META NAME=&quot;Generator&quot; CONTENT=&quot;MS Exchange Server version 6.5.7654.12&quot;&gt;
&lt;TITLE&gt;GNU cpio unable to write to rmt tape&lt;/TITLE&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;!-- Converted from text/rtf format --&gt;

&lt;P&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;I get this error Immediately when I try to write to the /dev/rmt0 tape. &lt;/FONT&gt;

&lt;BR&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;This is an AIX5.1 system&lt;/FONT&gt;

&lt;BR&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;rmt0 is scsi&amp;nbsp; (36/72mm tape)&lt;/FONT&gt;
&lt;/P&gt;

&lt;P&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;[ballycs@ACDemo_sdsA /usr/projects/sds/10,99] su -c &amp;quot;find * -print | cpio -ov &amp;gt; /dev/rmt0&amp;quot;&lt;/FONT&gt;

&lt;BR&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;root's Password:&lt;/FONT&gt;

&lt;BR&gt;&lt;FONT SIZE=2 FACE=&quot;Arial&quot;&gt;Found end of tape.&amp;nbsp; To continue, type device/file name when ready.&lt;/FONT&gt;
&lt;/P&gt;
&lt;BR&gt;

&lt;P&gt;&lt;FONT COLOR=&quot;#00FF00&quot; SIZE=4 FACE=&quot;Courier New&quot;&gt;Bruce McDaniel&lt;BR&gt;
&lt;/FONT&gt;&lt;FONT COLOR=&quot;#00FFFF&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;Programmer/Analyst&lt;BR&gt;
&lt;/FONT&gt;&lt;FONT COLOR=&quot;#FF0000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;Gaming Products Support&lt;BR&gt;
&lt;/FONT&gt;&lt;FONT COLOR=&quot;#FF00FF&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;Atlantic City Corporate IT Department&lt;BR&gt;
&lt;/FONT&gt;&lt;FONT COLOR=&quot;#008080&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;2100 Pacific Avenue&lt;BR&gt;
&lt;/FONT&gt;&lt;FONT COLOR=&quot;#0000FF&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;2nd Fl. Colisseum Garage&lt;BR&gt;
&lt;/FONT&gt;&lt;FONT COLOR=&quot;#808000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;Atlantic City, NJ 08401&lt;BR&gt;
&lt;/FONT&gt;&lt;FONT COLOR=&quot;#000000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;Office: (609)343-2639&lt;/FONT&gt;&lt;BR&gt;
&lt;FONT COLOR=&quot;#800000&quot; SIZE=2 FACE=&quot;Courier New&quot;&gt;Fax : (609)343-2682&lt;/FONT&gt;&lt;BR&gt;


&lt;BR&gt;&lt;FONT FACE=&quot;Times New Roman&quot;&gt;&amp;quot;We are not retreating -- we are advancing in another direction.&amp;quot; -- General Douglas MacArthur &lt;/FONT&gt;
&lt;/P&gt;
&lt;BR&gt;

&lt;/BODY&gt;
&lt;/HTML&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GNU-cpio-unable-to-write-to-rmt-tape-tp26736913p26736913.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26536131</id>
	<title>Re: Bug#557437: no mention of how to turn on/off escaping for -t/-tv</title>
	<published>2009-11-26T15:16:59Z</published>
	<updated>2009-11-26T15:16:59Z</updated>
	<author>
		<name>jidanni</name>
	</author>
	<content type="html">forcemerge 557437 416701
&lt;br&gt;thanks
&lt;br&gt;CA&amp;gt; I think this is the same as #416701, no?
&lt;br&gt;Hmmm... and it even says on 416701 that it was to be fixed...
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bug-557437%3A-no-mention-of-how-to-turn-on-off-escaping-for--t--tv-tp26462690p26536131.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26533804</id>
	<title>Bug#558149: document cpio -t OK without -i</title>
	<published>2009-11-26T10:52:04Z</published>
	<updated>2009-11-26T10:52:04Z</updated>
	<author>
		<name>jidanni</name>
	</author>
	<content type="html">Package: cpio
&lt;br&gt;Version: 2.10-1
&lt;br&gt;Severity: wishlist
&lt;br&gt;X-debbugs-cc: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26533804&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bug-cpio@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;The man and info pages make it look like -t is illegal to use by itself,
&lt;br&gt;and needs an accompanying -i.
&lt;br&gt;&lt;br&gt;Perhaps the Info page could mention in its -t discussion that -i need
&lt;br&gt;not necessarily be used with it in fact.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bug-558149%3A-document-cpio--t-OK-without--i-tp26533804p26533804.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26462690</id>
	<title>Bug#557437: no mention of how to turn on/off escaping for -t/-tv</title>
	<published>2009-11-21T10:05:25Z</published>
	<updated>2009-11-21T10:05:25Z</updated>
	<author>
		<name>jidanni</name>
	</author>
	<content type="html">Package: cpio
&lt;br&gt;Version: 2.10-1
&lt;br&gt;X-debbugs-cc: &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26462690&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bug-cpio@...&lt;/a&gt;
&lt;br&gt;Severity: wishlist
&lt;br&gt;&lt;br&gt;Regarding
&lt;br&gt;`-v'
&lt;br&gt;`--verbose'
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;List the files processed, or with `-t', give an `ls -l' style
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;table of contents listing. &amp;nbsp;In a verbose table of contents of a
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ustar archive, user and group names in the archive that do not
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;exist on the local system are replaced by the names that
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;correspond locally to the numeric UID and GID stored in the
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;archive.
&lt;br&gt;&lt;br&gt;However, verbose has another effect,
&lt;br&gt;$ &amp;lt;f cpio -t 980731/QGIS/登革熱02-09.shx
&lt;br&gt;980731/QGIS/登革熱02-09.shx
&lt;br&gt;103896 blocks
&lt;br&gt;$ &amp;lt;f cpio -vt 980731/QGIS/登革熱02-09.shx
&lt;br&gt;-rw-r--r-- &amp;nbsp; 1 jidanni &amp;nbsp;jidanni &amp;nbsp; &amp;nbsp; &amp;nbsp;2964 Jul 22 22:37 980731/QGIS/\265n\255\262\274\36602-09.shx
&lt;br&gt;103896 blocks
&lt;br&gt;&lt;br&gt;As you see, it escapes the filenames.
&lt;br&gt;&lt;br&gt;And &amp;nbsp;there &amp;nbsp;is &amp;nbsp;no &amp;nbsp;documentation &amp;nbsp;on &amp;nbsp;how &amp;nbsp;to &amp;nbsp;turn &amp;nbsp;off &amp;nbsp;this &amp;nbsp;effect.
&lt;br&gt;&lt;br&gt;Nor how to turn it on for just plain -t.
&lt;br&gt;&lt;br&gt;At least document (there at -v on the man page) that there is this
&lt;br&gt;effect -- and that there is no way to turn it on or off.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bug-557437%3A-no-mention-of-how-to-turn-on-off-escaping-for--t--tv-tp26462690p26462690.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26436441</id>
	<title>[PATCH] Fix creation of newc/crc archives with files containing multiple hard links</title>
	<published>2009-11-19T16:05:32Z</published>
	<updated>2009-11-19T16:05:32Z</updated>
	<author>
		<name>Dmitry V. Levin</name>
	</author>
	<content type="html">* src/copyout.c (count_defered_links_to_dev_ino): Make return type
&lt;br&gt;unsigned. &amp;nbsp;Fix local variable types to match cpio_file_stat members
&lt;br&gt;types.
&lt;br&gt;(last_link): Make link count type unsigned.
&lt;br&gt;(writeout_other_defers): Fix local variable types to match
&lt;br&gt;cpio_file_stat members types.
&lt;br&gt;(writeout_final_defers): Make link count type unsigned.
&lt;br&gt;---
&lt;br&gt;&amp;nbsp;If a hardlink that was going to be archived had an inode number greater
&lt;br&gt;&amp;nbsp;than MAX_INT, it was archived as an empty file.
&lt;br&gt;&lt;br&gt;&amp;nbsp;src/copyout.c | &amp;nbsp; 20 ++++++++++----------
&lt;br&gt;&amp;nbsp;1 files changed, 10 insertions(+), 10 deletions(-)
&lt;br&gt;&lt;br&gt;diff --git a/src/copyout.c b/src/copyout.c
&lt;br&gt;index dd9bac2..22a4313 100644
&lt;br&gt;--- a/src/copyout.c
&lt;br&gt;+++ b/src/copyout.c
&lt;br&gt;@@ -106,14 +106,14 @@ struct deferment *deferouts = NULL;
&lt;br&gt;&amp;nbsp;/* Count the number of other (hard) links to this file that have
&lt;br&gt;&amp;nbsp; &amp;nbsp; already been defered. &amp;nbsp;*/
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-static int
&lt;br&gt;+static unsigned int
&lt;br&gt;&amp;nbsp;count_defered_links_to_dev_ino (struct cpio_file_stat *file_hdr)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct deferment *d;
&lt;br&gt;- &amp;nbsp;int	ino;
&lt;br&gt;- &amp;nbsp;int 	maj;
&lt;br&gt;- &amp;nbsp;int &amp;nbsp; min;
&lt;br&gt;- &amp;nbsp;int 	count;
&lt;br&gt;+ &amp;nbsp;ino_t	ino;
&lt;br&gt;+ &amp;nbsp;long	maj;
&lt;br&gt;+ &amp;nbsp;long	min;
&lt;br&gt;+ &amp;nbsp;unsigned int count;
&lt;br&gt;&amp;nbsp; &amp;nbsp;ino = file_hdr-&amp;gt;c_ino;
&lt;br&gt;&amp;nbsp; &amp;nbsp;maj = file_hdr-&amp;gt;c_dev_maj;
&lt;br&gt;&amp;nbsp; &amp;nbsp;min = file_hdr-&amp;gt;c_dev_min;
&lt;br&gt;@@ -133,7 +133,7 @@ count_defered_links_to_dev_ino (struct cpio_file_stat *file_hdr)
&lt;br&gt;&amp;nbsp;static int
&lt;br&gt;&amp;nbsp;last_link (struct cpio_file_stat *file_hdr)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;- &amp;nbsp;int	other_files_sofar;
&lt;br&gt;+ &amp;nbsp;unsigned int other_files_sofar;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;other_files_sofar = count_defered_links_to_dev_ino (file_hdr);
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (file_hdr-&amp;gt;c_nlink == (other_files_sofar + 1) )
&lt;br&gt;@@ -167,9 +167,9 @@ writeout_other_defers (struct cpio_file_stat *file_hdr, int out_des)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct deferment *d;
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct deferment *d_prev;
&lt;br&gt;- &amp;nbsp;int	ino;
&lt;br&gt;- &amp;nbsp;int 	maj;
&lt;br&gt;- &amp;nbsp;int &amp;nbsp; min;
&lt;br&gt;+ &amp;nbsp;ino_t	ino;
&lt;br&gt;+ &amp;nbsp;long	maj;
&lt;br&gt;+ &amp;nbsp;long	min;
&lt;br&gt;&amp;nbsp; &amp;nbsp;ino = file_hdr-&amp;gt;c_ino;
&lt;br&gt;&amp;nbsp; &amp;nbsp;maj = file_hdr-&amp;gt;c_dev_maj;
&lt;br&gt;&amp;nbsp; &amp;nbsp;min = file_hdr-&amp;gt;c_dev_min;
&lt;br&gt;@@ -255,7 +255,7 @@ static void
&lt;br&gt;&amp;nbsp;writeout_final_defers (int out_des)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct deferment *d;
&lt;br&gt;- &amp;nbsp;int other_count;
&lt;br&gt;+ &amp;nbsp;unsigned int other_count;
&lt;br&gt;&amp;nbsp; &amp;nbsp;while (deferouts != NULL)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;d = deferouts;
&lt;br&gt;-- 
&lt;br&gt;ldv
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH--Fix-creation-of-newc-crc-archives-with-files-containing-multiple-hard-links-tp26436441p26436441.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26133857</id>
	<title>Re: Directory ownership lost in 2.9 and 2.10 when dir not empty</title>
	<published>2009-10-30T10:19:04Z</published>
	<updated>2009-10-30T10:19:04Z</updated>
	<author>
		<name>asc1000</name>
	</author>
	<content type="html">&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Tim Kientzle wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;That delayed strategy is necessary to handle cases where
&lt;br&gt;the parent directory is non-writable.
&lt;br&gt;&lt;br&gt;Try your test again, but change the permissions on the &amp;quot;test&amp;quot;
&lt;br&gt;directory to read-only (chmod 555 test) before creating your
&lt;br&gt;test.cpio archive. &amp;nbsp;I think you'll find that your patch
&lt;br&gt;makes cpio unable to restore the archive.
&lt;br&gt;&lt;br&gt;I expect the real fix is to store ownership, atime,
&lt;br&gt;and mtime in the delay list so that apply_delayed_set_stat()
&lt;br&gt;can apply those as well. &amp;nbsp;(Might rename the routine to
&lt;br&gt;apply_delayed_attributes() while you're making this change.)
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Tim
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;br&gt;&lt;br&gt;Hi Tim,
&lt;br&gt;&lt;br&gt;Thanks for clarifying the purpose. &amp;nbsp;I had suspected it was something along those lines after reading some previous messages related to this problem. &amp;nbsp;It didn't originally occur to me because I always use the -depth option to find, which puts the directory after its contents. &amp;nbsp;Incidentally, the chmod 555 test did not prevent the patched cpio from restoring the tree because the directory itself was processed after the contents.
&lt;br&gt;&lt;br&gt;I think I've come up with a solution that would handle all possible cases (directory item precedes contents, directory item follows contents, and directory item is not present at all). &amp;nbsp;It would involve generating the delayed list entries (including the properties as you suggest) from the directory item in the archive stream rather than from the implicit creation by make_path(). &amp;nbsp;That way the restored directory will be created using umask thus guaranteeing the contents will be writable. &amp;nbsp;In the two cases where the directory entry is in the archive stream the permissions will be restored to original after all the files. &amp;nbsp;In the case where there is no directory item in the stream, they will remain as the default umask settings.
&lt;br&gt;&lt;br&gt;Perhaps that was the original intent! &amp;nbsp;I'll post a patch when it is ready.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Amardeep
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Directory-ownership-lost-in-2.9-and-2.10-when-dir-not-empty-tp25843320p26133857.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26132252</id>
	<title>Re: Directory ownership lost in 2.9 and 2.10 when dir not empty</title>
	<published>2009-10-30T08:38:21Z</published>
	<updated>2009-10-30T08:38:21Z</updated>
	<author>
		<name>Tim Kientzle</name>
	</author>
	<content type="html">That delayed strategy is necessary to handle cases where
&lt;br&gt;the parent directory is non-writable.
&lt;br&gt;&lt;br&gt;Try your test again, but change the permissions on the &amp;quot;test&amp;quot;
&lt;br&gt;directory to read-only (chmod 555 test) before creating your
&lt;br&gt;test.cpio archive. &amp;nbsp;I think you'll find that your patch
&lt;br&gt;makes cpio unable to restore the archive.
&lt;br&gt;&lt;br&gt;I expect the real fix is to store ownership, atime,
&lt;br&gt;and mtime in the delay list so that apply_delayed_set_stat()
&lt;br&gt;can apply those as well. &amp;nbsp;(Might rename the routine to
&lt;br&gt;apply_delayed_attributes() while you're making this change.)
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Tim
&lt;br&gt;&lt;br&gt;asc1000 wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Reuti wrote:
&lt;br&gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; this was on the list quite some times as a bug in 2.9. I copy a &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; directory tree as a result of a &amp;quot;find . -depth&amp;quot; and the ownerships &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; are not restored when the directoyr is not empty. OTOH, I have to use &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; -depth to retain the modifications dates of the directory. I hoped &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; that it would be fixed in 2.10, but it's still there. For now I &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; continue to use 2.8, which works fine.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I this no longer considered as a bug, and just the correct behavior &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; in the future?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -- Reuti
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have done some work to trace this problem. &amp;nbsp; Here is a way to reproduce
&lt;br&gt;&amp;gt; it, an explanation of what is happening, and a workaround patch for 2.10. 
&lt;br&gt;&amp;gt; Relevant files are attached.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/file/p26096793/makepath.c.diff&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/file/p26096793/makepath.c.diff&lt;/a&gt;&amp;nbsp;makepath.c.diff 
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/file/p26096793/test.tar.gz&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/file/p26096793/test.tar.gz&lt;/a&gt;&amp;nbsp;test.tar.gz 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The simple test case directory tree:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; test/
&lt;br&gt;&amp;gt; test/one/
&lt;br&gt;&amp;gt; test/two/
&lt;br&gt;&amp;gt; test/three/
&lt;br&gt;&amp;gt; test/three/file
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Every directory (test, one, two, three) and the file (file) have modified
&lt;br&gt;&amp;gt; date of oct 1. &amp;nbsp;I create an archive as follows:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; find test -depth | cpio -ov &amp;gt; test.cpio
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Then I remove the original tree:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; rm -rf test
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Now, I restore the tree:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; cat test.cpio | cpio -idumv
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This results in all nodes except two getting their original oct 1 modify
&lt;br&gt;&amp;gt; date. &amp;nbsp;The two exceptions are:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; test/
&lt;br&gt;&amp;gt; test/three/
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Those two nodes get a modify time set to current system clock. &amp;nbsp;The reason
&lt;br&gt;&amp;gt; for this is because they have child nodes and are therefore created by
&lt;br&gt;&amp;gt; make_path() which puts them into the delay_set_stat linked list. &amp;nbsp;After all
&lt;br&gt;&amp;gt; data is restored, that list is processed by routines that do not have access
&lt;br&gt;&amp;gt; to the original directory's ownership and atime and mtime, so that
&lt;br&gt;&amp;gt; information gets destroyed and replaced by current system time, etc.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; My question is, what is the reason for deferring that operation? &amp;nbsp;Can it be
&lt;br&gt;&amp;gt; completed when the directory is created?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The workaround I'm using is to call apply_delayed_set_stat() right after
&lt;br&gt;&amp;gt; delay_set_stat(). &amp;nbsp;It is not elegant, but it makes the directory stats and
&lt;br&gt;&amp;gt; timestamps come out correctly. &amp;nbsp;I do not really know if that adversely
&lt;br&gt;&amp;gt; affects some other operational case, which is why I'd like this reviewed by
&lt;br&gt;&amp;gt; someone more familiar with that code's intent.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Amardeep Chana
&lt;br&gt;&amp;gt; Indiana, US
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Directory-ownership-lost-in-2.9-and-2.10-when-dir-not-empty-tp25843320p26132252.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26096793</id>
	<title>Re: Directory ownership lost in 2.9 and 2.10 when dir not empty</title>
	<published>2009-10-28T08:32:46Z</published>
	<updated>2009-10-28T08:32:46Z</updated>
	<author>
		<name>asc1000</name>
	</author>
	<content type="html">&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Reuti wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi,
&lt;br&gt;&lt;br&gt;this was on the list quite some times as a bug in 2.9. I copy a &amp;nbsp;
&lt;br&gt;directory tree as a result of a &amp;quot;find . -depth&amp;quot; and the ownerships &amp;nbsp;
&lt;br&gt;are not restored when the directoyr is not empty. OTOH, I have to use &amp;nbsp;
&lt;br&gt;-depth to retain the modifications dates of the directory. I hoped &amp;nbsp;
&lt;br&gt;that it would be fixed in 2.10, but it's still there. For now I &amp;nbsp;
&lt;br&gt;continue to use 2.8, which works fine.
&lt;br&gt;&lt;br&gt;I this no longer considered as a bug, and just the correct behavior &amp;nbsp;
&lt;br&gt;in the future?
&lt;br&gt;&lt;br&gt;-- Reuti
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;br&gt;Hello,
&lt;br&gt;&lt;br&gt;I have done some work to trace this problem. &amp;nbsp; Here is a way to reproduce it, an explanation of what is happening, and a workaround patch for 2.10. &amp;nbsp;Relevant files are attached.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/file/p26096793/makepath.c.diff&quot; target=&quot;_top&quot;&gt;makepath.c.diff&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/file/p26096793/test.tar.gz&quot; target=&quot;_top&quot;&gt;test.tar.gz&lt;/a&gt;&lt;br&gt;&lt;br&gt;The simple test case directory tree:
&lt;br&gt;&lt;br&gt;test/
&lt;br&gt;test/one/
&lt;br&gt;test/two/
&lt;br&gt;test/three/
&lt;br&gt;test/three/file
&lt;br&gt;&lt;br&gt;Every directory (test, one, two, three) and the file (file) have modified date of oct 1. &amp;nbsp;I create an archive as follows:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; find test -depth | cpio -ov &amp;gt; test.cpio
&lt;br&gt;&lt;br&gt;Then I remove the original tree:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; rm -rf test
&lt;br&gt;&lt;br&gt;Now, I restore the tree:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; cat test.cpio | cpio -idumv
&lt;br&gt;&lt;br&gt;This results in all nodes except two getting their original oct 1 modify date. &amp;nbsp;The two exceptions are:
&lt;br&gt;&lt;br&gt;test/
&lt;br&gt;test/three/
&lt;br&gt;&lt;br&gt;Those two nodes get a modify time set to current system clock. &amp;nbsp;The reason for this is because they have child nodes and are therefore created by make_path() which puts them into the delay_set_stat linked list. &amp;nbsp;After all data is restored, that list is processed by routines that do not have access to the original directory's ownership and atime and mtime, so that information gets destroyed and replaced by current system time, etc.
&lt;br&gt;&lt;br&gt;My question is, what is the reason for deferring that operation? &amp;nbsp;Can it be completed when the directory is created?
&lt;br&gt;&lt;br&gt;The workaround I'm using is to call apply_delayed_set_stat() right after delay_set_stat(). &amp;nbsp;It is not elegant, but it makes the directory stats and timestamps come out correctly. &amp;nbsp;I do not really know if that adversely affects some other operational case, which is why I'd like this reviewed by someone more familiar with that code's intent.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Amardeep Chana
&lt;br&gt;Indiana, US
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Directory-ownership-lost-in-2.9-and-2.10-when-dir-not-empty-tp25843320p26096793.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25957662</id>
	<title>missing call to fclose in copyin.c</title>
	<published>2009-10-19T05:36:15Z</published>
	<updated>2009-10-19T05:36:15Z</updated>
	<author>
		<name>Michal Seben</name>
	</author>
	<content type="html">We've received the following report from a reporter:
&lt;br&gt;&lt;a href=&quot;https://bugzilla.novell.com/show_bug.cgi?id=543132&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://bugzilla.novell.com/show_bug.cgi?id=543132&lt;/a&gt;&amp;nbsp;:
&lt;br&gt;&lt;br&gt;--------------------
&lt;br&gt;source code file cpio-2.10/src/copyin.c
&lt;br&gt;function process_copy_in
&lt;br&gt;local variable tty_out.
&lt;br&gt;&lt;br&gt;I notice the following code
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; tty_out = fopen (TTY_NAME, &amp;quot;w&amp;quot;);
&lt;br&gt;&lt;br&gt;but I fail to notice a matching call to fclose. This looks like a resource
&lt;br&gt;leak to me. Suggest add call to fclose near the end of the function.
&lt;br&gt;--------------------
&lt;br&gt;&lt;br&gt;&lt;br&gt;I also attach suggested fix from Robert Schweikert
&lt;br&gt;&lt;br&gt;thanks
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;tt&gt;[cpio-2.10-close_files_after_copy.patch]&lt;/tt&gt;&lt;br /&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;&lt;tt&gt;Index: src/copyin.c
&lt;br&gt;===================================================================
&lt;br&gt;--- src/copyin.c.orig
&lt;br&gt;+++ src/copyin.c
&lt;br&gt;@@ -1565,6 +1565,19 @@ process_copy_in ()
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (dot_flag)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;fputc ('\n', stderr);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+ &amp;nbsp;if (tty_in)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;fclose(tty_in);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp;if (tty_out)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;fclose(tty_out);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+ &amp;nbsp;if (rename_in)
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;{
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;fclose(rename_in);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (append_flag)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;return;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/tt&gt;&lt;hr align=&quot;left&quot; width=&quot;300&quot; /&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/missing-call-to-fclose-in-copyin.c-tp25957662p25957662.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25843320</id>
	<title>Directory ownership lost in 2.9 and 2.10 when dir not empty</title>
	<published>2009-10-11T06:04:46Z</published>
	<updated>2009-10-11T06:04:46Z</updated>
	<author>
		<name>Reuti</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;this was on the list quite some times as a bug in 2.9. I copy a &amp;nbsp;
&lt;br&gt;directory tree as a result of a &amp;quot;find . -depth&amp;quot; and the ownerships &amp;nbsp;
&lt;br&gt;are not restored when the directoyr is not empty. OTOH, I have to use &amp;nbsp;
&lt;br&gt;-depth to retain the modifications dates of the directory. I hoped &amp;nbsp;
&lt;br&gt;that it would be fixed in 2.10, but it's still there. For now I &amp;nbsp;
&lt;br&gt;continue to use 2.8, which works fine.
&lt;br&gt;&lt;br&gt;I this no longer considered as a bug, and just the correct behavior &amp;nbsp;
&lt;br&gt;in the future?
&lt;br&gt;&lt;br&gt;-- Reuti
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Directory-ownership-lost-in-2.9-and-2.10-when-dir-not-empty-tp25843320p25843320.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25787773</id>
	<title>Re: Consistently use ino_t to support filesystems with inodes wider than 32 bits.</title>
	<published>2009-10-07T06:59:44Z</published>
	<updated>2009-10-07T06:59:44Z</updated>
	<author>
		<name>Sergey Poznyakoff-2</name>
	</author>
	<content type="html">Hello Tim, Stephen,
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;FYI, this won't work on Windows (in case you care ;-):
&lt;br&gt;&lt;br&gt;None of the cpio headers is able to keep 64 bit inode numbers anyways.
&lt;br&gt;But the patch makes the code a lot more readable, so I'll apply it.
&lt;br&gt;&lt;br&gt;Thanks &amp; regards,
&lt;br&gt;Sergey
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Consistently-use-ino_t-to-support-filesystems-with-inodes-wider-than-32-bits.-tp25710370p25787773.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25786159</id>
	<title>(no subject)</title>
	<published>2009-10-07T05:50:46Z</published>
	<updated>2009-10-07T05:50:46Z</updated>
	<author>
		<name>Stephen R. van den Berg</name>
	</author>
	<content type="html">Tim Kientzle wrote:
&lt;br&gt;&amp;gt;FYI, this won't work on Windows (in case you care ;-):
&lt;br&gt;&amp;gt;Microsoft's ino_t is only 16 bits, even though NTFS
&lt;br&gt;&amp;gt;uses a 64-bit index value. &amp;nbsp;int64_t may be a better choice.
&lt;br&gt;&lt;br&gt;Is int64_t a POSIX defined type?
&lt;br&gt;In any case, cpio gets the value from the stat struct. &amp;nbsp;So ultimately the
&lt;br&gt;question then becomes: what type does the member in the stat struct have?
&lt;br&gt;Shouldn't this be ino_t by definition? &amp;nbsp;And isn't it then equally useless
&lt;br&gt;(on Windows) to take that value and store it in cpio?
&lt;br&gt;-- 
&lt;br&gt;Sincerely,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Stephen R. van den Berg.
&lt;br&gt;&lt;br&gt;&amp;quot;A man, a plan, a canal -- Panama!&amp;quot; -- The Palindromist
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/%28no-subject%29-tp25786159p25786159.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25759029</id>
	<title>Re: Consistently use ino_t to support filesystems with  inodes wider than 32 bits.</title>
	<published>2009-10-05T14:11:48Z</published>
	<updated>2009-10-05T14:11:48Z</updated>
	<author>
		<name>Tim Kientzle</name>
	</author>
	<content type="html">FYI, this won&amp;#39;t work on Windows (in case you care ;-):&lt;br&gt;Microsoft&amp;#39;s ino_t is only 16 bits, even though NTFS&lt;br&gt;uses a 64-bit index value.  int64_t may be a better choice.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;&lt;br&gt;Tim Kientzle&lt;br&gt;&lt;br&gt;
&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Oct 1, 2009 at 11:35 AM, Stephen R. van den Berg &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25759029&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;srb@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
---&lt;br&gt;
&lt;br&gt;
Add support for filesystems with inode-fields wider than 32-bits (I witnessed&lt;br&gt;
this bug on a large XFS filesystem).&lt;br&gt;
This patch fixes the bug that hardlinked files are *not* included at&lt;br&gt;
all (i.e. both files are listed, but the content is not transmitted with&lt;br&gt;
either of them).&lt;br&gt;
&lt;br&gt;
The patch is relative to the bleeding edge version of cpio on the git&lt;br&gt;
repostory.&lt;br&gt;
&lt;br&gt;
 src/copyin.c   |    8 ++++----&lt;br&gt;
 src/copyout.c  |    4 ++--&lt;br&gt;
 src/copypass.c |    2 +-&lt;br&gt;
 src/extern.h   |    6 +++---&lt;br&gt;
 src/util.c     |    6 +++---&lt;br&gt;
 5 files changed, 13 insertions(+), 13 deletions(-)&lt;br&gt;
&lt;br&gt;
diff --git a/src/copyin.c b/src/copyin.c&lt;br&gt;
index 5b7594b..8ba2bc9 100644&lt;br&gt;
--- a/src/copyin.c&lt;br&gt;
+++ b/src/copyin.c&lt;br&gt;
@@ -258,7 +258,7 @@ create_defered_links (struct cpio_file_stat *file_hdr)&lt;br&gt;
 {&lt;br&gt;
   struct deferment *d;&lt;br&gt;
   struct deferment *d_prev;&lt;br&gt;
-  int  ino;&lt;br&gt;
+  ino_t        ino;&lt;br&gt;
   int  maj;&lt;br&gt;
   int   min;&lt;br&gt;
   int  link_res;&lt;br&gt;
@@ -306,7 +306,7 @@ create_defered_links_to_skipped (struct cpio_file_stat *file_hdr,&lt;br&gt;
 {&lt;br&gt;
   struct deferment *d;&lt;br&gt;
   struct deferment *d_prev;&lt;br&gt;
-  int  ino;&lt;br&gt;
+  ino_t        ino;&lt;br&gt;
   int  maj;&lt;br&gt;
   int   min;&lt;br&gt;
   if (file_hdr-&amp;gt;c_filesize == 0)&lt;br&gt;
@@ -1460,8 +1460,8 @@ process_copy_in ()&lt;br&gt;
          struct cpio_file_stat *h;&lt;br&gt;
          h = &amp;amp;file_hdr;&lt;br&gt;
          fprintf (stderr,&lt;br&gt;
-               &amp;quot;magic = 0%o, ino = %d, mode = 0%o, uid = %d, gid = %d\n&amp;quot;,&lt;br&gt;
-               h-&amp;gt;c_magic, h-&amp;gt;c_ino, h-&amp;gt;c_mode, h-&amp;gt;c_uid, h-&amp;gt;c_gid);&lt;br&gt;
+               &amp;quot;magic = 0%o, ino = %ld, mode = 0%o, uid = %d, gid = %d\n&amp;quot;,&lt;br&gt;
+               h-&amp;gt;c_magic, (long)h-&amp;gt;c_ino, h-&amp;gt;c_mode, h-&amp;gt;c_uid, h-&amp;gt;c_gid);&lt;br&gt;
          fprintf (stderr,&lt;br&gt;
                &amp;quot;nlink = %d, mtime = %d, filesize = %d, dev_maj = 0x%x\n&amp;quot;,&lt;br&gt;
                h-&amp;gt;c_nlink, h-&amp;gt;c_mtime, h-&amp;gt;c_filesize, h-&amp;gt;c_dev_maj);&lt;br&gt;
diff --git a/src/copyout.c b/src/copyout.c&lt;br&gt;
index dd9bac2..b3bb0ad 100644&lt;br&gt;
--- a/src/copyout.c&lt;br&gt;
+++ b/src/copyout.c&lt;br&gt;
@@ -110,7 +110,7 @@ static int&lt;br&gt;
 count_defered_links_to_dev_ino (struct cpio_file_stat *file_hdr)&lt;br&gt;
 {&lt;br&gt;
   struct deferment *d;&lt;br&gt;
-  int  ino;&lt;br&gt;
+  ino_t        ino;&lt;br&gt;
   int  maj;&lt;br&gt;
   int   min;&lt;br&gt;
   int  count;&lt;br&gt;
@@ -167,7 +167,7 @@ writeout_other_defers (struct cpio_file_stat *file_hdr, int out_des)&lt;br&gt;
 {&lt;br&gt;
   struct deferment *d;&lt;br&gt;
   struct deferment *d_prev;&lt;br&gt;
-  int  ino;&lt;br&gt;
+  ino_t        ino;&lt;br&gt;
   int  maj;&lt;br&gt;
   int   min;&lt;br&gt;
   ino = file_hdr-&amp;gt;c_ino;&lt;br&gt;
diff --git a/src/copypass.c b/src/copypass.c&lt;br&gt;
index 8941b76..20929a6 100644&lt;br&gt;
--- a/src/copypass.c&lt;br&gt;
+++ b/src/copypass.c&lt;br&gt;
@@ -387,7 +387,7 @@ process_copy_pass ()&lt;br&gt;
&lt;br&gt;
 int&lt;br&gt;
 link_to_maj_min_ino (char *file_name, int st_dev_maj, int st_dev_min,&lt;br&gt;
-                    int st_ino)&lt;br&gt;
+                    ino_t st_ino)&lt;br&gt;
 {&lt;br&gt;
   int  link_res;&lt;br&gt;
   char *link_name;&lt;br&gt;
diff --git a/src/extern.h b/src/extern.h&lt;br&gt;
index a832897..6144be1 100644&lt;br&gt;
--- a/src/extern.h&lt;br&gt;
+++ b/src/extern.h&lt;br&gt;
@@ -119,7 +119,7 @@ void process_copy_out (void);&lt;br&gt;
 /* copypass.c */&lt;br&gt;
 void process_copy_pass (void);&lt;br&gt;
 int link_to_maj_min_ino (char *file_name, int st_dev_maj,&lt;br&gt;
-                        int st_dev_min, int st_ino);&lt;br&gt;
+                        int st_dev_min, ino_t st_ino);&lt;br&gt;
 int link_to_name (char *link_name, char *link_target);&lt;br&gt;
&lt;br&gt;
 /* dirname.c */&lt;br&gt;
@@ -169,9 +169,9 @@ void warn_if_file_changed (char *file_name, off_t old_file_size,&lt;br&gt;
                            time_t old_file_mtime);&lt;br&gt;
 void create_all_directories (char *name);&lt;br&gt;
 void prepare_append (int out_file_des);&lt;br&gt;
-char *find_inode_file (unsigned long node_num,&lt;br&gt;
+char *find_inode_file (ino_t node_num,&lt;br&gt;
                       unsigned long major_num, unsigned long minor_num);&lt;br&gt;
-void add_inode (unsigned long node_num, char *file_name,&lt;br&gt;
+void add_inode (ino_t node_num, char *file_name,&lt;br&gt;
                unsigned long major_num, unsigned long minor_num);&lt;br&gt;
 int open_archive (char *file);&lt;br&gt;
 void tape_offline (int tape_des);&lt;br&gt;
diff --git a/src/util.c b/src/util.c&lt;br&gt;
index 1eb92ae..16a4320 100644&lt;br&gt;
--- a/src/util.c&lt;br&gt;
+++ b/src/util.c&lt;br&gt;
@@ -686,7 +686,7 @@ prepare_append (int out_file_des)&lt;br&gt;
&lt;br&gt;
 struct inode_val&lt;br&gt;
 {&lt;br&gt;
-  unsigned long inode;&lt;br&gt;
+  ino_t inode;&lt;br&gt;
   unsigned long major_num;&lt;br&gt;
   unsigned long minor_num;&lt;br&gt;
   char *file_name;&lt;br&gt;
@@ -713,7 +713,7 @@ inode_val_compare (const void *val1, const void *val2)&lt;br&gt;
 }&lt;br&gt;
&lt;br&gt;
 char *&lt;br&gt;
-find_inode_file (unsigned long node_num, unsigned long major_num,&lt;br&gt;
+find_inode_file (ino_t node_num, unsigned long major_num,&lt;br&gt;
                 unsigned long minor_num)&lt;br&gt;
 {&lt;br&gt;
   struct inode_val sample;&lt;br&gt;
@@ -732,7 +732,7 @@ find_inode_file (unsigned long node_num, unsigned long major_num,&lt;br&gt;
 /* Associate FILE_NAME with the inode NODE_NUM.  (Insert into hash table.)  */&lt;br&gt;
&lt;br&gt;
 void&lt;br&gt;
-add_inode (unsigned long node_num, char *file_name, unsigned long major_num,&lt;br&gt;
+add_inode (ino_t node_num, char *file_name, unsigned long major_num,&lt;br&gt;
           unsigned long minor_num)&lt;br&gt;
 {&lt;br&gt;
   struct inode_val *temp;&lt;br&gt;
--&lt;br&gt;
1.6.2.151.gdc0be&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;
--&lt;br&gt;
Sincerely,&lt;br&gt;
           Stephen R. van den Berg.&lt;br&gt;
&lt;br&gt;
&amp;quot;If he learns from his mistakes, pretty soon he&amp;#39;ll know everything.&amp;quot;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Consistently-use-ino_t-to-support-filesystems-with-inodes-wider-than-32-bits.-tp25710370p25759029.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25710370</id>
	<title>Consistently use ino_t to support filesystems with inodes wider than 32 bits.</title>
	<published>2009-10-01T11:35:20Z</published>
	<updated>2009-10-01T11:35:20Z</updated>
	<author>
		<name>Stephen R. van den Berg</name>
	</author>
	<content type="html">---
&lt;br&gt;&lt;br&gt;Add support for filesystems with inode-fields wider than 32-bits (I witnessed
&lt;br&gt;this bug on a large XFS filesystem).
&lt;br&gt;This patch fixes the bug that hardlinked files are *not* included at
&lt;br&gt;all (i.e. both files are listed, but the content is not transmitted with
&lt;br&gt;either of them).
&lt;br&gt;&lt;br&gt;The patch is relative to the bleeding edge version of cpio on the git
&lt;br&gt;repostory.
&lt;br&gt;&lt;br&gt;&amp;nbsp;src/copyin.c &amp;nbsp; | &amp;nbsp; &amp;nbsp;8 ++++----
&lt;br&gt;&amp;nbsp;src/copyout.c &amp;nbsp;| &amp;nbsp; &amp;nbsp;4 ++--
&lt;br&gt;&amp;nbsp;src/copypass.c | &amp;nbsp; &amp;nbsp;2 +-
&lt;br&gt;&amp;nbsp;src/extern.h &amp;nbsp; | &amp;nbsp; &amp;nbsp;6 +++---
&lt;br&gt;&amp;nbsp;src/util.c &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp;6 +++---
&lt;br&gt;&amp;nbsp;5 files changed, 13 insertions(+), 13 deletions(-)
&lt;br&gt;&lt;br&gt;diff --git a/src/copyin.c b/src/copyin.c
&lt;br&gt;index 5b7594b..8ba2bc9 100644
&lt;br&gt;--- a/src/copyin.c
&lt;br&gt;+++ b/src/copyin.c
&lt;br&gt;@@ -258,7 +258,7 @@ create_defered_links (struct cpio_file_stat *file_hdr)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct deferment *d;
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct deferment *d_prev;
&lt;br&gt;- &amp;nbsp;int	ino;
&lt;br&gt;+ &amp;nbsp;ino_t	ino;
&lt;br&gt;&amp;nbsp; &amp;nbsp;int 	maj;
&lt;br&gt;&amp;nbsp; &amp;nbsp;int &amp;nbsp; min;
&lt;br&gt;&amp;nbsp; &amp;nbsp;int 	link_res;
&lt;br&gt;@@ -306,7 +306,7 @@ create_defered_links_to_skipped (struct cpio_file_stat *file_hdr,
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct deferment *d;
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct deferment *d_prev;
&lt;br&gt;- &amp;nbsp;int	ino;
&lt;br&gt;+ &amp;nbsp;ino_t	ino;
&lt;br&gt;&amp;nbsp; &amp;nbsp;int 	maj;
&lt;br&gt;&amp;nbsp; &amp;nbsp;int &amp;nbsp; min;
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (file_hdr-&amp;gt;c_filesize == 0)
&lt;br&gt;@@ -1460,8 +1460,8 @@ process_copy_in ()
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;struct cpio_file_stat *h;
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;h = &amp;file_hdr;
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;fprintf (stderr, 
&lt;br&gt;-		&amp;quot;magic = 0%o, ino = %d, mode = 0%o, uid = %d, gid = %d\n&amp;quot;,
&lt;br&gt;-		h-&amp;gt;c_magic, h-&amp;gt;c_ino, h-&amp;gt;c_mode, h-&amp;gt;c_uid, h-&amp;gt;c_gid);
&lt;br&gt;+		&amp;quot;magic = 0%o, ino = %ld, mode = 0%o, uid = %d, gid = %d\n&amp;quot;,
&lt;br&gt;+		h-&amp;gt;c_magic, (long)h-&amp;gt;c_ino, h-&amp;gt;c_mode, h-&amp;gt;c_uid, h-&amp;gt;c_gid);
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;fprintf (stderr, 
&lt;br&gt;&amp;nbsp;		&amp;quot;nlink = %d, mtime = %d, filesize = %d, dev_maj = 0x%x\n&amp;quot;,
&lt;br&gt;&amp;nbsp;		h-&amp;gt;c_nlink, h-&amp;gt;c_mtime, h-&amp;gt;c_filesize, h-&amp;gt;c_dev_maj);
&lt;br&gt;diff --git a/src/copyout.c b/src/copyout.c
&lt;br&gt;index dd9bac2..b3bb0ad 100644
&lt;br&gt;--- a/src/copyout.c
&lt;br&gt;+++ b/src/copyout.c
&lt;br&gt;@@ -110,7 +110,7 @@ static int
&lt;br&gt;&amp;nbsp;count_defered_links_to_dev_ino (struct cpio_file_stat *file_hdr)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct deferment *d;
&lt;br&gt;- &amp;nbsp;int	ino;
&lt;br&gt;+ &amp;nbsp;ino_t	ino;
&lt;br&gt;&amp;nbsp; &amp;nbsp;int 	maj;
&lt;br&gt;&amp;nbsp; &amp;nbsp;int &amp;nbsp; min;
&lt;br&gt;&amp;nbsp; &amp;nbsp;int 	count;
&lt;br&gt;@@ -167,7 +167,7 @@ writeout_other_defers (struct cpio_file_stat *file_hdr, int out_des)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct deferment *d;
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct deferment *d_prev;
&lt;br&gt;- &amp;nbsp;int	ino;
&lt;br&gt;+ &amp;nbsp;ino_t	ino;
&lt;br&gt;&amp;nbsp; &amp;nbsp;int 	maj;
&lt;br&gt;&amp;nbsp; &amp;nbsp;int &amp;nbsp; min;
&lt;br&gt;&amp;nbsp; &amp;nbsp;ino = file_hdr-&amp;gt;c_ino;
&lt;br&gt;diff --git a/src/copypass.c b/src/copypass.c
&lt;br&gt;index 8941b76..20929a6 100644
&lt;br&gt;--- a/src/copypass.c
&lt;br&gt;+++ b/src/copypass.c
&lt;br&gt;@@ -387,7 +387,7 @@ process_copy_pass ()
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;int
&lt;br&gt;&amp;nbsp;link_to_maj_min_ino (char *file_name, int st_dev_maj, int st_dev_min,
&lt;br&gt;-		 &amp;nbsp; &amp;nbsp; int st_ino)
&lt;br&gt;+		 &amp;nbsp; &amp;nbsp; ino_t st_ino)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;int	link_res;
&lt;br&gt;&amp;nbsp; &amp;nbsp;char *link_name;
&lt;br&gt;diff --git a/src/extern.h b/src/extern.h
&lt;br&gt;index a832897..6144be1 100644
&lt;br&gt;--- a/src/extern.h
&lt;br&gt;+++ b/src/extern.h
&lt;br&gt;@@ -119,7 +119,7 @@ void process_copy_out (void);
&lt;br&gt;&amp;nbsp;/* copypass.c */
&lt;br&gt;&amp;nbsp;void process_copy_pass (void);
&lt;br&gt;&amp;nbsp;int link_to_maj_min_ino (char *file_name, int st_dev_maj, 
&lt;br&gt;-			 int st_dev_min, int st_ino);
&lt;br&gt;+			 int st_dev_min, ino_t st_ino);
&lt;br&gt;&amp;nbsp;int link_to_name (char *link_name, char *link_target);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;/* dirname.c */
&lt;br&gt;@@ -169,9 +169,9 @@ void warn_if_file_changed (char *file_name, off_t old_file_size,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; time_t old_file_mtime);
&lt;br&gt;&amp;nbsp;void create_all_directories (char *name);
&lt;br&gt;&amp;nbsp;void prepare_append (int out_file_des);
&lt;br&gt;-char *find_inode_file (unsigned long node_num,
&lt;br&gt;+char *find_inode_file (ino_t node_num,
&lt;br&gt;&amp;nbsp;		 &amp;nbsp; &amp;nbsp; &amp;nbsp; unsigned long major_num, unsigned long minor_num);
&lt;br&gt;-void add_inode (unsigned long node_num, char *file_name,
&lt;br&gt;+void add_inode (ino_t node_num, char *file_name,
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;unsigned long major_num, unsigned long minor_num);
&lt;br&gt;&amp;nbsp;int open_archive (char *file);
&lt;br&gt;&amp;nbsp;void tape_offline (int tape_des);
&lt;br&gt;diff --git a/src/util.c b/src/util.c
&lt;br&gt;index 1eb92ae..16a4320 100644
&lt;br&gt;--- a/src/util.c
&lt;br&gt;+++ b/src/util.c
&lt;br&gt;@@ -686,7 +686,7 @@ prepare_append (int out_file_des)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;struct inode_val
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;- &amp;nbsp;unsigned long inode;
&lt;br&gt;+ &amp;nbsp;ino_t inode;
&lt;br&gt;&amp;nbsp; &amp;nbsp;unsigned long major_num;
&lt;br&gt;&amp;nbsp; &amp;nbsp;unsigned long minor_num;
&lt;br&gt;&amp;nbsp; &amp;nbsp;char *file_name;
&lt;br&gt;@@ -713,7 +713,7 @@ inode_val_compare (const void *val1, const void *val2)
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;char *
&lt;br&gt;-find_inode_file (unsigned long node_num, unsigned long major_num,
&lt;br&gt;+find_inode_file (ino_t node_num, unsigned long major_num,
&lt;br&gt;&amp;nbsp;		 unsigned long minor_num)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct inode_val sample;
&lt;br&gt;@@ -732,7 +732,7 @@ find_inode_file (unsigned long node_num, unsigned long major_num,
&lt;br&gt;&amp;nbsp;/* Associate FILE_NAME with the inode NODE_NUM. &amp;nbsp;(Insert into hash table.) &amp;nbsp;*/
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;void
&lt;br&gt;-add_inode (unsigned long node_num, char *file_name, unsigned long major_num,
&lt;br&gt;+add_inode (ino_t node_num, char *file_name, unsigned long major_num,
&lt;br&gt;&amp;nbsp;	 &amp;nbsp; unsigned long minor_num)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct inode_val *temp;
&lt;br&gt;-- 
&lt;br&gt;1.6.2.151.gdc0be
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Sincerely,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Stephen R. van den Berg.
&lt;br&gt;&lt;br&gt;&amp;quot;If he learns from his mistakes, pretty soon he'll know everything.&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Consistently-use-ino_t-to-support-filesystems-with-inodes-wider-than-32-bits.-tp25710370p25710370.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25108002</id>
	<title>Re: cpio suggestion: --quick-exit</title>
	<published>2009-08-23T11:41:19Z</published>
	<updated>2009-08-23T11:41:19Z</updated>
	<author>
		<name>Carl Sopchak</name>
	</author>
	<content type="html">Tim,
&lt;br&gt;&lt;br&gt;Thanks for the feedback. &amp;nbsp;
&lt;br&gt;&lt;br&gt;I don't think --occurrence is equivalent to what I'm trying to achieve, as it 
&lt;br&gt;sounds like cpio would still have to read the entire archive (which is what 
&lt;br&gt;I'm trying to avoid) if a wildcard is specified.
&lt;br&gt;&lt;br&gt;It sounds like my --quick-exit is of the same vein as --fast-read. &amp;nbsp;However, 
&lt;br&gt;the description provided sounds to me (I'm no expert by any means) like if I 
&lt;br&gt;requested a restore of &amp;quot;home/carl/*&amp;quot; using --fast-read then I'd only get the 
&lt;br&gt;first file matched (not the entire subtree) which is not what I'm looking 
&lt;br&gt;for. &amp;nbsp;If this is an incorrect interpretation, then I think the two are the 
&lt;br&gt;same, and using --fast-read instead of --quick-exit in cpio is fine with me. &amp;nbsp;
&lt;br&gt;(Although, IMHO, --quick-exit more aptly describes its function...)
&lt;br&gt;&lt;br&gt;I am also not familiar with all of the flavors of tar, so I do not know how 
&lt;br&gt;directories are visited in each. &amp;nbsp;But then again, cpio doesn't even do tree 
&lt;br&gt;traversal (you have to feed it file names to back up). &amp;nbsp;This option could be 
&lt;br&gt;available for archives that have been purposefully structured to take 
&lt;br&gt;advantage of it, like my full and daily backups.
&lt;br&gt;&lt;br&gt;I'm somewhat baffled by the &amp;quot;rife for confusion&amp;quot; remark. &amp;nbsp;I think it could be 
&lt;br&gt;explained quite suscinctly: &amp;nbsp;&amp;quot;If a wildcard is used to specify the files to 
&lt;br&gt;be restored and --quick-exit [for --fast-read] is specified, the archive will 
&lt;br&gt;be read until the first file matches. &amp;nbsp;Subsequent files will be restored 
&lt;br&gt;until the path up to the wildcard specification changes in the archive, at 
&lt;br&gt;which point cpio will exit unless there are other paths specified on the 
&lt;br&gt;command line that have not been restored. &amp;nbsp;For example...&amp;quot;
&lt;br&gt;&lt;br&gt;Is there a design philosophy for cpio that it remain as close to tar in 
&lt;br&gt;command line options and mode of operation as possible? &amp;nbsp;I realize the 
&lt;br&gt;benefit of this consistency, but they are different programs, after all...
&lt;br&gt;&lt;br&gt;Anyway, it sounds like this is a do-able change. &amp;nbsp;Any other comments, 
&lt;br&gt;suggestions, or pointers as to how I might proceed?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;Carl
&lt;br&gt;&lt;br&gt;On Saturday, August 22, 2009, Tim Kientzle wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Carl Sopchak wrote:
&lt;br&gt;&amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This is a suggestion for a new option to cpio, --quick-exit. &amp;nbsp;The purpose
&lt;br&gt;&amp;gt; &amp;gt; of the option is to exit cpio as soon as the requested file(s) have been
&lt;br&gt;&amp;gt; &amp;gt; restored, instead of reading all the way through the archive.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Perhaps it would be better to implement the GNU tar --occurrence
&lt;br&gt;&amp;gt; option:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;--occurrence[=NUMBER]
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; process only the NUMBERth occurrence of each file
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; in the archive; this option is valid only in
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conjunction with one of the subcommands --delete,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --diff, --extract or --list and when a list of
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; files is given either on the command line or via
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; the -T option; NUMBER defaults to 1
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; or the older --fast-read aka -q supported by FreeBSD's
&lt;br&gt;&amp;gt; tar (which used to be a patched GNU tar, since replaced
&lt;br&gt;&amp;gt; by bsdtar):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; -q (--fast-read)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (x and t mode only) Extract or list only the first archive entry
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; that matches each pattern or filename operand. &amp;nbsp;Exit as soon as
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; each specified pattern or filename has been matched. &amp;nbsp;By default,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; the archive is always read to the very end, since there can be
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; multiple entries with the same name and, by convention, later
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entries overwrite earlier entries. &amp;nbsp;This option is provided as a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; performance optimization.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Your notion of allowing this to work for specifying a directory
&lt;br&gt;&amp;gt; (exiting as soon as something outside of the directory is seen)
&lt;br&gt;&amp;gt; sounds rife for confusion, though. &amp;nbsp;Besides append operation,
&lt;br&gt;&amp;gt; it's a little dangerous to make strong assumptions about the
&lt;br&gt;&amp;gt; order in which items are written into archives. &amp;nbsp;(Witness the
&lt;br&gt;&amp;gt; very different orders that GNU tar, star, and bsdtar use
&lt;br&gt;&amp;gt; for visiting directories.)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Tim
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cpio-suggestion%3A---quick-exit-tp25096090p25108002.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25099307</id>
	<title>Re: cpio suggestion: --quick-exit</title>
	<published>2009-08-22T17:55:21Z</published>
	<updated>2009-08-22T17:55:21Z</updated>
	<author>
		<name>Tim Kientzle</name>
	</author>
	<content type="html">Carl Sopchak wrote:
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This is a suggestion for a new option to cpio, --quick-exit. &amp;nbsp;The purpose of 
&lt;br&gt;&amp;gt; the option is to exit cpio as soon as the requested file(s) have been 
&lt;br&gt;&amp;gt; restored, instead of reading all the way through the archive.
&lt;br&gt;&lt;br&gt;Perhaps it would be better to implement the GNU tar --occurrence
&lt;br&gt;option:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;--occurrence[=NUMBER]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; process only the NUMBERth occurrence of each file
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; in the archive; this option is valid only in
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conjunction with one of the subcommands --delete,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --diff, --extract or --list and when a list of
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; files is given either on the command line or via
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; the -T option; NUMBER defaults to 1
&lt;br&gt;&lt;br&gt;or the older --fast-read aka -q supported by FreeBSD's
&lt;br&gt;tar (which used to be a patched GNU tar, since replaced
&lt;br&gt;by bsdtar):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; -q (--fast-read)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (x and t mode only) Extract or list only the first archive entry
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; that matches each pattern or filename operand. &amp;nbsp;Exit as soon as
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; each specified pattern or filename has been matched. &amp;nbsp;By default,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; the archive is always read to the very end, since there can be
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; multiple entries with the same name and, by convention, later
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; entries overwrite earlier entries. &amp;nbsp;This option is provided as a
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; performance optimization.
&lt;br&gt;&lt;br&gt;Your notion of allowing this to work for specifying a directory
&lt;br&gt;(exiting as soon as something outside of the directory is seen)
&lt;br&gt;sounds rife for confusion, though. &amp;nbsp;Besides append operation,
&lt;br&gt;it's a little dangerous to make strong assumptions about the
&lt;br&gt;order in which items are written into archives. &amp;nbsp;(Witness the
&lt;br&gt;very different orders that GNU tar, star, and bsdtar use
&lt;br&gt;for visiting directories.)
&lt;br&gt;&lt;br&gt;Tim
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cpio-suggestion%3A---quick-exit-tp25096090p25099307.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25096090</id>
	<title>cpio suggestion: --quick-exit</title>
	<published>2009-08-21T11:18:11Z</published>
	<updated>2009-08-21T11:18:11Z</updated>
	<author>
		<name>Carl Sopchak</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;This is a suggestion for a new option to cpio, --quick-exit. &amp;nbsp;The purpose of 
&lt;br&gt;the option is to exit cpio as soon as the requested file(s) have been 
&lt;br&gt;restored, instead of reading all the way through the archive. &amp;nbsp;The theory 
&lt;br&gt;behind it is that the archive is more or less organized by directory, and 
&lt;br&gt;once you pass the end of a directory in the archive, it won't appear again. &amp;nbsp;
&lt;br&gt;This obviously assumes that the --append option wasn't used. &amp;nbsp;If it was with 
&lt;br&gt;the archive (or if you didn't know), you would not use the --quick-exit 
&lt;br&gt;option. &amp;nbsp;Also, it would only be useful if a wildcard character in the file(s) 
&lt;br&gt;to be restored were at least one directory down from the root of the archive, 
&lt;br&gt;or if there were no wildcard characters at all.
&lt;br&gt;&lt;br&gt;For example, if cpio was invoked with
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cpio --extract --quick-exit &amp;quot;home/carl/*&amp;quot;
&lt;br&gt;cpio would scan the archive until it came to the home/carl directory, restore 
&lt;br&gt;all of the contents of that directly, then immediately exit.
&lt;br&gt;&lt;br&gt;To be honest, I'm kinda suprised that this hasn't been though of before. &amp;nbsp;Is 
&lt;br&gt;there a reason why this would be impractical to implement?
&lt;br&gt;&lt;br&gt;I would consider implementing this option, as it would benefit me, but I would 
&lt;br&gt;need someone to point me in the right direction...
&lt;br&gt;&lt;br&gt;Thanks for the consideration,
&lt;br&gt;&lt;br&gt;Carl
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cpio-suggestion%3A---quick-exit-tp25096090p25096090.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24757725</id>
	<title>Re: Re: Bug#325989: cpio: -iv reports filename when &quot;newer or same age version exists&quot;</title>
	<published>2009-07-31T07:47:45Z</published>
	<updated>2009-07-31T07:47:45Z</updated>
	<author>
		<name>Sergey Poznyakoff-2</name>
	</author>
	<content type="html">Clint Adams &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24757725&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;schizo@...&lt;/a&gt;&amp;gt; ha escrit:
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt; With 2.5-1.2 and before, the line &amp;quot;foo&amp;quot; was not present. &amp;nbsp;Only
&lt;br&gt;&amp;gt; &amp;gt; files actually copied should be reported.
&lt;br&gt;&lt;br&gt;This behavior is consistent with that of GNU tar.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Sergey
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Bug-325989%3A-cpio%3A--iv-reports-filename-when-%22newer-or-same-age-version-exists%22-tp24128242p24757725.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24757679</id>
	<title>Re: Re: Bug#458079: cpio 2.9.90-2</title>
	<published>2009-07-31T07:46:25Z</published>
	<updated>2009-07-31T07:46:25Z</updated>
	<author>
		<name>Sergey Poznyakoff-2</name>
	</author>
	<content type="html">Clint Adams &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24757679&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;schizo@...&lt;/a&gt;&amp;gt; ha escrit:
&lt;br&gt;&lt;br&gt;&amp;gt; This behavior also applies to cpio 2.10
&lt;br&gt;&lt;br&gt;Fixed in the repository.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Sergey
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Bug-458079%3A-cpio-2.9.90-2-tp24128221p24757679.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24753962</id>
	<title>cpio-2.10.90 (alpha) available</title>
	<published>2009-07-31T02:59:44Z</published>
	<updated>2009-07-31T02:59:44Z</updated>
	<author>
		<name>Sergey Poznyakoff-2</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;Please be informed that a new alpha version of cpio (cpio-2.10.90) is
&lt;br&gt;available for download from ftp://alpha.gnu.org/gnu/cpio. 
&lt;br&gt;This version fixes build problems discovered recently
&lt;br&gt;by Peter Breitenlohner.
&lt;br&gt;&lt;br&gt;Here are the compressed sources:
&lt;br&gt;&amp;nbsp; ftp://alpha.gnu.org/gnu/cpio/cpio-2.10.90.tar.gz &amp;nbsp; (1.3MB)
&lt;br&gt;&amp;nbsp; ftp://alpha.gnu.org/gnu/cpio/cpio-2.10.90.tar.bz2 &amp;nbsp;(929KB)
&lt;br&gt;&lt;br&gt;Here are the GPG detached signatures[*]:
&lt;br&gt;&amp;nbsp; ftp://alpha.gnu.org/gnu/cpio/cpio-2.10.90.tar.gz.sig
&lt;br&gt;&amp;nbsp; ftp://alpha.gnu.org/gnu/cpio/cpio-2.10.90.tar.bz2.sig
&lt;br&gt;&lt;br&gt;Here are the MD5 and SHA1 checksums:
&lt;br&gt;&lt;br&gt;f5a2733acd0f7ce32df427b72ada10a9 &amp;nbsp;cpio-2.10.90.tar.gz
&lt;br&gt;213f6a0ecdcd3d3512ce23e43bdccf67 &amp;nbsp;cpio-2.10.90.tar.bz2
&lt;br&gt;b72e037d2dc34d795e2e8e30a806484832019276 &amp;nbsp;cpio-2.10.90.tar.gz
&lt;br&gt;a56bd3f80a33181318e87967afa9116a952bcfe0 &amp;nbsp;cpio-2.10.90.tar.bz2
&lt;br&gt;&lt;br&gt;[*] You can use either of the above signature files to verify that
&lt;br&gt;the corresponding file (without the .sig suffix) is intact. &amp;nbsp;First,
&lt;br&gt;be sure to download both the .sig file and the corresponding tarball.
&lt;br&gt;Then, run a command like this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; gpg --verify cpio-2.10.90.tar.gz.sig
&lt;br&gt;&lt;br&gt;If that command fails because you don't have the required public key,
&lt;br&gt;then run this command to import it:
&lt;br&gt;&lt;br&gt;&amp;nbsp; gpg --keyserver keys.gnupg.net --recv-keys 55D0C732
&lt;br&gt;&lt;br&gt;and rerun the `gpg --verify' command.
&lt;br&gt;&lt;br&gt;This release was bootstrapped with the following tools:
&lt;br&gt;&amp;nbsp; Autoconf 2.63
&lt;br&gt;&amp;nbsp; Automake 1.11
&lt;br&gt;&amp;nbsp; Gnulib-tool 0.0.2231-836f3
&lt;br&gt;&amp;nbsp; Makeinfo 4.13
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Sergey
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cpio-2.10----building-mt-fails-badly-tp24742068p24753962.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24757269</id>
	<title>Re: cpio-2.10 -- building mt fails badly</title>
	<published>2009-07-31T02:00:21Z</published>
	<updated>2009-07-31T02:00:21Z</updated>
	<author>
		<name>Peter Breitenlohner</name>
	</author>
	<content type="html">On Fri, 31 Jul 2009, Sergey Poznyakoff wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; my attempt to build mt as part of cpio-2.10 failed badly:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks for reporting. Please, apply the attached patch.
&lt;br&gt;&lt;br&gt;Hi Sergey,
&lt;br&gt;&lt;br&gt;works nicely. Thanks for your quick answer.
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Peter
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cpio-2.10----building-mt-fails-badly-tp24742068p24757269.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24752448</id>
	<title>Re: cpio-2.10 -- building mt fails badly</title>
	<published>2009-07-31T00:45:29Z</published>
	<updated>2009-07-31T00:45:29Z</updated>
	<author>
		<name>Sergey Poznyakoff-2</name>
	</author>
	<content type="html">Peter Breitenlohner &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24752448&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;peb@...&lt;/a&gt;&amp;gt; ha escrit:
&lt;br&gt;&lt;br&gt;&amp;gt; my attempt to build mt as part of cpio-2.10 failed badly:
&lt;br&gt;&lt;br&gt;Thanks for reporting. Please, apply the attached patch.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Sergey
&lt;br&gt;&lt;br&gt;&lt;br /&gt;diff --git a/src/mt.c b/src/mt.c
&lt;br&gt;index 5d128a9..e0a3883 100644
&lt;br&gt;--- a/src/mt.c
&lt;br&gt;+++ b/src/mt.c
&lt;br&gt;@@ -73,7 +73,7 @@
&lt;br&gt;&amp;nbsp;#include &amp;lt;stdbool.h&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;#ifdef HAVE_LOCALE_H
&lt;br&gt;-# &amp;nbsp;include &amp;lt;locale.h&amp;gt;
&lt;br&gt;+# include &amp;lt;locale.h&amp;gt;
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;#include &amp;lt;rmt-command.h&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -105,10 +105,27 @@ int atoi ();
&lt;br&gt;&amp;nbsp;void exit ();
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-char *opnames[] =
&lt;br&gt;+#include &amp;lt;argmatch.h&amp;gt;
&lt;br&gt;+#include &amp;lt;paxlib.h&amp;gt;
&lt;br&gt;+#include &amp;quot;configmake.h&amp;quot;
&lt;br&gt;+
&lt;br&gt;+#define MT_EXIT_SUCCESS 0
&lt;br&gt;+#define MT_EXIT_INVOP &amp;nbsp; 1
&lt;br&gt;+#define MT_EXIT_FAILURE 2
&lt;br&gt;+
&lt;br&gt;+char const * const opnames[] =
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;- &amp;nbsp;&amp;quot;eof&amp;quot;, &amp;quot;weof&amp;quot;, &amp;quot;fsf&amp;quot;, &amp;quot;bsf&amp;quot;, &amp;quot;fsr&amp;quot;, &amp;quot;bsr&amp;quot;,
&lt;br&gt;- &amp;nbsp;&amp;quot;rewind&amp;quot;, &amp;quot;offline&amp;quot;, &amp;quot;rewoffl&amp;quot;, &amp;quot;eject&amp;quot;, &amp;quot;status&amp;quot;,
&lt;br&gt;+ &amp;nbsp;&amp;quot;eof&amp;quot;,
&lt;br&gt;+ &amp;nbsp;&amp;quot;weof&amp;quot;,
&lt;br&gt;+ &amp;nbsp;&amp;quot;fsf&amp;quot;,
&lt;br&gt;+ &amp;nbsp;&amp;quot;bsf&amp;quot;,
&lt;br&gt;+ &amp;nbsp;&amp;quot;fsr&amp;quot;,
&lt;br&gt;+ &amp;nbsp;&amp;quot;bsr&amp;quot;,
&lt;br&gt;+ &amp;nbsp;&amp;quot;rewind&amp;quot;,
&lt;br&gt;+ &amp;nbsp;&amp;quot;offline&amp;quot;,
&lt;br&gt;+ &amp;nbsp;&amp;quot;rewoffl&amp;quot;,
&lt;br&gt;+ &amp;nbsp;&amp;quot;eject&amp;quot;,
&lt;br&gt;+ &amp;nbsp;&amp;quot;status&amp;quot;,
&lt;br&gt;&amp;nbsp;#ifdef MTBSFM
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;quot;bsfm&amp;quot;,
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;@@ -134,8 +151,17 @@ char *opnames[] =
&lt;br&gt;&amp;nbsp;#define MTASF 600		/* Random unused number. &amp;nbsp;*/
&lt;br&gt;&amp;nbsp;short operations[] =
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;- &amp;nbsp;MTWEOF, MTWEOF, MTFSF, MTBSF, MTFSR, MTBSR,
&lt;br&gt;- &amp;nbsp;MTREW, MTOFFL, MTOFFL, MTOFFL, MTNOP,
&lt;br&gt;+ &amp;nbsp;MTWEOF,
&lt;br&gt;+ &amp;nbsp;MTWEOF,
&lt;br&gt;+ &amp;nbsp;MTFSF,
&lt;br&gt;+ &amp;nbsp;MTBSF,
&lt;br&gt;+ &amp;nbsp;MTFSR,
&lt;br&gt;+ &amp;nbsp;MTBSR,
&lt;br&gt;+ &amp;nbsp;MTREW,
&lt;br&gt;+ &amp;nbsp;MTOFFL,
&lt;br&gt;+ &amp;nbsp;MTOFFL,
&lt;br&gt;+ &amp;nbsp;MTOFFL,
&lt;br&gt;+ &amp;nbsp;MTNOP,
&lt;br&gt;&amp;nbsp;#ifdef MTBSFM
&lt;br&gt;&amp;nbsp; &amp;nbsp;MTBSFM,
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;@@ -155,9 +181,10 @@ short operations[] =
&lt;br&gt;&amp;nbsp;#ifdef MTSEEK
&lt;br&gt;&amp;nbsp; &amp;nbsp;MTSEEK,
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;- &amp;nbsp;0
&lt;br&gt;&amp;nbsp;};
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+ARGMATCH_VERIFY (opnames, operations);
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;struct option longopts[] =
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;{&amp;quot;file&amp;quot;, 1, NULL, 'f'},
&lt;br&gt;@@ -180,8 +207,9 @@ check_type (char *dev, int desc)
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (fstat (desc, &amp;stats) == -1)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;stat_error (dev);
&lt;br&gt;&amp;nbsp; &amp;nbsp;if ((stats.st_mode &amp; S_IFMT) != S_IFCHR)
&lt;br&gt;- &amp;nbsp; &amp;nbsp;error (1, 0, _(&amp;quot;%s is not a character special file&amp;quot;), dev);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;error (MT_EXIT_INVOP, 0, _(&amp;quot;%s is not a character special file&amp;quot;), dev);
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;void
&lt;br&gt;&amp;nbsp;perform_operation (char *dev, int desc, short op, int count)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;@@ -193,7 +221,7 @@ perform_operation (char *dev, int desc, short op, int count)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; error, not 0. &amp;nbsp;This bug has been reported to
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24752448&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bug-gnu-utils@...&lt;/a&gt;&amp;quot;. &amp;nbsp;(96/7/10) -BEM */
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (rmtioctl (desc, MTIOCTOP, (char*)&amp;control) == -1)
&lt;br&gt;- &amp;nbsp; &amp;nbsp;error (2, errno, _(&amp;quot;%s: rmtioctl failed&amp;quot;), dev);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;error (MT_EXIT_FAILURE, errno, _(&amp;quot;%s: rmtioctl failed&amp;quot;), dev);
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;void
&lt;br&gt;@@ -202,7 +230,7 @@ print_status (char *dev, int desc)
&lt;br&gt;&amp;nbsp; &amp;nbsp;struct mtget status;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (rmtioctl (desc, MTIOCGET, (char*)&amp;status) == -1)
&lt;br&gt;- &amp;nbsp; &amp;nbsp;error (2, errno, _(&amp;quot;%s: rmtioctl failed&amp;quot;), dev);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;error (MT_EXIT_FAILURE, errno, _(&amp;quot;%s: rmtioctl failed&amp;quot;), dev);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;printf (&amp;quot;drive type = %d\n&amp;quot;, (int) status.mt_type);
&lt;br&gt;&amp;nbsp;#if defined(hpux) || defined(__hpux)
&lt;br&gt;@@ -220,7 +248,7 @@ print_status (char *dev, int desc)
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;void
&lt;br&gt;-usage (FILE *fp,int status)
&lt;br&gt;+usage (FILE *fp, int status)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;fprintf (fp, _(&amp;quot;\
&lt;br&gt;&amp;nbsp;Usage: %s [-V] [-f device] [--file=device] [--rsh-command=command]\n\
&lt;br&gt;@@ -229,6 +257,12 @@ Usage: %s [-V] [-f device] [--file=device] [--rsh-command=command]\n\
&lt;br&gt;&amp;nbsp; &amp;nbsp;exit (status);
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+void
&lt;br&gt;+fatal_exit ()
&lt;br&gt;+{
&lt;br&gt;+ &amp;nbsp;exit (MT_EXIT_INVOP);
&lt;br&gt;+}
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;int
&lt;br&gt;&amp;nbsp;main (int argc, char **argv)
&lt;br&gt;&amp;nbsp;{
&lt;br&gt;@@ -264,23 +298,23 @@ main (int argc, char **argv)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	case 'V':
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;printf (&amp;quot;mt (%s)\n&amp;quot;, PACKAGE_STRING);
&lt;br&gt;-	 &amp;nbsp;exit (0);
&lt;br&gt;+	 &amp;nbsp;exit (MT_EXIT_SUCCESS);
&lt;br&gt;&amp;nbsp;	 &amp;nbsp;break;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;	case 'H':
&lt;br&gt;&amp;nbsp;	default:
&lt;br&gt;-	 &amp;nbsp;usage (stdout, 0);
&lt;br&gt;+	 &amp;nbsp;usage (stdout, MT_EXIT_SUCCESS);
&lt;br&gt;&amp;nbsp;	}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (optind == argc)
&lt;br&gt;- &amp;nbsp; &amp;nbsp;usage (stderr, 1);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;usage (stderr, MT_EXIT_INVOP);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp;i = argmatch (argv[optind], opnames);
&lt;br&gt;+ &amp;nbsp;i = ARGMATCH (argv[optind], opnames, operations);
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (i &amp;lt; 0)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;argmatch_invalid (&amp;quot;tape operation&amp;quot;, argv[optind], i);
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp;exit (1);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp;exit (MT_EXIT_INVOP);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp;operation = operations[i];
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -295,7 +329,7 @@ main (int argc, char **argv)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;count = atoi (argv[optind]);
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (++optind &amp;lt; argc)
&lt;br&gt;- &amp;nbsp; &amp;nbsp;usage (stderr, 1);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;usage (stderr, MT_EXIT_INVOP);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (tapedev == NULL)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;@@ -304,7 +338,7 @@ main (int argc, char **argv)
&lt;br&gt;&amp;nbsp;#ifdef DEFTAPE			/* From sys/mtio.h. &amp;nbsp;*/
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tapedev = DEFTAPE;
&lt;br&gt;&amp;nbsp;#else
&lt;br&gt;-	error (1, 0, _(&amp;quot;no tape device specified&amp;quot;));
&lt;br&gt;+	error (MT_EXIT_INVOP, 0, _(&amp;quot;no tape device specified&amp;quot;));
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;@@ -317,7 +351,7 @@ main (int argc, char **argv)
&lt;br&gt;&amp;nbsp; &amp;nbsp;else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;tapedesc = rmtopen (tapedev, O_RDONLY, 0, rsh_command_option);
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (tapedesc == -1)
&lt;br&gt;- &amp;nbsp; &amp;nbsp;error (1, errno, _(&amp;quot;%s: rmtopen failed&amp;quot;), tapedev);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;error (MT_EXIT_INVOP, errno, _(&amp;quot;%s: rmtopen failed&amp;quot;), tapedev);
&lt;br&gt;&amp;nbsp; &amp;nbsp;check_type (tapedev, tapedesc);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (operation == MTASF)
&lt;br&gt;@@ -330,8 +364,8 @@ main (int argc, char **argv)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;print_status (tapedev, tapedesc);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp;if (rmtclose (tapedesc) == -1)
&lt;br&gt;- &amp;nbsp; &amp;nbsp;error (2, errno, _(&amp;quot;%s: rmtclose failed&amp;quot;), tapedev);
&lt;br&gt;+ &amp;nbsp; &amp;nbsp;error (MT_EXIT_FAILURE, errno, _(&amp;quot;%s: rmtclose failed&amp;quot;), tapedev);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;- &amp;nbsp;exit (0);
&lt;br&gt;+ &amp;nbsp;exit (MT_EXIT_SUCCESS);
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cpio-2.10----building-mt-fails-badly-tp24742068p24752448.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24742073</id>
	<title>Re: cpio-2.10 -- building mt fails badly</title>
	<published>2009-07-30T05:37:02Z</published>
	<updated>2009-07-30T05:37:02Z</updated>
	<author>
		<name>Peter Breitenlohner</name>
	</author>
	<content type="html">On Thu, 30 Jul 2009, Peter Breitenlohner wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; attached is a small patch addressing the points 1, 2, and 4.
&lt;br&gt;&lt;br&gt;Sorry, I forgot to attach the patch.
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Peter Breitenlohner &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24742073&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;peb@...&lt;/a&gt;&amp;gt;&lt;br /&gt;diff -ur cpio-2.10.orig/src/Makefile.am cpio-2.10/src/Makefile.am
&lt;br&gt;--- cpio-2.10.orig/src/Makefile.am	2009-06-19 11:24:50.000000000 +0200
&lt;br&gt;+++ cpio-2.10/src/Makefile.am	2009-07-29 18:27:31.000000000 +0200
&lt;br&gt;@@ -37,6 +37,10 @@
&lt;br&gt;&amp;nbsp; makepath.c\
&lt;br&gt;&amp;nbsp; userspec.c
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+mt_SOURCES = \
&lt;br&gt;+ fatal.c\
&lt;br&gt;+ mt.c
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;noinst_HEADERS =\
&lt;br&gt;&amp;nbsp; cpio.h\
&lt;br&gt;&amp;nbsp; cpiohdr.h\
&lt;br&gt;@@ -50,4 +54,4 @@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;LDADD=../lib/libpax.a ../gnu/libgnu.a @INTLLIBS@
&lt;br&gt;&amp;nbsp;
&lt;br&gt;-mt.o main.o: ../lib/rmt-command.h
&lt;br&gt;+mt.$(OBJEXT) main.$(OBJEXT): ../lib/rmt-command.h
&lt;br&gt;diff -ur cpio-2.10.orig/src/mt.c cpio-2.10/src/mt.c
&lt;br&gt;--- cpio-2.10.orig/src/mt.c	2009-02-14 19:15:50.000000000 +0100
&lt;br&gt;+++ cpio-2.10/src/mt.c	2009-07-29 18:36:50.000000000 +0200
&lt;br&gt;@@ -77,6 +77,9 @@
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;&amp;nbsp;#include &amp;lt;rmt-command.h&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;+#include &amp;quot;configmake.h&amp;quot;
&lt;br&gt;+#include &amp;quot;paxlib.h&amp;quot;
&lt;br&gt;+
&lt;br&gt;&amp;nbsp;#if defined(HAVE_UNISTD_H)
&lt;br&gt;&amp;nbsp;#include &amp;lt;unistd.h&amp;gt;
&lt;br&gt;&amp;nbsp;#endif
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cpio-2.10----building-mt-fails-badly-tp24742068p24742073.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24742068</id>
	<title>cpio-2.10 -- building mt fails badly</title>
	<published>2009-07-30T05:34:41Z</published>
	<updated>2009-07-30T05:34:41Z</updated>
	<author>
		<name>Peter Breitenlohner</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;my attempt to build mt as part of cpio-2.10 failed badly:
&lt;br&gt;&lt;br&gt;(1) src/mt.c must include &amp;quot;configmake.h&amp;quot; in order to define LOCALEDIR
&lt;br&gt;and &amp;quot;paxlib.h&amp;quot; in order to define xxx (don't remember).
&lt;br&gt;&lt;br&gt;(2) mt_SOURCES should be declared to include mt.c and fatal.c
&lt;br&gt;&lt;br&gt;according to the ChangeLog fatal.c used to be in lib/ and thus be part of
&lt;br&gt;libcpio.a, why has this been changed.
&lt;br&gt;&lt;br&gt;(3) when compiling mt.c, there are implicit declarations of `argmatch' and
&lt;br&gt;`argmatch_invalid'. &amp;nbsp;I do, however, get an `mt' executable, but...
&lt;br&gt;&lt;br&gt;Including argmatch.h makes thing only worse because the use of argmatch in
&lt;br&gt;mt.c(main) is incompatible with the definition in gnu/argmatch.[ch].
&lt;br&gt;&lt;br&gt;Thus the `mt' execuatble almost certainly is bad, will segfault or...
&lt;br&gt;&lt;br&gt;(4) a minor final item: the explicit dependency in src/Makefile.am should
&lt;br&gt;use '.$(OBJEXT)' instead of '.o' (for cygwin).
&lt;br&gt;&lt;br&gt;==================
&lt;br&gt;&lt;br&gt;attached is a small patch addressing the points 1, 2, and 4.
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Peter Breitenlohner &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24742068&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;peb@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/cpio-2.10----building-mt-fails-badly-tp24742068p24742068.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24142697</id>
	<title>Re: -lnsl needed, cpio 2.10, Solaris 9</title>
	<published>2009-06-22T00:16:44Z</published>
	<updated>2009-06-22T00:16:44Z</updated>
	<author>
		<name>Sergey Poznyakoff-2</name>
	</author>
	<content type="html">Zube &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24142697&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Zube@...&lt;/a&gt;&amp;gt; ha escrit:
&lt;br&gt;&lt;br&gt;&amp;gt; On Solaris 9, cpio 2.10 fails to compile because it cannot find 
&lt;br&gt;&amp;gt; gethostbyname during the final link. &amp;nbsp;Adding -lnsl to the LIBS line in
&lt;br&gt;&amp;gt; src/Makefile fixes the issue.
&lt;br&gt;&lt;br&gt;Thanks for reporting.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Sergey
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-lnsl-needed%2C-cpio-2.10%2C-Solaris-9-tp24136391p24142697.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24142667</id>
	<title>Re: found resource leaks</title>
	<published>2009-06-22T00:14:00Z</published>
	<updated>2009-06-22T00:14:00Z</updated>
	<author>
		<name>Sergey Poznyakoff-2</name>
	</author>
	<content type="html">Hi Martin,
&lt;br&gt;&lt;br&gt;&amp;gt; [cpio-2.10/src/copyin.c:1583]: (error) Resource leak: tty_in
&lt;br&gt;&amp;gt; [cpio-2.10/src/copyin.c:1583]: (error) Resource leak: tty_out
&lt;br&gt;&amp;gt; [cpio-2.10/src/copyin.c:1583]: (error) Resource leak: rename_in
&lt;br&gt;&lt;br&gt;They will be closed when the program finishes and that happens
&lt;br&gt;right after process_copy_in returns.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Sergey
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/found-resource-leaks-tp24136390p24142667.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24136391</id>
	<title>-lnsl needed, cpio 2.10, Solaris 9</title>
	<published>2009-06-21T05:04:36Z</published>
	<updated>2009-06-21T05:04:36Z</updated>
	<author>
		<name>Zube</name>
	</author>
	<content type="html">On Solaris 9, cpio 2.10 fails to compile because it cannot find 
&lt;br&gt;gethostbyname during the final link. &amp;nbsp;Adding -lnsl to the LIBS line in
&lt;br&gt;src/Makefile fixes the issue.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Zube
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-lnsl-needed%2C-cpio-2.10%2C-Solaris-9-tp24136391p24136391.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24136390</id>
	<title>found resource leaks</title>
	<published>2009-06-20T16:46:42Z</published>
	<updated>2009-06-20T16:46:42Z</updated>
	<author>
		<name>Martin Ettl-2</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;i have checked the sources of the cpio-2.10 &amp;nbsp;library with the static code analysis tool cppcheck. It found little issues:
&lt;br&gt;&lt;br&gt;[cpio-2.10/src/copyin.c:1583]: (error) Resource leak: tty_in
&lt;br&gt;[cpio-2.10/src/copyin.c:1583]: (error) Resource leak: tty_out
&lt;br&gt;[cpio-2.10/src/copyin.c:1583]: (error) Resource leak: rename_in
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Take a loop at file copyin.c at line 1583:
&lt;br&gt;....
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;The function ends without flcose the opened file pointers. A possible fix might be :
&lt;br&gt;&lt;br&gt;...
&lt;br&gt;&amp;nbsp;if(tty_in!=NULL) fclose(tty_in);
&lt;br&gt;&amp;nbsp;if(tty_out!=NULL) fclose(tty_out);
&lt;br&gt;&amp;nbsp;if(rename_in!=NULL) fclose(rename_in);
&lt;br&gt;...
&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;&lt;br&gt;Ettl Martin
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
&lt;br&gt;Jetzt freischalten unter &lt;a href=&quot;http://portal.gmx.net/de/go/maxdome01&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://portal.gmx.net/de/go/maxdome01&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/found-resource-leaks-tp24136390p24136390.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24128242</id>
	<title>Re: Bug#325989: cpio: -iv reports filename when &quot;newer or same age version exists&quot;</title>
	<published>2009-06-20T11:58:30Z</published>
	<updated>2009-06-20T11:58:30Z</updated>
	<author>
		<name>Clint Adams</name>
	</author>
	<content type="html">This behavior also applies to cpio 2.10.
&lt;br&gt;&lt;br&gt;On Wed, Aug 31, 2005 at 09:57:15PM -0700, W M Brelsford wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Beginning with 2.6-3 (2.6-1?):
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	$ touch foo
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	$ ls foo | cpio -o &amp;gt;foo.cpio
&lt;br&gt;&amp;gt; 	1 block
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	$ cpio -iv &amp;lt;foo.cpio
&lt;br&gt;&amp;gt; 	cpio: foo not created: newer or same age version exists
&lt;br&gt;&amp;gt; 	foo
&lt;br&gt;&amp;gt; 	1 block
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; With 2.5-1.2 and before, the line &amp;quot;foo&amp;quot; was not present. &amp;nbsp;Only
&lt;br&gt;&amp;gt; files actually copied should be reported.
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Bug-325989%3A-cpio%3A--iv-reports-filename-when-%22newer-or-same-age-version-exists%22-tp24128242p24128242.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24128221</id>
	<title>Re: Bug#458079: cpio 2.9.90-2</title>
	<published>2009-06-20T11:57:21Z</published>
	<updated>2009-06-20T11:57:21Z</updated>
	<author>
		<name>Clint Adams</name>
	</author>
	<content type="html">This behavior also applies to cpio 2.10
&lt;br&gt;&lt;br&gt;On Wed, Mar 04, 2009 at 08:10:18AM +0100, Dietmar Schroeter wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Unfortunately it is, at least in cpio_2.9.90-3 .
&lt;br&gt;&amp;gt; For your convenience, I append the modified testscript, which
&lt;br&gt;&amp;gt; delivers a definite yes or no as you can see in this example:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; $ pwd 
&lt;br&gt;&amp;gt; /root/cpio
&lt;br&gt;&amp;gt; $ ./cpio-bug 
&lt;br&gt;&amp;gt; 1 block
&lt;br&gt;&amp;gt; 1 block
&lt;br&gt;&amp;gt; drwx------
&lt;br&gt;&amp;gt; bad: bug still present in cpio
&lt;br&gt;&amp;gt; 1 block
&lt;br&gt;&amp;gt; 1 block
&lt;br&gt;&amp;gt; drwx------
&lt;br&gt;&amp;gt; bad: bug still present in /root/cpio/cpio
&lt;br&gt;&amp;gt; 1 block
&lt;br&gt;&amp;gt; 1 block
&lt;br&gt;&amp;gt; drwxr-xr-x
&lt;br&gt;&amp;gt; good: bug not found in /root/cpio/cpio-etch
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; And here comes the script (does not need root permissions):
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; #!/bin/sh
&lt;br&gt;&amp;gt; cpio_bugtest()
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; 	typeset cpioprog=&amp;quot;$1&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 	case &amp;quot;$cpioprog&amp;quot; in
&lt;br&gt;&amp;gt; 		/*)	;;
&lt;br&gt;&amp;gt; 		&amp;quot;&amp;quot;)	cpioprog=cpio # the system default
&lt;br&gt;&amp;gt; 			;;
&lt;br&gt;&amp;gt; 		*)	echo &amp;quot;please specify an absolute path for cpioprog&amp;quot; &amp;gt;&amp;2
&lt;br&gt;&amp;gt; 			return 1
&lt;br&gt;&amp;gt; 			;;
&lt;br&gt;&amp;gt; 	esac
&lt;br&gt;&amp;gt; 	testdir=&amp;quot;$(mktemp -d)&amp;quot; || return 11
&lt;br&gt;&amp;gt; 	trap &amp;quot;rm -rf $testdir&amp;quot; 0
&lt;br&gt;&amp;gt; 	umask 077
&lt;br&gt;&amp;gt; 	rm -rf wrongperms newdir
&lt;br&gt;&amp;gt; 	mkdir -m 755 &amp;quot;$testdir/wrongperms&amp;quot;
&lt;br&gt;&amp;gt; 	&amp;gt;&amp;quot;$testdir/wrongperms/file&amp;quot;
&lt;br&gt;&amp;gt; 	mkdir &amp;quot;$testdir/newdir&amp;quot;
&lt;br&gt;&amp;gt; 	(cd &amp;quot;$testdir&amp;quot; &amp;&amp; find wrongperms -depth | &amp;quot;$cpioprog&amp;quot; -oH newc) | (cd &amp;quot;$testdir/newdir&amp;quot; &amp;&amp; &amp;quot;$cpioprog&amp;quot; -imd)
&lt;br&gt;&amp;gt; 	#ls -laR &amp;quot;$testdir/wrongperms&amp;quot;
&lt;br&gt;&amp;gt; 	#ls -laR &amp;quot;$testdir/newdir&amp;quot;
&lt;br&gt;&amp;gt; 	perms=&amp;quot;$(ls -ld &amp;quot;$testdir/newdir/wrongperms&amp;quot;)&amp;quot;
&lt;br&gt;&amp;gt; 	perms=&amp;quot;${perms%% *}&amp;quot;
&lt;br&gt;&amp;gt; 	echo &amp;quot;$perms&amp;quot;
&lt;br&gt;&amp;gt; 	case &amp;quot;$perms&amp;quot; in
&lt;br&gt;&amp;gt; 		&amp;quot;drwx------&amp;quot;)	echo &amp;quot;bad: bug still present in $cpioprog&amp;quot; &amp;gt;&amp;2
&lt;br&gt;&amp;gt; 				rm -rf &amp;quot;$testdir&amp;quot;
&lt;br&gt;&amp;gt; 				trap &amp;quot;&amp;quot; 0
&lt;br&gt;&amp;gt; 				return 1
&lt;br&gt;&amp;gt; 				;;
&lt;br&gt;&amp;gt; 		&amp;quot;drwxr-xr-x&amp;quot;)	echo &amp;quot;good: bug not found in $cpioprog&amp;quot; &amp;gt;&amp;2
&lt;br&gt;&amp;gt; 				rm -rf &amp;quot;$testdir&amp;quot;
&lt;br&gt;&amp;gt; 				trap &amp;quot;&amp;quot; 0
&lt;br&gt;&amp;gt; 				return 0
&lt;br&gt;&amp;gt; 				;;
&lt;br&gt;&amp;gt; 		*)		echo &amp;quot;sorry: unknown state. Please debug testscript :-(&amp;quot; &amp;gt;&amp;2
&lt;br&gt;&amp;gt; 				rm -rf &amp;quot;$testdir&amp;quot;
&lt;br&gt;&amp;gt; 				trap &amp;quot;&amp;quot; 0
&lt;br&gt;&amp;gt; 				return 1
&lt;br&gt;&amp;gt; 				;;
&lt;br&gt;&amp;gt; 	esac
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; cpio_bugtest
&lt;br&gt;&amp;gt; cpio_bugtest $PWD/cpio
&lt;br&gt;&amp;gt; cpio_bugtest $PWD/cpio-etch
&lt;br&gt;&amp;gt; exit
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ### end of script ###
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Regards
&lt;br&gt;&amp;gt; 	Dietmar
&lt;/div&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Bug-458079%3A-cpio-2.9.90-2-tp24128221p24128221.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-24123263</id>
	<title>GNU cpio 2.10</title>
	<published>2009-06-20T01:55:17Z</published>
	<updated>2009-06-20T01:55:17Z</updated>
	<author>
		<name>Sergey Poznyakoff-2</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I am glad to announce the release of GNU cpio 2.10.
&lt;br&gt;&lt;br&gt;GNU cpio copies files into or out of a cpio or tar archive. It supports
&lt;br&gt;various archive formats, among them: binary, ASCII (both old and new),
&lt;br&gt;crc, HPUX binary, HPUX old ASCII, old tar, POSIX.1 tar. When extracting
&lt;br&gt;from archives, cpio automatically recognizes which kind of archive it is
&lt;br&gt;reading and can read archives created on machines with a different
&lt;br&gt;byte-order.
&lt;br&gt;&lt;br&gt;This release contains several bugfixes and improvements, among them:
&lt;br&gt;&lt;br&gt;* Ensure record headers are properly packed (fix builds on ARM).
&lt;br&gt;* Fix exit codes to reliably indicate success or failure of the operation.
&lt;br&gt;* Fix large file support.
&lt;br&gt;* Support MinGW builds.
&lt;br&gt;&lt;br&gt;I'd like to express my special thanks to Robert Millan, Clint Adams and
&lt;br&gt;Ladislav Michnovic for their reports, patches and suggestions.
&lt;br&gt;&lt;br&gt;For more information on cpio, including links to file downloads,
&lt;br&gt;please see the GNU cpio web page: &lt;a href=&quot;http://www.gnu.org/software/cpio&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gnu.org/software/cpio&lt;/a&gt;&lt;br&gt;and the the project page &lt;a href=&quot;http://savannah.gnu.org/projects/cpio&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://savannah.gnu.org/projects/cpio&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;Please email bugs or suggestions to &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=24123263&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bug-cpio@...&lt;/a&gt;&amp;gt;.
&lt;br&gt;&lt;br&gt;Here are the compressed sources:
&lt;br&gt;&amp;nbsp; ftp://ftp.gnu.org/gnu/cpio/cpio-2.10.tar.gz &amp;nbsp; &amp;nbsp;(1.3MB)
&lt;br&gt;&amp;nbsp; ftp://ftp.gnu.org/gnu/cpio/cpio-2.10.tar.bz2 &amp;nbsp; (932KB)
&lt;br&gt;&lt;br&gt;Here are the GPG detached signatures[*]:
&lt;br&gt;&amp;nbsp; ftp://ftp.gnu.org/gnu/cpio/cpio-2.10.tar.gz.sig
&lt;br&gt;&amp;nbsp; ftp://ftp.gnu.org/gnu/cpio/cpio-2.10.tar.bz2.sig
&lt;br&gt;&lt;br&gt;Here are the MD5 and SHA1 checksums:
&lt;br&gt;&lt;br&gt;351ab3d38d8949913e478cc23b9d6ad4 &amp;nbsp;cpio-2.10.tar.gz
&lt;br&gt;edd8d956a5dfb9a3b308fa07f302f691 &amp;nbsp;cpio-2.10.tar.bz2
&lt;br&gt;3d4639351b3c7a782e2a62db3645e756ca1f4614 &amp;nbsp;cpio-2.10.tar.gz
&lt;br&gt;a87f85c23697163000c656db9eb26a348aa3397b &amp;nbsp;cpio-2.10.tar.bz2
&lt;br&gt;&lt;br&gt;[*] You can use either of the above signature files to verify that
&lt;br&gt;the corresponding file (without the .sig suffix) is intact. &amp;nbsp;First,
&lt;br&gt;be sure to download both the .sig file and the corresponding tarball.
&lt;br&gt;Then, run a command like this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; gpg --verify cpio-2.10.tar.gz.sig
&lt;br&gt;&lt;br&gt;If that command fails because you don't have the required public key,
&lt;br&gt;then run this command to import it:
&lt;br&gt;&lt;br&gt;&amp;nbsp; gpg --keyserver keys.gnupg.net --recv-keys 55D0C732
&lt;br&gt;&lt;br&gt;and rerun the `gpg --verify' command.
&lt;br&gt;&lt;br&gt;This release was bootstrapped with the following tools:
&lt;br&gt;&amp;nbsp; Autoconf 2.63
&lt;br&gt;&amp;nbsp; Automake 1.11
&lt;br&gt;&amp;nbsp; Gnulib-tool 0.0.2213-b7976
&lt;br&gt;&amp;nbsp; Makeinfo 4.13
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Sergey
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/GNU-cpio-2.10-tp24123263p24123263.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23906511</id>
	<title>Re: grouping options</title>
	<published>2009-06-06T16:17:25Z</published>
	<updated>2009-06-06T16:17:25Z</updated>
	<author>
		<name>Karl Berry</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp; At the top of (info &amp;quot;(cpio)Options&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; say &amp;quot;To see a grouped list of these, use cpio --help.&amp;quot;
&lt;br&gt;&lt;br&gt;It would be better to improve the manual.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/grouping-options-tp23898815p23906511.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-23899326</id>
	<title>Re: Bug-cpio lost timestamp and lost owner in 2.9</title>
	<published>2009-06-06T00:08:27Z</published>
	<updated>2009-06-06T00:08:27Z</updated>
	<author>
		<name>Sergey Poznyakoff-2</name>
	</author>
	<content type="html">Hi Clint,
&lt;br&gt;&lt;br&gt;My apologies, I got terribly behind the schedule. I'm working on
&lt;br&gt;the new release and expect to make it ready next week. This time
&lt;br&gt;for sure :)
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Sergey
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-Bug-514936%3A-cpio-does-not-use-error-codes-on-exit-tp21982165p23899326.html" />
</entry>

</feed>
