emulate an end-of-media

Daniel O'Connor doconnor at gsoft.com.au
Tue Feb 26 00:42:36 UTC 2008


On Tue, 26 Feb 2008, Alex Zbyslaw wrote:
> Are there not (at least) two more alternatives?
>
>     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.

The general solution would be nicer, then you could compress & encrypt.

Although I'm not sure it's so simple as adding SIGPIPE because at the 
end of the media the compressor will be holding some data that it has 
read but will never make it out to the media.. 

The only way I could think to solve this was to add an argument that 
specified a pipeline to stick after the data is generated but before 
it's fed to the output, although even then it gets a bit gnarly.. 

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20080226/e80c3da0/attachment.pgp


More information about the freebsd-hackers mailing list