[BusyBox] Problems with cpio and SCSI tape

Laurence Anderson L.D.Anderson at warwick.ac.uk
Sun Jan 6 16:29:04 UTC 2002


Sorry about that...
Could you replace SIGTERM/"SIGTERM" with 15 and see what happens? (I'll
fix the patch properly if it works)

Laurence

>>> Jez Rogers <jez at jezndi.org> 01/05/02 21:48 PM >>>
On Fri, 4 Jan 2002, Laurence Anderson wrote:

> Made a (bad) patch that creates an option to support tape drives. Can
> you test it, jez?
>
> It creates a pipe & forks, so the unarchive code sees it as a pipe,
and
> the tape drive is accessed using copyfd which uses chunks, so it is
> happy (hopefully!).
>

I couldn't get it to compile:

make[3]: Entering directory `/usr/src/CVS/busybox/archival/libunarchive'
gcc -I/usr/src/CVS/busybox/include -Wall -Wstrict-prototypes -Wshadow
-Os
-fomit-frame-pointer   -D_GNU_SOURCE     -c -o unarchive.o unarchive.c
unarchive.c: In function `unarchive':
unarchive.c:259: warning: implicit declaration of function `kill'
unarchive.c:259: `SIGTERM' undeclared (first use in this function)
unarchive.c:259: (Each undeclared identifier is reported only once
unarchive.c:259: for each function it appears in.)
make[3]: *** [unarchive.o] Error 1
make[3]: Leaving directory `/usr/src/CVS/busybox/archival/libunarchive'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/CVS/busybox/archival/libunarchive'
make[1]: *** [_subdir_libunarchive] Error 2
make[1]: Leaving directory `/usr/src/CVS/busybox/archival'
make: *** [_dir_archival] Error 2

I hacked it and quoted SIGTERM, i.e.

kill(pid, "SIGTERM");

this fixed it.

This may or may not be the correct thing to do. I am in no way a 'c'
hacker, so please feel free to fix it properly.

Anyway, the fix appears to work, once i'd turned the tape support on.
cpio now appears to work ok, both from tape and from a fle. tar still
does not work. Instead of exiting after one file, it now hangs until I
hit ^C



-- 
jez

Armstrong's Collection Law:
        If the check is truly in the mail,
        it is surely made out to someone else.

mailto:jez at jezndi.org
http://www.jezndi.org






More information about the busybox mailing list