On Dec 13, 2007 10:29 AM, Sergey Poznyakoff <[EMAIL PROTECTED]> wrote:
> Bert Wesarg <[EMAIL PROTECTED]> ha escrit:
>
> > I have to archive files with a size of 0 and an st_mode of 0 (aka
> > ----------).
> >
> > The file is for me stat(2)'able, but is not included in the archive.
> >
> > Is this somehow possible?
>
> I'm afraid not. Neither cpio nor tar are able to handle this.
Thanks for your confirmation.
I currently use this patch which works for me:
diff --quilt old/src/copyout.c new/src/copyout.c
--- old/src/copyout.c
+++ new/src/copyout.c
@@ -724,11 +724,14 @@ process_copy_out ()
}
in_file_des = open (orig_file_name,
O_RDONLY | O_BINARY, 0);
if (in_file_des < 0)
{
- open_error (orig_file_name);
+ if (file_hdr.c_filesize == 0)
+ write_out_header (&file_hdr, out_file_des);
+ else
+ open_error (orig_file_name);
continue;
}
if (archive_format == arf_crcascii)
file_hdr.c_chksum = read_for_checksum (in_file_des,
Regards,
Bert
_______________________________________________
Bug-cpio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-cpio