bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-cpio] must we close all of stderr to avoid "truncating inodenum


From: Joerg Beyer
Subject: Re: [Bug-cpio] must we close all of stderr to avoid "truncating inodenum
Date: Tue, 30 Dec 2003 10:46:43 +0100

Sergey Poznyakoff wrote:
> 
> Dan Jacobson <address@hidden> wrote:
> 
> > There is no switch to turn off the annoying
> 
> Yep. It is in my TODO list and will soon be implemented.
> 
> Regards,
> Sergey

is it suitable to just use the quiet_flag? if so, would this 
patch fit?

    hope this helps
    Joerg

--- cpio-2.5-orig/copyout.c     Fri Dec  7 02:01:52 2001
+++ cpio-2.5/copyout.c  Tue Dec 30 10:41:11 2003
@@ -108,7 +108,7 @@
       int dev = 0, rdev = 0;
 #endif
 
-      if ((file_hdr->c_ino >> 16) != 0)
+      if ((!quiet_flag) && ((file_hdr->c_ino >> 16) != 0))
        error (0, 0, "%s: truncating inode number", file_hdr->c_name);
 
       /* Debian hack: The type of dev_t has changed in glibc.  Fixed output
@@ -138,7 +138,7 @@
       short_hdr.c_magic = 070707;
       short_hdr.c_dev = makedev (file_hdr->c_dev_maj, file_hdr->c_dev_min);
 
-      if ((file_hdr->c_ino >> 16) != 0)
+      if ((!quiet_flag) && ((file_hdr->c_ino >> 16) != 0))
        error (0, 0, "%s: truncating inode number", file_hdr->c_name);
 
       short_hdr.c_ino = file_hdr->c_ino & 0xFFFF;






reply via email to

[Prev in Thread] Current Thread [Next in Thread]