[Libburn] Patch to enable arbitrary input fd (updated 2nd submission)

Thomas Schmitt scdbackup at gmx.net
Fri Feb 10 06:29:21 PST 2006


find attached my patch for arbitray input file descriptors.
It is tested with a corrected BE_CANCELED value and test/burniso.c
for both, input from a disk file and input from stdin.

I have to apologize for including <sys/types.h> in libburn.h
but off_t is the right type for file sizes and it seems to
need <sys/types.h> although the man pages say rather <stdio.h>.

Internally, libburn is not prepared for >2 GB but
with the off_t interface members it can be enhanced
without a further API change.

Derek, i would not object imuch if you canceled off_t and
replaced it by int.
(I myself would have used type double. It is exact enough even
 with petabytes and it does not need special includes. Shrug.)
Whatever, you will have to look into  file_size()
which now adds an off_t to an int. This can have quite
confusing consequences (even negative values) if by
mistake a disk file with a full size DVD image is processed.

off_t offers a cheap way out of eventual 32 bit rollovers and
towards future DVD adventures.


The other implementation details are as discussed in
the last weeks.
I made some changes to test/burniso.c in order to allow
stdin as input.

Have a nice day :)


DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert:
GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2006.02.10.140753.burn_cvs_A60209_df
Type: application/octet-stream
Size: 7109 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/libburn/attachments/20060210/6d03b637/2006.02.10.140753-0001.obj

More information about the libburn mailing list