Re: emulate an end-of-media
- From: Alex Zbyslaw <xfb52@xxxxxxxxxxxxxx>
- Date: Mon, 25 Feb 2008 21:30:44 +0000
Mike Meyer wrote:
On Mon, 25 Feb 2008 21:19:33 +0100 "Martin Laabs" <martin.laabs@xxxxxxxxxxxxxxxxxxxxx> wrote:Why compress? It's ancient technology and will be vastly outperformed by gzip (and bzip2 but that's slower).
Hi,
On Mon, 25 Feb 2008 20:34:31 +0100, wrote:
You might want to play with the -P option to dump. Your above could be
written as:
dump -aL0 -P 'compress -c' /MYFILESYSTEM | cdrecord dev=... -
Are there not (at least) two more alternatives?Assuming that compress -c & cdrecord play nice (which your magicMy solution can just close the pipe at the one "end" of the magic
device solution also requires)
device which would be realy simple to implement in a script.
While you're proposing a magic device that catches sigpipe, and
delivers an EOM to make dump -a happy. I'm proposing that dump catch
the sigpipe, and treat it like an EOM if it has -a. This may be
non-workable, in that you have to be able to tell if it was the -P
process or a slave process that generated the sigpipe, but I think
it's the best solution.
1) Add gzip/zlib support to dump. That would seem easier than new devices. Then -a would just work.
2) Instead of using cdrecord directly you have a wrapper which "emulates" the dump -a behaviour by writing 650/700Mb of data using cdrecord then prompting for the next cd. You don't close the pipe, and dump should just block waiting for your "device" to be ready. Might have trouble accessing /dev/tty - not sure.
--Alex
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: emulate an end-of-media
- From: Daniel O'Connor
- Re: emulate an end-of-media
- From: Julian H. Stacey
- Re: emulate an end-of-media
- References:
- Re: emulate an end-of-media
- From: Martin Laabs
- Re: emulate an end-of-media
- From: Mike Meyer
- Re: emulate an end-of-media
- Prev by Date: Re: sbc: isa plug-n-play
- Next by Date: Re: emulate an end-of-media
- Previous by thread: Re: emulate an end-of-media
- Next by thread: Re: emulate an end-of-media
- Index(es):
Relevant Pages
- Re: emulate an end-of-media
... It does not grab the output of the script to count the data after- ... a pipe
has a SIGPIPE signal. ... the multi-process dump design) would be to make dump treat
a sigpipe ... And as I wrote, fixing this is desirable. ... (freebsd-hackers) - Re: emulate an end-of-media
... delivers an EOM to make dump -a happy. ... the sigpipe, and treat it
like an EOM if it has -a. ... your magic device needs to be able to return EOM to
dump early enough ... (freebsd-hackers)