bug-cpio
[Top][All Lists]
Advanced

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

[Bug-cpio] multiple tapes


From: Alain Williams
Subject: [Bug-cpio] multiple tapes
Date: Mon, 26 Jun 2006 15:05:01 +0100
User-agent: Mutt/1.4.1i

Cpio does not handle multiple tapes very well, when the end of tape is reached 
the
new tape is prompted for and writing just continues on the new tape - exactly 
where it
left off. This means that you really need to read all of the first tape first 
before
you can start on the second; however if you start on the second tape cpio will
realise that something is up and will seek a cpio header and come up with an 
error/warning
message like:

        cpio: warning: skipped 5276 bytes of junk

That might work most of the time, but what if the end of the last file on the 
previous
tape contains a cpio header ... cpio will resynchronise badly.

I note that in this situation GNU tar puts a special header at the start of the 
2nd tape
and so copes with it properly.

I propose that cpio work in the same way as tar and optionally put a header at 
the start of
the second tape. Optionally so that we can ensure compatability with non-gnu 
cpio.

The trouble is where to put the flag/... in the header to show that what we 
have is a
continuation file -- one idea is c_rdev_maj & c_rdev_min since these are only 
used with
device files (which only consist of a header anyway and so will never be big).

Another idea is to invent a new magic number: 070703 and corresponding header 
format:
this could cope with continuation files and also with large (> 2GB) files and 
perhaps
leave a spare word for 'future expansion'.

It doesn't look hugely difficult to do.

Comments ?

-- 
Alain Williams
Parliament Hill Computers Ltd.
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/

#include <std_disclaimer.h>




reply via email to

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