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

Weird cpio bug



Try this:  
1.  Set up a sample directory, and some sample files

root@orson:/linux# mkdir test1
root@orson:/linux# cd test1
root@orson:/linux/test1# touch a
root@orson:/linux/test1# touch b
root@orson:/linux/test1# touch c
root@orson:/linux# cd ..
root@orson:/linux# touch d
root@orson:/linux# touch e
root@orson:/linux# ls
d     e       test1

2.  Use 'cpio' to in "pass-through" mode to generate a new directory
with copies of these samples:

root@orson:/linux# find test1 d e -print | cpio -pdum test2
cpio: write error: (system kern) error with unknown subsystem

Does this mean the Kernel is raising the exception?  This doesn't seem
as whimsical as the usual Hurd error message...

root@orson:/linux# ls
d     e      test1       test2
root@orson:/linux# cd test2
root@orson:/linux/test2# ls
test1
root@orson:/linux/test2# cd test1
root@orson:/linux/test2/test1# ls
a

So it gets the first guy, but stops shortly thereafter.

If I make 'a' an actual file:

This is a test
Line 1
Line 2
Line 3



3 spaces

Line 4
End

And do the same to 'b' and 'c' (but not 'd' or 'e')
After the preceding actions I get:

root@orson:/linux/test2# ls
d    test1
root@orson:/linux/test2# cd test1
root@orson:/linux/test2/test1# ls
a    b      c
root@orson:/linux/test2/test1# cat a
This is a test
Line 1
Line 2
Line 3



3 spaces

Line 4
End

(and so on.)

So it seems that 'cpio' on the Hurd (at least when called with
these parameters) seems to have trouble with non-standard files.


So I make a good link:
root@orson:/linux/test1# ln -sf a d
And a bad:
root@orson:/linux/test1# ln -sf f e
root@orson:/linux/test1# ls -l
-rw-r--r--   1 root    root            61 Jan 20 13:00 a
-rw-r--r--   1 root    root            44 Jan 20 12:56 b
-rw-r--r--   1 root    root            61 Jan 20 12:56 c
lrwxr-xr-x   1 root    root             1 Jan 20 13:00 d -> a
lrwxr-xr-x   1 root    root             1 Jan 20 13:00 f -> e
root@orson:/linux/test1# cd .. 
root@orson:/linux# find test1 d e -print | cpio -pdum test2
cpio: write error: (system kern) error with unknown subsystem
root@orson:/linux# cd test2
root@orson:/linux/test2# ls
d     test1
root@orson:/linux/test2# cd test1
root@orson:/linux/test2/test1# ls
-rw-r--r--   1 root    root            61 Jan 20 13:00 a
-rw-r--r--   1 root    root            44 Jan 20 12:56 b
-rw-r--r--   1 root    root            61 Jan 20 12:56 c
lrwxr-xr-x   1 root    root             1 Jan 20 13:00 d -> a
lrwxr-xr-x   1 root    root             1 Jan 20 13:00 f -> e

So again it croaks on the 0-length file

Do you think this is a 'cpio' bug in the hurd build, or a
Hurd bug?  It works fine under Linux (even with the 0-length
files).

Thanks,

-Brent


Reply to: