On Sat, Jan 16, 2010 at 05:09:45AM +0000, Clint Adams wrote: > > You mean something like this? > > > diff --git a/src/copyout.c b/src/copyout.c > index 98f3895..f0741f7 100644 > --- a/src/copyout.c > +++ b/src/copyout.c > @@ -121,7 +121,9 @@ count_defered_links_to_dev_ino (struct cpio_file_stat > *file_hdr) > for (d = deferouts; d != NULL; d = d->next) > { > if ( (d->header.c_ino == ino) && (d->header.c_dev_maj == maj) > - && (d->header.c_dev_min == min) ) > + && (d->header.c_dev_min == min) > + && ((d->header.c_mode & CP_IFBLK) != CP_IFBLK) > + && ((d->header.c_mode & CP_IFCHR) != CP_IFCHR) ) > ++count; > } > return count; > @@ -178,7 +180,9 @@ writeout_other_defers (struct cpio_file_stat *file_hdr, > int out_des) > while (d != NULL) > { > if ( (d->header.c_ino == ino) && (d->header.c_dev_maj == maj) > - && (d->header.c_dev_min == min) ) > + && (d->header.c_dev_min == min) > + && ((d->header.c_mode & CP_IFBLK) != CP_IFBLK) > + && ((d->header.c_mode & CP_IFCHR) != CP_IFCHR) ) > { > struct deferment *d_free; > d->header.c_filesize = 0;
Most excellent! Thank you, Clint! I'll try it out first thing Monday morning. I hadn't had a chance to download and poke through the cpio source yet, having only pinned down the bug clearly at 7:45 on a Friday evening of a long, crazy day of work. I was wondering if there's any likelihood of being tripped up by this on any other file types (sockets? fifos?). I spent a few minutes today poking through the Linux kernel source, but only found where directories get rejected for hard-linking. -------Carl -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org