From: utzoo!decvax!genradbo!linus!smk
Newsgroups: net.bugs,net.unix-wizards
Title: cpio bug fix for 4.1bsd
Article-I.D.: linus.14864
Posted: Thu Mar 10 12:21:09 1983
Received: Fri Mar 11 04:13:53 1983


	Since many people are asking about cpio, we have had a version
that works on 4.1bsd for a long time.  Assuming you have the system 3
version of cpio.c (If you don't have system 3, I really can't send
you the source -- if you have the license, you have the source),
The main problem with converting from version 6-based cpio is that
the Filetype for the cpio in system 3 is a short, and should be an
int.  (At least I think it's Filetype -- I'm 95% sure.)  What
happens is with the d6 options of cpio (when xfering version 6-based
to version 7-based systems), sign extension occurs on the short
and anding with S_IFMT (which has the hi bit set) will not compare
with 060000.  Changing from short to int them works.
	You can get fancy and also change the system 3 pipe stuff to
mpx stuff so you can transfer all types of 4.1 files.