Compare commits

..

20 Commits

Author SHA1 Message Date
45bbed29db Documented changes and release timestamp 2014-06-27 18:16:54 +00:00
dd0de2f103 Updated cdrskin tarball generator 2014-06-27 18:14:53 +00:00
535bfde693 Made number transition to 1.3.8 2014-06-27 18:14:03 +00:00
ed02d4a3a2 Branching for libburn release 1.3.8 2014-06-27 17:00:25 +00:00
69b282a5ba Reacted on compiler warning of gcc on NetBSD-current 2014-06-20 14:53:11 +00:00
193c260285 Fixed a SIGSEGV introduced by previous revision 2014-06-10 13:08:12 +00:00
ca532f7623 Improved drive capacity estimation for sparse regular files 2014-06-10 07:37:40 +00:00
61e2176d03 Bug fix: A failed MMC BLANK command did not cause error indication by libburn 2014-05-03 10:37:07 +00:00
91eca50221 Bug fix: Wrong stack usage caused SIGBUS on sparc when compiled by gcc -O2 2014-04-29 06:18:41 +00:00
e54f6ebd68 Improved read retrying with DVD and BD media 2014-04-19 11:48:46 +00:00
856081559c Retrying write(2) if it returns a short non-negative write count 2014-04-14 10:33:58 +00:00
511d23f574 Restoring capability of burn_random_access_write() to fsync() (lost in rev 5302) 2014-04-13 12:09:34 +00:00
f17d5ee7d1 Bug fix: A final fsync(2) was performed with stdio drives, even if not desired 2014-04-09 15:22:20 +00:00
d08658833a Bug fix: Minimum drive buffer fill was measured before the buffer could get full 2014-04-06 11:10:29 +00:00
a8a2d54c25 Bug fix: Compilation warning for unsupported systems mutated into an error 2014-03-17 22:18:39 +00:00
9accc668fa Updated change log 2014-03-14 10:05:13 +00:00
33e20f9e49 Bug fix: CD TAO with multiple tracks could cause a buffer overrun 2014-03-14 09:55:11 +00:00
48db3adaf6 Documented changes and release timestamp 2014-03-04 16:26:23 +00:00
ac46978d63 Updated cdrskin tarball generator 2014-03-04 16:23:22 +00:00
2aba5b4dd7 Made number transition to 1.3.7 2014-03-04 16:22:27 +00:00
31 changed files with 529 additions and 210 deletions

View File

@ -1,3 +1,17 @@
libburn-1.3.8.tar.gz Sat Jun 28 2014
===============================================================================
* Bug fix: Wrong stack usage caused SIGBUS on sparc when compiled by gcc -O2
* Bug fix: Minimum drive buffer fill was measured by cdrskin before the buffer
could get full
* Bug fix: A failed MMC BLANK command did not cause error indication by libburn
* Bug fix: A final fsync(2) was performed with stdio drives, even if not
desired
libburn-1.3.6.pl01.tar.gz Tue Mar 18 2013
===============================================================================
* Bug fix: CD TAO with multiple tracks could cause a buffer overrun
* Bug fix: Compilation warning for unsupported systems mutated into an error
libburn-1.3.6.tar.gz Tue Mar 04 2013
===============================================================================
* New system adapter for NetBSD

View File

@ -118,9 +118,9 @@ test_structest_CPPFLAGS = -Ilibburn
test_structest_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
test_structest_SOURCES = test/structest.c
## cdrskin construction site - ts A60816 - B40304
## cdrskin construction site - ts A60816 - B40628
cdrskin_cdrskin_CPPFLAGS = -Ilibburn
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_1_3_6
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_1_3_8
# cdrskin_cdrskin_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
# ts A80123, change proposed by Simon Huggins to cause dynamic libburn linking

14
README
View File

@ -11,7 +11,7 @@ Still containing parts of Libburn. By Derek Foreman <derek@signalmarketing.com>
and Ben Jansens <xor@orodu.net>
Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
http://files.libburnia-project.org/releases/libburn-1.3.6.tar.gz
http://files.libburnia-project.org/releases/libburn-1.3.8.tar.gz
------------------------------------------------------------------------------
@ -19,10 +19,10 @@ Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
From tarball
Obtain libburn-1.3.6.tar.gz, take it to a directory of your choice and do:
Obtain libburn-1.3.8.tar.gz, take it to a directory of your choice and do:
tar xzf libburn-1.3.6.tar.gz
cd libburn-1.3.6
tar xzf libburn-1.3.8.tar.gz
cd libburn-1.3.8
./configure --prefix=/usr
make
@ -726,6 +726,12 @@ Project history as far as known to me:
Minor bugs were fixed in libisoburn. xorriso can now find files with names
which cannot be represented unchanged in ECMA-119, Joliet, or HFS+.
- Sat Jun 28 2014 release 1.3.8
libburn got several bugs fixed. libisofs offers new API calls for inspection
of boot sectors in ISO 9660 filesystems. xorriso improved its support for
NetBSD, offers new features with command -find, and a command to extract
ISO 9660 file content onto standard output or into filter processes.
------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
cdrskin. By Thomas Schmitt <scdbackup@gmx.net>
Integrated sub project of libburnia-project.org but also published via:
http://scdbackup.sourceforge.net/cdrskin_eng.html
http://scdbackup.sourceforge.net/cdrskin-1.3.6.tar.gz
http://scdbackup.sourceforge.net/cdrskin-1.3.8.tar.gz
Copyright (C) 2006-2014 Thomas Schmitt, provided under GPL version 2 or later.
------------------------------------------------------------------------------
@ -26,10 +26,10 @@ By using this software you agree to the disclaimer at the end of this text
Compilation, First Glimpse, Installation
Obtain cdrskin-1.3.6.tar.gz, take it to a directory of your choice and do:
Obtain cdrskin-1.3.8.tar.gz, take it to a directory of your choice and do:
tar xzf cdrskin-1.3.6.tar.gz
cd cdrskin-1.3.6
tar xzf cdrskin-1.3.8.tar.gz
cd cdrskin-1.3.8
Within that directory execute:
@ -588,7 +588,7 @@ contributions in a due way.
Based on and sub project of:
libburnia-project.org
By Mario Danic <mario.danic@gmail.com> and Thomas Schmitt <scdbackup@gmx.net>
Copyright (C) 2006-2013 Mario Danic, Thomas Schmitt
Copyright (C) 2006-2014 Mario Danic, Thomas Schmitt
libburnia-project.org is inspired by and in other components still containing
parts of

View File

@ -38,7 +38,7 @@ original="./libburn_svn_release.tgz"
# My changes are in $changes , mainly in $changes/cdrskin
changes="./libburn-release"
skin_release="1.3.6"
skin_release="1.3.8"
patch_level=""
# patch_level=".pl00"
skin_rev="$skin_release""$patch_level"

View File

@ -38,7 +38,7 @@ original="./libburn_svn.tgz"
# My changes are in $changes , mainly in $changes/cdrskin
changes="./libburn-develop"
skin_release="1.3.7"
skin_release="1.3.9"
patch_level=""
skin_rev="$skin_release""$patch_level"

View File

@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH CDRSKIN 1 "Version 1.3.6, Mar 04, 2014"
.TH CDRSKIN 1 "Version 1.3.8, Jun 28, 2014"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:

View File

@ -87,7 +87,7 @@ or
/** The official program version */
#ifndef Cdrskin_prog_versioN
#define Cdrskin_prog_versioN "1.3.6"
#define Cdrskin_prog_versioN "1.3.8"
#endif
/** The official libburn interface revision to use.
@ -100,7 +100,7 @@ or
#define Cdrskin_libburn_minoR 3
#endif
#ifndef Cdrskin_libburn_micrO
#define Cdrskin_libburn_micrO 6
#define Cdrskin_libburn_micrO 8
#endif
@ -120,34 +120,34 @@ or
#undef Cdrskin_libburn_versioN
#endif
#ifdef Cdrskin_libburn_1_3_6
#define Cdrskin_libburn_versioN "1.3.6"
#ifdef Cdrskin_libburn_1_3_8
#define Cdrskin_libburn_versioN "1.3.8"
#endif
#ifdef Cdrskin_libburn_1_3_7
#define Cdrskin_libburn_versioN "1.3.7"
#ifdef Cdrskin_libburn_1_3_9
#define Cdrskin_libburn_versioN "1.3.9"
#endif
#ifndef Cdrskin_libburn_versioN
#define Cdrskin_libburn_1_3_6
#define Cdrskin_libburn_versioN "1.3.6"
#define Cdrskin_libburn_1_3_8
#define Cdrskin_libburn_versioN "1.3.8"
#endif
#ifdef Cdrskin_libburn_1_3_6
#ifdef Cdrskin_libburn_1_3_8
#undef Cdrskin_libburn_majoR
#undef Cdrskin_libburn_minoR
#undef Cdrskin_libburn_micrO
#define Cdrskin_libburn_majoR 1
#define Cdrskin_libburn_minoR 3
#define Cdrskin_libburn_micrO 4
#define Cdrskin_libburn_micrO 8
#endif
#ifdef Cdrskin_libburn_1_3_7
#ifdef Cdrskin_libburn_1_3_9
#undef Cdrskin_libburn_majoR
#undef Cdrskin_libburn_minoR
#undef Cdrskin_libburn_micrO
#define Cdrskin_libburn_majoR 1
#define Cdrskin_libburn_minoR 3
#define Cdrskin_libburn_micrO 5
#define Cdrskin_libburn_micrO 9
#endif
@ -3148,7 +3148,7 @@ set_severities:;
int major, minor, micro;
printf(
"Cdrecord 2.01a27 Emulation. Copyright (C) 2006-2013, see libburnia-project.org\n");
"Cdrecord 2.01a27 Emulation. Copyright (C) 2006-2014, see libburnia-project.org\n");
if(o->fallback_program[0]) {
char *hargv[2];
@ -6691,9 +6691,10 @@ thank_you_for_patience:;
if(p->buffer_capacity>0)
buffer_fill= (double) (p->buffer_capacity - p->buffer_available)*100.0
/ (double) p->buffer_capacity;
if(buffer_fill<*min_buffer_fill)
*min_buffer_fill= buffer_fill;
if(p->buffered_bytes > p->buffer_capacity)
if(buffer_fill < *min_buffer_fill)
*min_buffer_fill= buffer_fill;
printf("%s%sTrack %-2.2d: %s MB written %s[buf %3d%%] %4.1fx.%s",
skin->pacifier_with_newline ? "" : "\r",

View File

@ -67,7 +67,7 @@ connected via SCSI, PATA (aka IDE, ATA), USB, or SATA.
GPL software included:<BR>
</H2>
<DL>
<DT>libburn-1.3.6</DT>
<DT>libburn-1.3.8</DT>
<DD>(founded by Derek Foreman and Ben Jansens,
developed and maintained since August 2006 by
Thomas Schmitt from team of libburnia-project.org)
@ -202,13 +202,13 @@ Standalone ISO 9660 multi-session CD/DVD/BD tool
<P>
<DL>
<DT>Download as source code (see README):</DT>
<DD><A HREF="cdrskin-1.3.6.tar.gz">cdrskin-1.3.6.tar.gz</A>
(965 KB).
<DD><A HREF="cdrskin-1.3.8.tar.gz">cdrskin-1.3.8.tar.gz</A>
(975 KB).
</DD>
<DD><A HREF="cdrskin-1.3.6.tar.gz.sig">cdrskin-1.3.6.tar.gz.sig</A></DD>
<DD><A HREF="cdrskin-1.3.8.tar.gz.sig">cdrskin-1.3.8.tar.gz.sig</A></DD>
<DD>
(detached GPG signature for verification by
<KBD>gpg --verify cdrskin-1.3.6.tar.gz.sig cdrskin-1.3.6.tar.gz</KBD>
<KBD>gpg --verify cdrskin-1.3.8.tar.gz.sig cdrskin-1.3.8.tar.gz</KBD>
<BR>
after <KBD>gpg --keyserver keys.gnupg.net --recv-keys ABC0A854</KBD>).
</DD>
@ -259,15 +259,7 @@ cdrskin_0.4.2.pl00-x86-suse9_0-static.tar.gz</A>, (310 KB), -static compiled,
<HR>
<P>
Enhancements towards previous stable version cdrskin-1.3.4:
<UL>
<LI>New system adapter for NetBSD</LI>
<!--
<LI>none</LI>
-->
</UL>
Bug fixes towards cdrskin-1.3.4:
Enhancements towards previous stable version cdrskin-1.3.6.pl01:
<UL>
<LI>none</LI>
<!--
@ -275,32 +267,32 @@ Bug fixes towards cdrskin-1.3.4:
-->
</UL>
<!--
Bug fixes of cdrskin-1.3.2.pl01 towards cdrskin-1.3.2:
Bug fixes towards cdrskin-1.3.6.pl01:
<UL>
<LI>
cdrskin-1.3.2.tar.gz contained the outdated source code of cdrskin-1.3.0,
including the -msinfo bug.
</LI>
</UL>
<LI>Minimum drive buffer fill was measured by cdrskin before the buffer could get full</LI>
<LI>Wrong stack usage caused SIGBUS on sparc when compiled by gcc -O2</LI>
<LI>A failed blank run did not cause an error indication</LI>
<LI>A final fsync(2) was performed with stdio drives, even if not desired</LI>
<!--
<LI>none</LI>
-->
</UL>
<HR>
<P>
<DL>
<DT><H3>Development snapshot, version 1.3.7 :</H3></DT>
<DD>Enhancements towards current stable version 1.3.6:
<DT><H3>Development snapshot, version 1.3.9 :</H3></DT>
<DD>Enhancements towards current stable version 1.3.8:
<UL>
<LI>none yet</LI>
<!--
<LI>none yet</LI>
-->
</UL>
</DD>
<DD>Bug fixes towards cdrskin-1.3.6:
<DD>Bug fixes towards cdrskin-1.3.8:
<UL>
<LI>none yet</LI>
<!--
@ -310,10 +302,10 @@ including the -msinfo bug.
</DD>
<DD>&nbsp;</DD>
<DD><A HREF="README_cdrskin_devel">README 1.3.7</A>
<DD><A HREF="cdrskin__help_devel">cdrskin-1.3.7 --help</A></DD>
<DD><A HREF="cdrskin_help_devel">cdrskin-1.3.7 -help</A></DD>
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 1.3.7)</A></DD>
<DD><A HREF="README_cdrskin_devel">README 1.3.9</A>
<DD><A HREF="cdrskin__help_devel">cdrskin-1.3.9 --help</A></DD>
<DD><A HREF="cdrskin_help_devel">cdrskin-1.3.9 -help</A></DD>
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 1.3.9)</A></DD>
<DD>&nbsp;</DD>
<DT>Maintainers of cdrskin unstable packages please use SVN of
<A HREF="http://libburnia-project.org"> libburnia-project.org</A></DT>
@ -333,8 +325,8 @@ admins with full system sovereignty.</DT>
<A HREF="README_cdrskin_devel">upcoming README</A> ):
</DD>
<DD>
<A HREF="cdrskin-1.3.7.tar.gz">cdrskin-1.3.7.tar.gz</A>
(965 KB).
<A HREF="cdrskin-1.3.9.tar.gz">cdrskin-1.3.9.tar.gz</A>
(975 KB).
</DD>
<!-- This is not offered any more since spring 2008

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2014.03.04.110001"
#define Cdrskin_timestamP "2014.06.28.060001"

View File

@ -12473,7 +12473,7 @@ Made number transition to 1.3.6
+ cdrskin/add_ts_changes_to_libburn_1_3_7
Updated cdrskin tarball generator
04 Mar 2014 []
04 Mar 2014 [5263]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
@ -12482,7 +12482,7 @@ Documented changes and release timestamp
* New system adapter for NetBSD
[]
2014.03.04.161835 [5269]
Makefile.am
configure.ac
README
@ -12495,19 +12495,158 @@ cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition to 1.3.7
[]
04 Mar 2014 [5270]
- cdrskin/add_ts_changes_to_libburn_1_3_4
- cdrskin/add_ts_changes_to_libburn_1_3_5
+ cdrskin/add_ts_changes_to_libburn_1_3_6
+ cdrskin/add_ts_changes_to_libburn_1_3_7
Updated cdrskin tarball generator
[]
04 Mar 2014 [5271]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------------ cycle - cdrskin-1.3.7 -
------------------------------------ cycle - cdrskin-1.3.7 - 2014.03.04.162814
04 Mar 2014 [5272]
svn move -m libburn release 1.3.6 is ready
http://svn.libburnia-project.org/libburn/branches/1.3.6
http://svn.libburnia-project.org/libburn/tags/1.3.6
2014.03.14.095413 [5281]
libburn/write.c
Bug fix: CD TAO with multiple tracks could cause a buffer overrun
14 Mar 2013 [5282]
ChangeLog
cdrskin/cdrskin_eng.html
Updated change log
------------------------------------ cycle - cdrskin-1.3.7 - 2014.03.14.100747
* Bug fix: CD TAO with multiple tracks could cause a buffer overrun
2014.03.17.221810 [5284]
libburn/sg.c
Bug fix: Compilation warning for unsupported systems mutated into an error
18 Mar 2014 [5285]
svn copy -m Branching for libburn bugfix release 1.3.6.pl01
http://svn.libburnia-project.org/libburn/tags/1.3.6
http://svn.libburnia-project.org/libburn/branches/1.3.6.pl01
2014.03.18.100001 [5286 tag 1.3.6.pl01]
libburn/write.c
Bug fix: CD TAO with multiple tracks could cause a buffer overrun
2014.03.18.100001 [5287 tag 1.3.6.pl01]
libburn/sg.c
Bug fix: Compilation warning for unsupported systems mutated into an error
18 Mar 2014 [5291]
svn move -m libburn bugfix release 1.3.6.pl01 is ready
http://svn.libburnia-project.org/libburn/branches/1.3.6.pl01
http://svn.libburnia-project.org/libburn/tags/1.3.6.pl01
------------------------------ release - cdrskin-1.3.6.pl01 - 2014.03.18.100001
* Bug fix: Compilation warning for unsupported systems mutated into an error
* Bug fix: CD TAO with multiple tracks could cause a buffer overrun
2014.04.06.111004 [5297]
cdrskin/cdrskin.c
Bug fix: Minimum drive buffer fill was measured before the buffer could get full
2014.04.09.152035 [5302]
libburn/libburn.h
libburn/options.c
libburn/write.c
Bug fix: A final fsync(2) was performed with stdio drives, even if not desired
2014.04.13.120906 [5309]
libburn/write.c
Restoring capability of burn_random_access_write() to fsync() (lost in rev 5302)
2014.04.14.103311 [5310]
libburn/write.c
Retrying write(2) if it returns a short non-negative write count
2014.04.19.114816 [5315]
libburn/libburn.h
libburn/read.c
Improved read retrying with DVD and BD media
2014.04.29.061645 [5324]
libburn/async.c
Bug fix: Wrong stack usage caused SIGBUS on sparc when compiled by gcc -O2
2014.05.03.103448 [5328]
libburn/mmc.c
Bug fix: A failed MMC BLANK command did not cause error indication by libburn
2014.06.09.183251 [5335]
libburn/libburn.h
libburn/drive.c
libburn/util.h
libburn/util.c
libburn/sg.h
libburn/sg-dummy.c
libburn/sg-freebsd.c
libburn/sg-freebsd-port.c
libburn/sg-libcdio.c
libburn/sg-linux.c
libburn/sg-netbsd.c
libburn/sg-solaris.c
Improved drive capacity estimation for sparse regular files
2014.06.10.130721 [5336]
libburn/drive.c
Fixed a SIGSEGV introduced by previous revision
2014.06.20.145224 [5346]
libburn/sg-netbsd.c
Reacted on compiler warning of gcc on NetBSD-current
27 Jun 2014 [5348]
svn copy -m Branching for libburn release 1.3.8
http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/1.3.8
2014.06.28.060001 [5349]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/cdrskin.1
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition to 1.3.8
28 Jun 2014 [5350]
- cdrskin/add_ts_changes_to_libburn_1_3_6
- cdrskin/add_ts_changes_to_libburn_1_3_7
+ cdrskin/add_ts_changes_to_libburn_1_3_8
+ cdrskin/add_ts_changes_to_libburn_1_3_9
Updated cdrskin tarball generator
28 Jun 2014 [ ]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
----------------------------------- release - cdrskin-1.3.8 - 2014.06,28.060001
* Bug fix: Wrong stack usage caused SIGBUS on sparc when compiled by gcc -O2
* Bug fix: Minimum drive buffer fill was measured by cdrskin before the buffer
could get full
* Bug fix: A failed MMC BLANK command did not cause error indication by libburn
* Bug fix: A final fsync(2) was performed with stdio drives, even if not
desired
[]
ChangeLog
@ -12517,6 +12656,7 @@ Updated change log
------------------------------------ cycle - cdrskin-1.3.7 -
[]
ChangeLog
cdrskin/cdrskin_eng.html
@ -12535,12 +12675,6 @@ Important: When adding a public API function then add its name to file
TODO
===============================================================================
>>> consider an option to set the cdrskin startup message
>>> sg-netbsd.c os-netbsd.h
>>> check OpenBSD
----
CD-TEXT:
- with SAO
@ -12560,7 +12694,8 @@ qemu:
Get sg-freebsd-port.c functional.
Expose BD type from bytes 8+4 to 10+4 out of READ BD STRUCTURE form 0.
Expose BD type from bytes 8+4 to 10+4 out of READ DISC STRUCTURE form 0.
Expose Disc Size/Class/Version from byte 11+4.
Better motivation of burn_set_signal_handling() in libburn.h.

View File

@ -8,7 +8,7 @@ debug_opts="-O2"
def_opts=
largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1"
fifo_opts=""
libvers="-DCdrskin_libburn_1_3_6"
libvers="-DCdrskin_libburn_1_3_8"
# To be used if Makefile.am uses libburn_libburn_la_CFLAGS
# burn="libburn/libburn_libburn_la-"
@ -41,15 +41,15 @@ do
elif test "$i" = "-compile_dewav"
then
compile_dewav=1
elif test "$i" = "-libburn_1_3_6"
elif test "$i" = "-libburn_1_3_8"
then
libvers="-DCdrskin_libburn_1_3_6"
libvers="-DCdrskin_libburn_1_3_8"
libdax_audioxtr_o="$burn"libdax_audioxtr.o
libdax_msgs_o="$burn"libdax_msgs.o
cleanup_src_or_obj="$burn"cleanup.o
elif test "$i" = "-libburn_svn"
then
libvers="-DCdrskin_libburn_1_3_7"
libvers="-DCdrskin_libburn_1_3_9"
libdax_audioxtr_o="$burn"libdax_audioxtr.o
libdax_msgs_o="$burn"libdax_msgs.o
cleanup_src_or_obj="$burn"cleanup.o
@ -99,7 +99,7 @@ do
echo "Options:"
echo " -compile_cdrfifo compile program cdrskin/cdrfifo."
echo " -compile_dewav compile program test/dewav without libburn."
echo " -libburn_1_3_6 set macro to match libburn-1.3.6"
echo " -libburn_1_3_8 set macro to match libburn-1.3.8"
echo " -libburn_svn set macro to match current libburn-SVN."
echo " -dvd_obs_64k 64 KB default size for DVD/BD writing."
echo " -use_libcdio link with -lcdio because libburn uses it."

View File

@ -1,4 +1,4 @@
AC_INIT([libburn], [1.3.6], [http://libburnia-project.org])
AC_INIT([libburn], [1.3.8], [http://libburnia-project.org])
AC_PREREQ([2.50])
dnl AC_CONFIG_HEADER([config.h])
@ -104,6 +104,7 @@ dnl 1.3.0 = libburn.so.4.83.0
dnl 1.3.2 = libburn.so.4.85.0
dnl 1.3.4 = libburn.so.4.87.0
dnl 1.3.6 = libburn.so.4.89.0
dnl 1.3.8 = libburn.so.4.91.0
dnl
dnl So LT_CURRENT, LT_REVISION and LT_AGE get set directly here.
dnl SONAME of the emerging library is LT_CURRENT - LT_AGE.
@ -129,7 +130,7 @@ dnl
dnl As said: Only copies. Original in libburn/libburn.h : burn_header_version_*
BURN_MAJOR_VERSION=1
BURN_MINOR_VERSION=3
BURN_MICRO_VERSION=6
BURN_MICRO_VERSION=8
BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
AC_SUBST(BURN_MAJOR_VERSION)
@ -140,14 +141,14 @@ AC_SUBST(BURN_VERSION)
dnl Libtool versioning
LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
dnl
dnl This is the release version libburn-1.3.6
dnl This is the release version libburn-1.3.8
dnl ### This is the development version after above release version
dnl LT_CURRENT++, LT_AGE++ has not yet happened.
dnl ### LT_CURRENT++, LT_AGE++ has happened meanwhile.
dnl
dnl SONAME = 93 - 89 = 4 . Linux library name = libburn.so.4.89.0
LT_CURRENT=93
LT_AGE=89
dnl SONAME = 95 - 91 = 4 . Linux library name = libburn.so.4.91.0
LT_CURRENT=95
LT_AGE=91
LT_REVISION=0
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`

View File

@ -1,7 +1,7 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2012 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2014 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -98,6 +98,14 @@ struct fifo_opts
int flag;
};
union w_list_data
{
struct scan_opts scan;
struct erase_opts erase;
struct format_opts format;
struct write_opts write;
struct fifo_opts fifo;
};
struct w_list
{
@ -109,14 +117,7 @@ struct w_list
struct w_list *next;
union w_list_data
{
struct scan_opts scan;
struct erase_opts erase;
struct format_opts format;
struct write_opts write;
struct fifo_opts fifo;
} u;
union w_list_data u;
};
static struct w_list *workers = NULL;
@ -133,7 +134,7 @@ static struct w_list *find_worker(struct burn_drive *d)
}
static void add_worker(int w_type, struct burn_drive *d,
WorkerFunc f, void *data)
WorkerFunc f, union w_list_data *data)
{
struct w_list *a;
struct w_list *tmp;
@ -146,7 +147,11 @@ static void add_worker(int w_type, struct burn_drive *d,
a = calloc(1, sizeof(struct w_list));
a->w_type = w_type;
a->drive = d;
a->u = *(union w_list_data *)data;
a->u = *data;
/*
memcpy(&(a->u), data, sizeof(union w_list_data));
*/
/* insert at front of the list */
a->next = workers;
@ -253,7 +258,7 @@ static void reset_progress(struct burn_drive *d, int sessions, int tracks,
int burn_drive_scan(struct burn_drive_info *drives[], unsigned int *n_drives)
{
struct scan_opts o;
union w_list_data o;
int ret = 0;
/* ts A61006 : moved up from burn_drive_scan_sync , former Assert */
@ -292,9 +297,9 @@ drive_is_active:;
*drives = NULL;
*n_drives = 0;
o.drives = drives;
o.n_drives = n_drives;
o.done = 0;
o.scan.drives = drives;
o.scan.n_drives = n_drives;
o.scan.done = 0;
add_worker(Burnworker_type_scaN, NULL,
(WorkerFunc) scan_worker_func, &o);
} else if (workers->u.scan.done) {
@ -346,7 +351,7 @@ static void *erase_worker_func(struct w_list *w)
void burn_disc_erase(struct burn_drive *drive, int fast)
{
struct erase_opts o;
union w_list_data o;
/* ts A61006 */
/* a ssert(drive); */
@ -408,8 +413,8 @@ void burn_disc_erase(struct burn_drive *drive, int fast)
return;
}
o.drive = drive;
o.fast = fast;
o.erase.drive = drive;
o.erase.fast = fast;
add_worker(Burnworker_type_erasE, drive,
(WorkerFunc) erase_worker_func, &o);
}
@ -447,7 +452,7 @@ static void *format_worker_func(struct w_list *w)
/* ts A61230 */
void burn_disc_format(struct burn_drive *drive, off_t size, int flag)
{
struct format_opts o;
union w_list_data o;
int ok = 0, ret;
char msg[40];
@ -535,9 +540,9 @@ void burn_disc_format(struct burn_drive *drive, off_t size, int flag)
drive->cancel = 1;
return;
}
o.drive = drive;
o.size = size;
o.flag = flag;
o.format.drive = drive;
o.format.size = size;
o.format.flag = flag;
add_worker(Burnworker_type_formaT, drive,
(WorkerFunc) format_worker_func, &o);
}
@ -589,7 +594,7 @@ static void *write_disc_worker_func(struct w_list *w)
void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
{
struct write_opts o;
union w_list_data o;
char *reasons= NULL;
struct burn_drive *d;
int mvalid;
@ -683,9 +688,9 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
d->cancel = 0; /* End of the return = failure area */
o.drive = d;
o.opts = opts;
o.disc = disc;
o.write.drive = d;
o.write.opts = opts;
o.write.disc = disc;
opts->refcount++;
@ -731,7 +736,7 @@ static void *fifo_worker_func(struct w_list *w)
int burn_fifo_start(struct burn_source *source, int flag)
{
struct fifo_opts o;
union w_list_data o;
struct burn_source_fifo *fs = source->data;
fs->is_started = -1;
@ -744,8 +749,8 @@ int burn_fifo_start(struct burn_source *source, int flag)
return -1;
}
o.source = source;
o.flag = flag;
o.fifo.source = source;
o.fifo.flag = flag;
add_worker(Burnworker_type_fifO, NULL,
(WorkerFunc) fifo_worker_func, &o);
fs->is_started = 1;

View File

@ -393,7 +393,7 @@ static int burn_drive__is_rdwr(char *fname, int *stat_ret,
if (S_ISREG(stbuf.st_mode))
read_size = stbuf.st_size;
else if (is_rdwr)
ret = burn_os_stdio_capacity(fname, &read_size);
ret = burn_os_stdio_capacity(fname, 0, &read_size);
if (ret <= 0 ||
read_size / (off_t) 2048 >= (off_t) 0x7ffffff0)
read_size = (off_t) 0x7ffffff0 * (off_t) 2048;
@ -450,7 +450,7 @@ int burn_drive_grab_stdio(struct burn_drive *d, int flag)
d->media_read_capacity =
read_size / 2048 - !(read_size % 2048);
if ((stat_ret == -1 || is_rdwr) && d->devname[0]) {
ret = burn_os_stdio_capacity(d->devname, &size);
ret = burn_os_stdio_capacity(d->devname, 0, &size);
if (ret > 0)
burn_drive_set_media_capacity_remaining(d,
size);
@ -1722,7 +1722,7 @@ int burn_drive_grab_dummy(struct burn_drive_info *drive_infos[], char *fname)
is_rdwr = burn_drive__is_rdwr(fname, &stat_ret, &stbuf,
&read_size, 1 | 2);
if (stat_ret == -1 || is_rdwr) {
ret = burn_os_stdio_capacity(fname, &size);
ret = burn_os_stdio_capacity(fname, 0, &size);
if (ret == -1) {
libdax_msgs_submit(libdax_messenger, -1,
0x00020009,
@ -2637,7 +2637,8 @@ int burn_disc_get_msc1(struct burn_drive *d, int *start)
off_t burn_disc_available_space(struct burn_drive *d,
struct burn_write_opts *o)
{
int lba, nwa;
int lba, nwa, ret;
off_t bytes, start_byte = 0;
if (burn_drive_is_released(d))
return 0;
@ -2646,9 +2647,15 @@ off_t burn_disc_available_space(struct burn_drive *d,
if (d->drive_role == 0)
return 0;
if (d->drive_role != 1) {
if (d->media_capacity_remaining <= 0)
burn_drive_set_media_capacity_remaining(d,
(off_t) (512 * 1024 * 1024 - 1) * (off_t) 2048);
if (o != NULL)
start_byte = o->start_byte;
ret = burn_os_stdio_capacity(d->devname, start_byte, &bytes);
if (ret != 1)
bytes = d->media_capacity_remaining;
if (bytes <= 0)
bytes = (off_t) (512 * 1024 * 1024 - 1) * (off_t) 2048;
if (bytes != d->media_capacity_remaining)
burn_drive_set_media_capacity_remaining(d, bytes);
} else {
if (o != NULL)
d->send_write_parameters(d, NULL, -1, o);
@ -2897,7 +2904,7 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
/* stdio file drive : random access read-write */
o->start_adr = 1;
size = d->media_capacity_remaining;
burn_os_stdio_capacity(d->devname, &size);
burn_os_stdio_capacity(d->devname, 0, &size);
burn_drive_set_media_capacity_remaining(d, size);
o->start_range_high = d->media_capacity_remaining;
o->start_alignment = 2048; /* imposting a drive, not a file */
@ -2909,7 +2916,7 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
/* stdio file drive : random access write-only */
o->start_adr = 1;
size = d->media_capacity_remaining;
burn_os_stdio_capacity(d->devname, &size);
burn_os_stdio_capacity(d->devname, 0, &size);
burn_drive_set_media_capacity_remaining(d, size);
/* >>> start_range_low = file size rounded to 2048 */;

View File

@ -1478,7 +1478,7 @@ int burn_disc_get_msc1(struct burn_drive *d, int *start_lba);
grabbed and BURN_DRIVE_IDLE. If not, then one will only get a canned value
from the most recent automatic inquiry (e.g. during last drive grabbing).
An eventual start address from burn_write_opts_set_start_byte() will be
subtracted from the obtained capacity estimation. Negative results get
taken into respect with the capacity estimation. Negative results get
defaulted to 0.
If the drive is actually a file in a large filesystem or a large block
device, then the capacity is curbed to a maximum of 0x7ffffff0 blocks
@ -2913,7 +2913,8 @@ int burn_track_get_counters(struct burn_track *t,
/** Sets drive read and write speed
Note: "k" is 1000, not 1024. 1xCD = 176.4 k/s, 1xDVD = 1385 k/s.
Note: "k" is 1000, not 1024.
1xCD = 176.4 k/s, 1xDVD = 1385 k/s, 1xBD = 4496 k/s.
Fractional speeds should be rounded up. Like 4xCD = 706.
@param d The drive to set speed for
@param read Read speed in k/s (0 is max, -1 is min).
@ -3225,7 +3226,10 @@ void burn_write_opts_set_obs_pad(struct burn_write_opts *opts, int pad);
from being clogged with lots of pending data for slow devices.
@param opts The write opts to change
@param rythm Number of 2KB output blocks after which fsync(2) is
performed. -1 means no fsync(), 0 means default,
performed.
-1 means no fsync()
0 means default
1 means fsync() only at end, @since 1.3.8 (noop before 1.3.8)
elsewise the value must be >= 32.
Default is currently 8192 = 16 MB.
@since 0.7.4
@ -3593,7 +3597,7 @@ void burn_version(int *major, int *minor, int *micro);
*/
#define burn_header_version_major 1
#define burn_header_version_minor 3
#define burn_header_version_micro 6
#define burn_header_version_micro 8
/** Note:
Above version numbers are also recorded in configure.ac because libtool
wants them as parameters at build time.
@ -3914,6 +3918,7 @@ int burn_get_read_capacity(struct burn_drive *d, int *capacity, int flag);
@param data_size The amount of data to be read. This does not have to
be aligned to any block size.
@param data_count The amount of data actually read (interesting on error)
The counted bytes are supposed to be valid.
@param flag Bitfield for control purposes:
bit0= - reserved -
bit1= do not submit error message if read error

View File

@ -2680,6 +2680,10 @@ void mmc_erase(struct burn_drive *d, int fast)
c->dir = NO_TRANSFER;
c->timeout = Libburn_mmc_blank_timeouT;
d->issue_command(d, c);
if (c->error) {
d->cancel = 1;
scsi_notify_error(d, c, c->sense, 14, 2);
}
}
void mmc_read_lead_in(struct burn_drive *d, struct buffer *buf)

View File

@ -522,9 +522,11 @@ void burn_write_opts_set_obs_pad(struct burn_write_opts *opts, int pad)
void burn_write_opts_set_stdio_fsync(struct burn_write_opts *opts, int rythm)
{
if (rythm == -1)
opts->stdio_fsync_size = 0;
opts->stdio_fsync_size = -1; /* never */
else if (rythm == 0)
opts->stdio_fsync_size = Libburn_stdio_fsync_limiT;
else if (rythm == 1)
opts->stdio_fsync_size = 0; /* only at end of writing */
else if (rythm >= 32)
opts->stdio_fsync_size = rythm;
}

View File

@ -309,6 +309,27 @@ static void flipq(unsigned char *sub)
*/
/** @param flag bit1= be silent on failure
*/
static int burn_stdio_seek(int fd, off_t byte_address, struct burn_drive *d,
int flag)
{
char msg[80];
if (lseek(fd, byte_address, SEEK_SET) != -1)
return 1;
if (!(flag & 2)) {
sprintf(msg, "Cannot address start byte %.f",
(double) byte_address);
libdax_msgs_submit(libdax_messenger,
d->global_index, 0x00020147,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
msg, errno, 0);
}
return 0;
}
/* ts A70904 */
/** @param flag bit0=be silent on data shortage */
int burn_stdio_read(int fd, char *buf, int bufsize, struct burn_drive *d,
@ -334,11 +355,80 @@ int burn_stdio_read(int fd, char *buf, int bufsize, struct burn_drive *d,
}
/* With DVD and BD media, the minimum ECC entity is read instead of single
blocks.
@param flag see burn_read_data() in libburn.h
*/
static int retry_mmc_read(struct burn_drive *d, int chunksize, int sose_mem,
int start, char **wpt, off_t *data_count,
int flag)
{
int i, err, todo;
int retry_at, retry_size;
retry_at = start;
retry_size = chunksize;
todo = chunksize;
retry_size = 16; /* DVD ECC block size */
if (d->current_is_cd_profile) {
retry_size = 1; /* CD block size */
} else if (d->current_profile >= 0x40 && d->current_profile <= 0x43) {
retry_size = 32; /* BD cluster size */
}
for (i = 0; todo > 0; i++) {
if (flag & 2)
d->silent_on_scsi_error = 1;
retry_at = start + i * retry_size;
if (retry_size > todo)
retry_size = todo;
err = d->read_10(d, retry_at, retry_size, d->buffer);
if (flag & 2)
d->silent_on_scsi_error = sose_mem;
if (err == BE_CANCELLED)
return 0;
memcpy(*wpt, d->buffer->data, retry_size * 2048);
*wpt += retry_size * 2048;
*data_count += retry_size * 2048;
todo -= retry_size;
}
return 1;
}
/* @param flag see burn_read_data() in libburn.h
*/
static int retry_stdio_read(struct burn_drive *d, int fd, int chunksize,
int start, char **wpt, off_t *data_count,
int flag)
{
int i, ret, to_read, todo;
ret = burn_stdio_seek(fd, ((off_t) start) * 2048, d, flag & 2);
if (ret <= 0)
return ret;
todo = chunksize * 2048;
for (i = 0; todo > 0; i += 2048) {
to_read = todo;
if (to_read > 2048)
to_read = 2048;
ret = burn_stdio_read(fd, (char *) d->buffer->data, to_read,
d, 1);
if (ret <= 0)
return 0;
memcpy(*wpt, d->buffer->data, to_read);
*wpt += to_read;
*data_count += to_read;
todo -= to_read;
}
return 1;
}
/* ts A70812 : API function */
int burn_read_data(struct burn_drive *d, off_t byte_address,
char data[], off_t data_size, off_t *data_count, int flag)
{
int alignment = 2048, start, upto, chunksize = 1, err, cpy_size, i;
int alignment = 2048, start, upto, chunksize = 1, err, cpy_size;
int sose_mem = 0, fd = -1, ret;
char msg[81], *wpt;
struct buffer *buf = NULL, *buffer_mem = d->buffer;
@ -444,18 +534,9 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
ret= -2;
goto ex;
}
if (lseek(fd, byte_address, SEEK_SET) == -1) {
if (!(flag & 2)) {
sprintf(msg, "Cannot address start byte %.f",
(double) byte_address);
libdax_msgs_submit(libdax_messenger,
d->global_index,
0x00020147,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
msg, errno, 0);
}
ret = 0; goto ex;
}
ret = burn_stdio_seek(fd, byte_address, d, flag & 2);
if (ret <= 0)
goto ex;
}
d->busy = BURN_DRIVE_READING_SYNC;
@ -484,7 +565,7 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
err = d->read_10(d, start, chunksize, d->buffer);
} else {
ret = burn_stdio_read(fd, (char *) d->buffer->data,
cpy_size, d, !!(flag & 2));
cpy_size, d, !!(flag & 2));
err = 0;
if (ret <= 0)
err = BE_CANCELLED;
@ -494,41 +575,25 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
if (err == BE_CANCELLED) {
if ((flag & 16) && (d->had_particular_error & 1))
{ret = -3; goto ex;}
/* Try to read a smaller part of the chunk */
if(!(flag & 4))
for (i = 0; i < chunksize - 1; i++) {
if (flag & 2)
d->silent_on_scsi_error = 1;
if (d->drive_role == 1) {
err = d->read_10(d, start + i, 1,
d->buffer);
} else {
ret = burn_stdio_read(fd,
(char *) d->buffer->data,
2048, d, 1);
if (ret <= 0)
err = BE_CANCELLED;
}
if (flag & 2)
d->silent_on_scsi_error = sose_mem;
if (err == BE_CANCELLED)
break;
memcpy(wpt, d->buffer->data, 2048);
wpt += 2048;
*data_count += 2048;
/* Retry: with CD read by single blocks
with other media: retry in full chunks
*/
if(flag & 4)
goto bad_read;
if (d->drive_role == 1) {
ret = retry_mmc_read(d, chunksize, sose_mem,
start, &wpt, data_count, flag);
} else {
ret = retry_stdio_read(d, fd, chunksize,
start, &wpt, data_count, flag);
}
if (!(flag & 2))
libdax_msgs_submit(libdax_messenger,
d->global_index,
0x00020000,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
"burn_read_data() returns 0",
0, 0);
ret = 0; goto ex;
if (ret <= 0)
goto bad_read;
} else {
memcpy(wpt, d->buffer->data, cpy_size);
wpt += cpy_size;
*data_count += cpy_size;
}
memcpy(wpt, d->buffer->data, cpy_size);
wpt += cpy_size;
*data_count += cpy_size;
}
ret = 1;
@ -537,6 +602,14 @@ ex:;
d->buffer = buffer_mem;
d->busy = BURN_DRIVE_IDLE;
return ret;
bad_read:;
if (!(flag & 2))
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020000,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
"burn_read_data() returns 0", 0, 0);
ret = 0; goto ex;
}

View File

@ -244,7 +244,7 @@ int burn_os_is_2k_seekrw(char *path, int flag)
0 = could not estimate size capacity of file object
1 = estimation has been made, bytes was set
*/
int burn_os_stdio_capacity(char *path, off_t *bytes)
int burn_os_stdio_capacity(char *path, off_t write_start, off_t *bytes)
{
struct stat stbuf;
@ -289,7 +289,7 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
#endif /* Libburn_if_this_was_linuX */
} else if(S_ISREG(stbuf.st_mode)) {
add_size = stbuf.st_blocks * (off_t) 512;
add_size = burn_sparse_file_addsize(write_start, &stbuf);
strcpy(testpath, path);
} else
{ret = 0; goto ex;}

View File

@ -716,7 +716,7 @@ int burn_os_is_2k_seekrw(char *path, int flag)
0 = could not estimate size capacity of file object
1 = estimation has been made, bytes was set
*/
int burn_os_stdio_capacity(char *path, off_t *bytes)
int burn_os_stdio_capacity(char *path, off_t write_start, off_t *bytes)
{
struct stat stbuf;
struct statvfs vfsbuf;
@ -769,7 +769,7 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
{ret = -2; goto ex;}
*bytes = add_size;
} else if(S_ISREG(stbuf.st_mode)) {
add_size = stbuf.st_blocks * (off_t) 512;
add_size = burn_sparse_file_addsize(write_start, &stbuf);
strcpy(testpath, path);
} else
{ret = 0; goto ex;}

View File

@ -1051,7 +1051,7 @@ int burn_os_is_2k_seekrw(char *path, int flag)
0 = could not estimate size capacity of file object
1 = estimation has been made, bytes was set
*/
int burn_os_stdio_capacity(char *path, off_t *bytes)
int burn_os_stdio_capacity(char *path, off_t write_start, off_t *bytes)
{
struct stat stbuf;
struct statvfs vfsbuf;
@ -1104,7 +1104,7 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
{ret = -2; goto ex;}
*bytes = add_size;
} else if(S_ISREG(stbuf.st_mode)) {
add_size = stbuf.st_blocks * (off_t) 512;
add_size = burn_sparse_file_addsize(write_start, &stbuf);
strcpy(testpath, path);
} else
{ret = 0; goto ex;}

View File

@ -865,7 +865,7 @@ int burn_os_is_2k_seekrw(char *path, int flag)
0 = could not estimate size capacity of file object
1 = estimation has been made, bytes was set
*/
int burn_os_stdio_capacity(char *path, off_t *bytes)
int burn_os_stdio_capacity(char *path, off_t write_start, off_t *bytes)
{
struct stat stbuf;
@ -944,7 +944,7 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
#endif /* Libburn_is_on_solariS */
} else if(S_ISREG(stbuf.st_mode)) {
add_size = stbuf.st_blocks * (off_t) 512;
add_size = burn_sparse_file_addsize(write_start, &stbuf);
strcpy(testpath, path);
} else
{ret = 0; goto ex;}

View File

@ -2169,6 +2169,24 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
c->end_time = burn_get_time(0);
/*
# de fine Libburn_ff_netbsd_mockuP
*/
#ifdef Libburn_ff_netbsd_mockuP
if (c->opcode[0] == 0x5a) {
sprintf(msg, "Libburn_ff_netbsd_mockuP : Emulating zero reply from SCSI command 5A");
if (burn_sg_log_scsi & 3)
scsi_log_message(d, fp, msg, 0);
libdax_msgs_submit(libdax_messenger,
d->global_index, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
msg, 0, 0);
memset(c->page->data, 0, c->page->bytes);
c->error = 1;
c->dxfer_len = 0;
}
#endif
/* ts A61010 */
/* a ssert(err != -1); */
if (err == -1) {
@ -2353,7 +2371,7 @@ int burn_os_is_2k_seekrw(char *path, int flag)
0 = could not estimate size capacity of file object
1 = estimation has been made, bytes was set
*/
int burn_os_stdio_capacity(char *path, off_t *bytes)
int burn_os_stdio_capacity(char *path, off_t write_start, off_t *bytes)
{
struct stat stbuf;
struct statvfs vfsbuf;
@ -2386,7 +2404,7 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
{ret = -2; goto ex;}
*bytes = ((off_t) blocks) * (off_t) 512;
} else if(S_ISREG(stbuf.st_mode)) {
add_size = stbuf.st_blocks * (off_t) 512;
add_size = burn_sparse_file_addsize(write_start, &stbuf);
strcpy(testpath, path);
} else
{ret = 0; goto ex;}

View File

@ -730,7 +730,7 @@ int burn_os_is_2k_seekrw(char *path, int flag)
{
struct stat stbuf;
int l, i, dev, tl;
char try[16], *cpt;
char try[16];
/* >>> ??? Is this a comprehensive list of lseek()-capable devices ? */
/* http://www.netbsd.org/docs/guide/en/chap-rmmedia.html */
@ -755,7 +755,6 @@ int burn_os_is_2k_seekrw(char *path, int flag)
tl = strlen(try);
if (strncmp(path, try, tl) != 0)
continue;
cpt = path + tl;
l -= tl;
for (i = 0; i < Libburn_netbsd_max_cdnuM; i++) {
sprintf(try + tl, "%d", i);
@ -787,7 +786,7 @@ int burn_os_is_2k_seekrw(char *path, int flag)
0 = could not estimate size capacity of file object
1 = estimation has been made, bytes was set
*/
int burn_os_stdio_capacity(char *path, off_t *bytes)
int burn_os_stdio_capacity(char *path, off_t write_start, off_t *bytes)
{
struct stat stbuf;
int ret;
@ -830,7 +829,7 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
}
} else if(S_ISREG(stbuf.st_mode)) {
add_size = stbuf.st_blocks * (off_t) 512;
add_size = burn_sparse_file_addsize(write_start, &stbuf);
strcpy(testpath, path);
} else
{ret = 0; goto ex;}

View File

@ -785,7 +785,7 @@ int burn_os_is_2k_seekrw(char *path, int flag)
0 = could not estimate size capacity of file object
1 = estimation has been made, bytes was set
*/
int burn_os_stdio_capacity(char *path, off_t *bytes)
int burn_os_stdio_capacity(char *path, off_t write_start, off_t *bytes)
{
struct stat stbuf;
int ret;
@ -826,7 +826,7 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
}
} else if(S_ISREG(stbuf.st_mode)) {
add_size = stbuf.st_blocks * (off_t) 512;
add_size = burn_sparse_file_addsize(write_start, &stbuf);
strcpy(testpath, path);
} else
{ret = 0; goto ex;}

View File

@ -70,11 +70,13 @@
static int intentional_compiler_warning(void)
{
int INTENTIONAL_COMPILER_WARNING_;
int Cannot_recognize_GNU_Linux_nor_FreeBSD_nor_Solaris_nor_NetBSD_;
int Cannot_recognize_supported_operating_system_;
int Like_GNU_Linux_or_FreeBSD_or_Solaris_or_NetBSD_;
int Have_to_use_dummy_MMC_transport_adapter_;
int This_libburn_will_not_be_able_to_operate_on_real_CD_drives;
int Have_to_use_dummy_MMC_transport_adapter;
int Cannot_recognize_GNU_Linux_nor_FreeBSD_nor_Solaris_nor_NetBSD;
int Like_GNU_Linux_or_FreeBSD_or_Solaris_or_NetBSD;
int Cannot_recognize_supported_operating_system;
int INTENTIONAL_COMPILER_WARNING;
return(0);

View File

@ -36,7 +36,7 @@ int sg_drive_is_open(struct burn_drive * d);
int burn_os_is_2k_seekrw(char *path, int flag);
int burn_os_stdio_capacity(char *path, off_t *bytes);
int burn_os_stdio_capacity(char *path, off_t write_start, off_t *bytes);
/* ts A91227 */
/** Returns the id string of the SCSI transport adapter and eventually

View File

@ -17,6 +17,8 @@
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@ -377,4 +379,23 @@ double burn_get_time(int flag)
return (double) time(NULL);
}
/* ts B40609 */
off_t burn_sparse_file_addsize(off_t write_start, struct stat *stbuf)
{
off_t add_size;
add_size = stbuf->st_blocks * (off_t) 512;
if (add_size < stbuf->st_size) {
/* Sparse file */
if (write_start < stbuf->st_size) {
/* Might write into sparse gaps */
if (write_start > add_size)
add_size = write_start;
} else {
/* Will not write into sparse area */
add_size = stbuf->st_size;
}
}
return add_size;
}

View File

@ -1,6 +1,11 @@
#ifndef __UTIL
#define __UTIL
/* for struct stat */
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
/* ts A90905 */
int burn_util_make_printable_word(char **text, int flag);
@ -14,4 +19,7 @@ void burn_int_to_lsb(int val, char *target);
/* ts B30609 */
double burn_get_time(int flag);
/* ts B40609 */
off_t burn_sparse_file_addsize(off_t write_start, struct stat *stbuf);
#endif

View File

@ -86,6 +86,10 @@ extern struct libdax_msgs *libdax_messenger;
*/
#define Libburn_bd_streamed_obS (64 * 1024)
/* The number of retries if write(2) returns a short, non-negative write count.
*/
#define Libburn_stdio_write_retrieS 16
static int type_to_ctrl(int mode)
{
@ -2575,29 +2579,41 @@ int burn_stdio_read_source(struct burn_source *source, char *buf, int bufsize,
int burn_stdio_write(int fd, char *buf, int count, struct burn_drive *d,
int flag)
{
int ret;
int ret = 0;
char *msg = NULL;
int todo, done, retries;
if (d->cancel)
if (d->cancel || count <= 0)
return 0;
todo = count;
done = 0;
for (retries = 0; todo > 0 && retries <= Libburn_stdio_write_retrieS;
retries++) {
/*
fprintf(stderr, "libburn_DEBUG: write(%d, %lX, %d)\n",
fd, (unsigned long) buf, count);
*/
ret = write(fd, buf, count);
if (ret != count) {
ret = write(fd, buf + done, todo);
if (ret < 0)
break;
done += ret;
todo -= ret;
}
if (done != count) {
BURN_ALLOC_MEM(msg, char, 160);
sprintf(msg,
"Cannot write desired amount of data. write(2) returned %d.",
ret);
sprintf(msg, "Cannot write desired amount of %d bytes.", count);
if (retries > 1)
sprintf(msg + strlen(msg), " Did %d retries. Last",
retries - 1);
sprintf(msg + strlen(msg), " write(2) returned %d.", ret);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020148,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
msg, errno, 0);
d->cancel = 1;
return 0;
ret = 0; goto ex;
}
ex:;
BURN_FREE_MEM(msg);
@ -2662,10 +2678,11 @@ int burn_stdio_mmc_dummy_write(struct burn_drive *d, int start,
/* ts A70911 */
/* Flush stdio system buffer to physical device.
@param flag bit0= do not report debug message (intermediate sync)
bit1= do fsync(2) unconditionally
*/
int burn_stdio_sync_cache(int fd, struct burn_drive *d, int flag)
{
int ret;
int ret, do_fsync;
char *msg = NULL;
if (fd < 0) {
@ -2678,11 +2695,20 @@ int burn_stdio_sync_cache(int fd, struct burn_drive *d, int flag)
return 0;
}
d->needs_sync_cache = 0;
if (!(flag & 1))
libdax_msgs_submit(libdax_messenger, -1, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
"syncing cache (stdio fsync)", 0, 0);
ret = fsync(fd);
do_fsync = 0;
if (flag & 2)
do_fsync = 1;
else if (d->write_opts != NULL)
do_fsync = (d->write_opts->stdio_fsync_size >= 0);
if (do_fsync) {
if (!(flag & 1))
libdax_msgs_submit(libdax_messenger, -1, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
"syncing cache (stdio fsync)", 0, 0);
ret = fsync(fd);
} else {
ret = 0;
}
if (ret != 0 && errno == EIO) {
BURN_ALLOC_MEM(msg, char, 160);
@ -3283,7 +3309,7 @@ int burn_random_access_write(struct burn_drive *d, off_t byte_address,
if(d->drive_role == 1)
d->sync_cache(d);
else
burn_stdio_sync_cache(fd, d, 0);
burn_stdio_sync_cache(fd, d, 2);
d->needs_sync_cache = 0;
}