Compare commits

...

55 Commits

Author SHA1 Message Date
43f9268440 Documented changes and release timestamp 2009-07-14 10:24:17 +00:00
dbc5517a62 Updated cdrskin tarball generator 2009-07-14 10:23:04 +00:00
e997e8ef67 Made number transition and activated development documentation 2009-07-14 10:21:03 +00:00
8657f0ceb8 Branching for libburn release 0.6.8 2009-07-14 07:52:49 +00:00
19a668a48e Timestamp for revision 2691 2009-07-07 19:17:40 +00:00
6ceabaff32 configure options --enable-libdir-pkgconfig and --enable-pkgconfig-path=DIR 2009-07-07 19:12:18 +00:00
b65b852c15 Retrying 3 times on EBUSY drives with generous usleep intervals 2009-06-14 09:49:47 +00:00
1ccedd5572 Bug fix: No usable media was detected with old MMC-1 drives 2009-06-03 18:53:57 +00:00
473e205c9e Bug fix: Old MMC-1 drives were rejected because of mode page 2Ah length 2009-06-03 08:58:18 +00:00
2522bebfbd Avoided to enumerate faulty drive objects 2009-06-02 17:21:43 +00:00
8276611468 Avoided SIGSEGV if no drives were found by scan 2009-06-02 16:30:06 +00:00
38994b62c0 Rectified use of burn_drive.mdata->valid 2009-06-02 16:28:33 +00:00
474c4cddd7 Made -scanbus work with SCSI bus numbers like 85 (USB, kernel 2.6.18.2) 2009-05-17 14:42:52 +00:00
b0b4bc57f8 Documented changes and release timestamp 2009-05-07 18:17:54 +00:00
b97fa7a451 Updated cdrskin tarball generator 2009-05-07 18:16:55 +00:00
8aca8e9921 Made number transition and activated development documentation 2009-05-07 18:15:47 +00:00
15b31b121a Mentioned BD were it was missing 2009-05-07 18:12:32 +00:00
e5632de786 Bug fix: Device scan stalled on FreeBSD. Ticket 148 jwele 2009-04-30 07:08:23 +00:00
91e3a2f3f7 Replaced 8 blanks by a tab 2009-04-30 06:59:35 +00:00
0ffc4bd19b Marked alleged use of uninitialized memory reported by valgrind 2009-04-30 06:56:47 +00:00
9cb4e4281e Bug fix: burn_abort() did not work with broken output pipe (since rev 2514) 2009-03-18 17:25:00 +00:00
f87747802a Human readable error messages for asc=08 "Logical unit communication failure" 2009-03-18 12:45:59 +00:00
4626304e39 Get on FreeBSD pkgconfigdir=.../libdata , on Linux and others: .../lib 2009-03-16 19:07:45 +00:00
d19abc1940 Documented changes and release timestamp 2009-03-13 14:15:46 +00:00
5ef7b4b445 Updated cdrskin tarball generator 2009-03-13 14:10:09 +00:00
033107b436 Made libburn number transition to 0.6.5 2009-03-13 14:03:13 +00:00
635405da8f Reacted on compiler warnings of SchilliX-0.6.7 (based on Solaris 5.11) 2009-03-08 14:01:10 +00:00
aafa543391 Lifted the ban on operating systems other than Linux and FreeBSD 2009-03-05 14:53:00 +00:00
8594cd96bc Making optional use of statvfs() in sg-dummy 2009-03-03 09:20:53 +00:00
b07c83ed86 Added a dummy function with loud compiler warning to sg.c dummy case 2009-03-02 20:01:37 +00:00
d74b1a2008 Fixed a race condition on abort with stdio writing which could cause SIGSEGV 2009-03-02 19:33:47 +00:00
8c56ca131f New operating system adapter "dummy" for stdio on POSIX-like systems 2009-03-02 17:01:21 +00:00
53e4483460 New stream_recording mode with start number 2009-02-27 21:17:05 +00:00
591c385489 New API function burn_drive_set_stream_recording() 2009-02-27 14:30:57 +00:00
b0f1f67495 Forgotten version leap to 0.6.3 in libburn.h 2009-02-20 13:23:57 +00:00
6139fb32dd Updated cdrskin tarball generator 2009-02-20 12:52:15 +00:00
01ed4729bd Made number transition to 0.6.3 2009-02-20 12:50:12 +00:00
350ac05bfd Human readable error messages with asynchronous SCSI errors 2009-02-19 19:28:16 +00:00
5f55a436e8 Mentioned hald as possibly conflicting service 2009-02-04 10:56:11 +00:00
3baaa886be Linking with $LIBBURN_ARCH_LIBS to get -lcam on FreeBSD 2009-02-04 10:28:26 +00:00
d4147e72f0 Mentioned the need for 64 bit file i/o 2009-01-27 12:10:39 +00:00
116798e081 Updated cookbook about BD-R media 2009-01-11 13:45:09 +00:00
7cc43c44e9 Prepared eventual closing of spoiled BD-R media by a pseudo write run 2009-01-11 10:28:05 +00:00
de0b3dd469 Preventing a possible bug with a burn run of more than one session at once 2009-01-09 16:17:25 +00:00
596d5bc5b0 Recognizing BD-R media spoiled by the close bug and handling them as appendable 2009-01-09 09:59:59 +00:00
867093d7d4 Mentioned bug fix and pl01 2009-01-07 15:50:05 +00:00
47dd4d8c09 Bug fix: BD-R were not correctly finalized 2009-01-07 15:44:30 +00:00
01a825310e Clarification about one-time DVD and BD media 2009-01-07 15:36:51 +00:00
96043eddf5 Complaining and refusing more early with unformatted BD-RE 2009-01-06 13:53:01 +00:00
5a65d6fa07 Complaining and refusing more early with unformatted BD-RE 2009-01-06 12:28:20 +00:00
aca01b88f3 Error texts for ASC 73 : power calibration and program memory 2009-01-06 12:25:53 +00:00
6d667880e5 Documented changes and release timestamp 2009-01-04 11:37:05 +00:00
1a667c86bc Updated cdrskin tarball generator 2009-01-04 11:36:33 +00:00
7c64d4bc13 Made number transition to 0.6.1 2009-01-04 11:35:19 +00:00
6fea3d0a9b Updated copyright claims to year 2009 2009-01-04 11:29:37 +00:00
33 changed files with 1988 additions and 289 deletions

View File

@ -1,7 +1,7 @@
Derek Foreman <derek@signalmarketing.com> and Ben Jansens <xor@orodu.net>
Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
Mario Danic <mario.danic@gmail.com>, Thomas Schmitt <scdbackup@gmx.net>
Copyright (C) 2006-2008 Mario Danic, Thomas Schmitt
Copyright (C) 2006-2009 Mario Danic, Thomas Schmitt
This program is free software; you can redistribute it and/or modify

View File

@ -1,4 +1,8 @@
pkgconfigdir=$(libdir)/pkgconfig
# ts A90315 : LIBBURNIA_PKGCONFDIR is defined OS specific in acinclude.m4
# was: pkgconfigdir=$(libdir)/pkgconfig
pkgconfigdir=$(LIBBURNIA_PKGCONFDIR)
libincludedir=$(includedir)/libburn
lib_LTLIBRARIES = libburn/libburn.la
@ -82,32 +86,34 @@ noinst_PROGRAMS = \
bin_PROGRAMS = \
cdrskin/cdrskin
LIBBURN_EXTRALIBS = $(LIBBURN_ARCH_LIBS) $(THREAD_LIBS)
test_libburner_CPPFLAGS = -Ilibburn
test_libburner_LDADD = $(libburn_libburn_la_OBJECTS) $(THREAD_LIBS)
test_libburner_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
test_libburner_SOURCES = test/libburner.c
test_telltoc_CPPFLAGS = -Ilibburn
test_telltoc_LDADD = $(libburn_libburn_la_OBJECTS) $(THREAD_LIBS)
test_telltoc_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
test_telltoc_SOURCES = test/telltoc.c
test_dewav_CPPFLAGS = -Ilibburn
test_dewav_LDADD = $(libburn_libburn_la_OBJECTS) $(THREAD_LIBS)
test_dewav_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
test_dewav_SOURCES = test/dewav.c
test_fake_au_CPPFLAGS =
test_fake_au_LDADD =
test_fake_au_SOURCES = test/fake_au.c
test_poll_CPPFLAGS = -Ilibburn
test_poll_LDADD = $(libburn_libburn_la_OBJECTS) $(THREAD_LIBS)
test_poll_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
test_poll_SOURCES = test/poll.c
test_structest_CPPFLAGS = -Ilibburn
test_structest_LDADD = $(libburn_libburn_la_OBJECTS) $(THREAD_LIBS)
test_structest_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
test_structest_SOURCES = test/structest.c
## cdrskin construction site - ts A60816 - A81207
## cdrskin construction site - ts A60816 - A90507
cdrskin_cdrskin_CPPFLAGS = -Ilibburn
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_5_9
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_6_8
# cdrskin_cdrskin_LDADD = $(libburn_libburn_la_OBJECTS) $(THREAD_LIBS)
# cdrskin_cdrskin_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
# ts A80123, change proposed by Simon Huggins to cause dynamic libburn linking
cdrskin_cdrskin_LDADD = libburn/libburn.la $(THREAD_LIBS)
cdrskin_cdrskin_LDADD = libburn/libburn.la $(LIBBURN_EXTRALIBS)
cdrskin_cdrskin_SOURCES = cdrskin/cdrskin.c cdrskin/cdrfifo.c cdrskin/cdrfifo.h cdrskin/cdrskin_timestamp.h
##

81
README
View File

@ -6,12 +6,12 @@ This all is under GPL.
------------------------------------------------------------------------------
libburn-project.org
By Mario Danic <mario.danic@gmail.com> and Thomas Schmitt <scdbackup@gmx.net>
Copyright (C) 2006-2008 Mario Danic, Thomas Schmitt
Copyright (C) 2006-2009 Mario Danic, Thomas Schmitt
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-0.5.8.pl00.tar.gz
http://files.libburnia-project.org/releases/libburn-0.6.8.pl00.tar.gz
------------------------------------------------------------------------------
@ -19,10 +19,10 @@ Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
From tarball
Obtain libburn-0.5.8.pl00.tar.gz, take it to a directory of your choice and do:
Obtain libburn-0.6.8.pl00.tar.gz, take it to a directory of your choice and do:
tar xzf libburn-0.5.8.pl00.tar.gz
cd libburn-0.5.8
tar xzf libburn-0.6.8.pl00.tar.gz
cd libburn-0.6.8
./configure --prefix=/usr
make
@ -35,6 +35,11 @@ and to install the cdrecord compatibility binary cdrskin, do
This procedure installs libburn.so.4 and cdrskin depending on it.
For a standalone cdrskin binary, see cdrskin/README.
A behavioral conflict is known between any burn software and demons like hald
which probe CD drives. This can spoil burn runs for CD-R or CD-RW.
You may have to keep your hald away from the drive. See for example
http://www.freebsd.org/gnome/docs/halfaq.html
From SVN
@ -42,8 +47,8 @@ Our build system is based on autotools. For preparing the build of a SVN
snapshot you will need autotools of at least version 1.7.
Do in a directory of your choice:
svn co http://svn.libburnia-project.org/libburn/trunk libburn-0.5.9
cd libburn-0.5.9
svn co http://svn.libburnia-project.org/libburn/trunk libburn-0.6.3
cd libburn-0.6.3
./bootstrap
./configure --prefix=/usr
make
@ -78,8 +83,10 @@ These are libraries, language bindings, and middleware binaries which emulate
classical (and valuable) Linux tools.
Currently it is supported on Linux with kernels >= 2.4 and on FreeBSD versions
with ATAPI/CAM support enabled in the kernel, see atapicam(4).
On other X/Open compliant systems there will only be pseudo drives, but no
direct MMC operation on real CD/DVD/BD drives.
For ports to other systems we would need : login on a development machine
For full ports to other systems we would need : login on a development machine
resp. a live OS on CD or DVD, advise from a system person about the equivalent
of Linux sg or FreeBSD CAM, volunteers for testing of realistic use cases.
@ -153,6 +160,13 @@ libburn.so.4 (since 0.3.4, March 2007),
libisofs.so.6 (since 0.6.2, February 2008),
libisoburn.so.1 (since 0.1.0, February 2008).
Applications must use 64 bit off_t. E.g. by defining
#define _LARGEFILE_SOURCE
#define _FILE_OFFSET_BITS 64
or take special precautions to interface with the libraries by 64 bit integers
where the .h files prescribe off_t. Not to use 64 bit file i/o will keep the
application from producing and processing ISO images of more than 2 GB size.
------------------------------------------------------------------------------
Project history as far as known to me:
@ -348,6 +362,57 @@ Project history as far as known to me:
- 9th Dec 2008 Our project received a donation from Thomas Weber.
- 2nd Jan 2009 libburn-0.6.0 allows to format BD-R and to write to either
formatted or unformatted BD-R.
- 6th Jan 2009 libisoburn-0.3.2. xorriso can produce and execute commands for
mounting older sessions from all kinds of media. Pseudo-drives outside the
/dev/ tree can be addressed without prefix "stdio:".
- 20th Feb 2009 libburn-0.6.2 source release now compiles out of the box
on FreeBSD.
- 28 Feb 2009 libisofs-0.6.14 can record ACLs and Extended Attributes xattr
in its ISO images.
- 01 Mar 2009 libisoburn-0.3.4. xorriso makes use of the ACL and xattr
capabilities provided by libisofs for xorriso backup features.
- 11 Mar 2009 libisofs-0.6.16 of libisofs fixes two bugs which on Solaris
prevented to navigate the ISO images by ".." and to recognize the Rock Ridge
extensions of ISO images. The ban to build libisofs on operating systems
other than Linux and FreeBSD has been lifted.
- 13 Mar 2009 libburn-0.6.4 got a dummy adapter for SCSI/MMC command transport.
It will show no drives and thus libburn will only be able to perform
operations on "stdio:" pseudo drives. Nevertheless this allowed to lift the
ban to build libburn on operating systems other than Linux and FreeBSD.
- 16 Mar 2009 libisoburn-0.3.6: xorriso uses RRIP version 1.10 as default
in order to be mountable where mkisofs images are mountable.
- 17 Apr 2009 libisofs-0.6.18 introduces content filtering of data files.
Built-in filters allow compression to formats gzip and zisofs. External
filter processes allow arbitrary data conversions like encryption.
- 19 Apr 2009 libisoburn-0.3.8 makes use of the new libisofs capability to
perform content filtering of data files.
- 08 May 2009 libburn-0.6.6 fixes a bug with aborting on broken output pipe
and a bug with device scan on FreeBSD.
- 31 May 2009 libisofs-0.6.20 can record hard link relations in ISO images
and offers support with restoring them to disk. Current Linux kernels will
mount images with such hard links but will attribute a unique inode number
to each file.
- 28 Jun 2009 libisoburn-0.4.0: xorriso can record and restore hard link
relations of files. Performance of data reading has been improved. Option
-find now supports logical operators with its tests.
- 14 Jul 2009 libburn-0.6.8 fixes bugs and shortcommings with old MMC-1 drives
and with large SCSI bus numbers as handed out by Linux for USB drives.
------------------------------------------------------------------------------

View File

@ -1,9 +1,11 @@
AC_DEFUN([TARGET_SHIZZLE],
[
ARCH=""
LIBBURNIA_PKGCONFDIR="$libdir"/pkgconfig
AC_MSG_CHECKING([target operating system])
case $target in
*-*-linux*)
ARCH=linux
@ -12,11 +14,66 @@ AC_DEFUN([TARGET_SHIZZLE],
*-*-freebsd*)
ARCH=freebsd
LIBBURN_ARCH_LIBS=-lcam
LIBBURNIA_PKGCONFDIR=$(echo "$libdir" | sed 's/\/lib$/\/libdata/')/pkgconfig
;;
*)
AC_ERROR([You are attempting to compile for an unsupported platform])
ARCH=
LIBBURN_ARCH_LIBS=
# AC_ERROR([You are attempting to compile for an unsupported platform])
;;
esac
AC_MSG_RESULT([$ARCH])
])
dnl LIBBURNIA_SET_PKGCONFIG determines the install directory for the *.pc file.
dnl Important: Must be performed _after_ TARGET_SHIZZLE
dnl
AC_DEFUN([LIBBURNIA_SET_PKGCONFIG],
[
### for testing --enable-libdir-pkgconfig on Linux
### LIBBURNIA_PKGCONFDIR="$libdir"data/pkgconfig
if test "x$LIBBURNIA_PKGCONFDIR" = "x$libdir"/pkgconfig
then
dummy=dummy
else
AC_ARG_ENABLE(libdir-pkgconfig,
[ --enable-libdir-pkgconfig Install to $libdir/pkgconfig on any OS, default=no],
, enable_libdir_pkgconfig="no")
AC_MSG_CHECKING([for --enable-libdir-pkgconfig])
if test "x$enable_libdir_pkgconfig" = xyes
then
LIBBURNIA_PKGCONFDIR="$libdir"/pkgconfig
fi
AC_MSG_RESULT([$enable_libdir_pkgconfig])
fi
libburnia_pkgconfig_override="no"
AC_ARG_ENABLE(pkgconfig-path,
[ --enable-pkgconfig-path=DIR Absolute path of directory for libisofs-*.pc],
libburnia_pkgconfig_override="yes" , enable_pkgconfig_path="none")
AC_MSG_CHECKING([for overridden pkgconfig directory path])
if test "x$enable_pkgconfig_path" = xno
then
libburnia_pkgconfig_override="no"
fi
if test "x$enable_pkgconfig_path" = x -o "x$enable_pkgconfig_path" = xyes
then
libburnia_pkgconfig_override="invalid argument"
fi
if test "x$libburnia_pkgconfig_override" = xyes
then
LIBBURNIA_PKGCONFDIR="$enable_pkgconfig_path"
AC_MSG_RESULT([$LIBBURNIA_PKGCONFDIR])
else
AC_MSG_RESULT([$libburnia_pkgconfig_override])
fi
AC_SUBST(LIBBURNIA_PKGCONFDIR)
dnl For debugging only
### AC_MSG_RESULT([LIBBURNIA_PKGCONFDIR = $LIBBURNIA_PKGCONFDIR])
])

View File

@ -4,8 +4,9 @@
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-0.5.9.tar.gz
Copyright (C) 2006-2008 Thomas Schmitt, provided under GPL version 2.
http://scdbackup.sourceforge.net/cdrskin-0.6.8.pl00.tar.gz
Copyright (C) 2006-2009 Thomas Schmitt, provided under GPL version 2.
------------------------------------------------------------------------------
@ -14,6 +15,8 @@ most of the libburn features from the command line.
Currently it is supported on Linux with kernels >= 2.4 and on FreeBSD versions
with ATAPI/CAM support enabled in the kernel, see atapicam(4).
On other X/Open compliant systems there will only be emulated drives, but no
direct MMC operation on real CD/DVD/BD drives.
By using this software you agree to the disclaimer at the end of this text
"This software is provided as is. There is no warranty implied and ..."
@ -21,10 +24,10 @@ By using this software you agree to the disclaimer at the end of this text
Compilation, First Glimpse, Installation
Obtain cdrskin-0.5.9.tar.gz, take it to a directory of your choice and do:
Obtain cdrskin-0.6.8.pl00.tar.gz, take it to a directory of your choice and do:
tar xzf cdrskin-0.5.9.tar.gz
cd cdrskin-0.5.9
tar xzf cdrskin-0.6.8.pl00.tar.gz
cd cdrskin-0.6.8
Within that directory execute:
@ -119,6 +122,11 @@ as listed device files. This addressing via e.g. /dev/sr0 or /dev/scd1 is
compatible with generic read programs like dd and with write program growisofs.
For finding /dev/sg1 from /dev/sr0, the program needs rw-access to both files.
A behavioral conflict is known between any burn software and demons like hald
which probe CD drives. This can spoil burn runs for CD-R or CD-RW.
You may have to keep your hald away from the drive. See for example
http://www.freebsd.org/gnome/docs/halfaq.html
Usage examples
@ -281,6 +289,9 @@ nominal speed by option "stream_recording=on".
In this case bad blocks are not detected during write and not even previously
known bad blocks are avoided. So you have to make your own readability tests
and go back to half speed as soon as the first read errors show up.
Instead of "on" one may also set a start address for stream recording.
Like "stream_recording=100m". This will write slowly to the first 100 MB of
the media and accelerate when writing to higher addresses.
Option --grow_overwriteable_iso allows -multi (although unneeded), enables
-msinfo and -toc, and makes blank=fast an invalidator for ISO filesystems
@ -418,7 +429,7 @@ are the cause. Any mistake of the burn program is supposed to be caught
by the drive's firmware and to lead to mere misburns.
The worst mishaps which hit the author imposed the need to reboot the
system because of drives gnawing endlessly on ill media. Permanent hardware
damage did not occur in 2.5 years of development. But one never knows ...
damage did not occur in 3.5 years of development. But one never knows ...
------------------------------------------------------------------------------
@ -446,7 +457,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-2008 Mario Danic, Thomas Schmitt
Copyright (C) 2006-2009 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="0.5.8"
skin_release="0.6.8"
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="0.5.9"
skin_release="0.6.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 "Dec 10, 2008"
.TH CDRSKIN 1 "May 07, 2009"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -67,7 +67,7 @@ Write mode selection
.br
Recordable CD Media
.br
Sequentially Recordable DVD Media
Sequentially Recordable DVD or BD Media
.br
Overwriteable DVD or BD Media
.br
@ -167,9 +167,10 @@ needed.
.B Sequentially Recordable DVD or BD Media:
.br
Currently DVD-RW, DVD-R , DVD+R[/DL], and BD-R can be used for the Sequential
recording model.
recording model. It resembles the model of CD media. Only DVD-RW can be
blanked and re-used from scratch.
.br
This applies to DVD-RW only if they are in state "Sequential Recording".
DVD-RW are sequential media if they are in state "Sequential Recording".
The media must be either blank or appendable.
Newly purchased DVD-RW and DVD-R media are in this state.
Used DVD-RW get into blank sequential state by option
@ -253,7 +254,7 @@ that it has to be formatted again. If in doubt, just give it a try.
.SS
.B Drive preparation and addressing:
.br
The drives, either CD burners or DVD burners, are accessed via addresses which
The drives, CD, DVD, or BD burners, are accessed via addresses which
are specific to libburn and the operating system. Those addresses get listed
by a run of \fBcdrskin --devices\fP.
.br
@ -637,8 +638,8 @@ To have a chance for working on overwriteable media, this option has to be
accompanied by option --grow_overwriteable_iso.
.TP
.BI \-multi
This option keeps the CD or unformatted DVD-R[W] appendable after the current
session has been written.
This option keeps CD, unformatted DVD-R[W], DVD+R, or BD-R appendable
after the current session has been written.
Without it the disc gets closed and may not be written any more - unless it
is a -RW and gets blanked which causes loss of its content.
.br
@ -686,8 +687,8 @@ then behave strange or even go bad for the next few attempts to burn a CD.
One should use it only if inavoidable.
.TP
.BI \-sao
Write CD in Session At Once mode, a sequential DVD-R[W] in Disc-at-once
(DAO) mode, or a DVD+R[/DL].
Write CD in Session At Once mode or sequential DVD-R[W] in Disc-at-once
(DAO) mode.
.br
With CD this mode is able to put several audio tracks on media without
producing audible gaps between them.
@ -695,7 +696,7 @@ producing audible gaps between them.
With DVD-R[W] this mode can only write a single track.
No -multi is allowed with DVD-R[W] -sao.
.br
-sao is permissible with overwriteable DVD, BD or DVD+R[/DL] but actually
-sao is permissible with overwriteable DVD, or DVD+R[/DL], or BD but actually
only imposes restrictions without providing known advantages.
.br
-sao can only be used for tracks of fixely predicted size. This implies that
@ -1185,13 +1186,15 @@ Use and report literal Bus,Target,Lun addresses rather than real SCSI and
pseudo ATA addresses. This method is outdated and was never compatible with
original cdrecord.
.TP
.BI stream_recording="on"|"off"
.BI stream_recording="on"|"off"|number
By setting "on" request that compliance to the desired speed setting is
preferred over management of write errors. With DVD-RAM and BD this can
bring effective write speed near to the nominal write speed of the media.
But it will also disable the automatic use of replacement blocks
if write errors occur. It might as well be disliked or ignored by the drive.
.br
If a number is given, then error management stays enabled for all byte
addresses below that number. Any number below 16s is the same as "off".
.SH EXAMPLES
.SS
.B Get an overview of drives and their addresses:
@ -1236,15 +1239,15 @@ cdrskin -v dev=0,1,0 fs=32m speed=8 \\
.br
blank=as_needed padsize=300k -
.SS
.B Write multi-session to the same CD, DVD-R[W] or DVD+R[/DL]:
.B Write multi-session to the same CD, DVD-R[W], DVD+R[/DL], or BD-R:
.br
cdrskin dev=/dev/hdc -v padsize=300k -multi 1.iso
cdrskin dev=/dev/sr0 -v padsize=300k -multi 1.iso
.br
cdrskin dev=/dev/hdc -v padsize=300k -multi 2.iso
cdrskin dev=/dev/sr0 -v padsize=300k -multi 2.iso
.br
cdrskin dev=/dev/hdc -v padsize=300k -multi 3.iso
cdrskin dev=/dev/sr0 -v padsize=300k -multi 3.iso
.br
cdrskin dev=/dev/hdc -v padsize=300k 4.iso
cdrskin dev=/dev/sr0 -v padsize=300k 4.iso
.SS
.B Get multi-session info for option -C of program mkisofs:
.br

View File

@ -1,6 +1,6 @@
/*
cdrskin.c , Copyright 2006-2008 Thomas Schmitt <scdbackup@gmx.net>
cdrskin.c , Copyright 2006-2009 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2. See future commitment below.
A cdrecord compatible command line interface for libburn.
@ -88,7 +88,7 @@ or
/** The official program version */
#ifndef Cdrskin_prog_versioN
#define Cdrskin_prog_versioN "0.5.9"
#define Cdrskin_prog_versioN "0.6.8"
#endif
/** The official libburn interface revision to use.
@ -98,7 +98,7 @@ or
#define Cdrskin_libburn_majoR 0
#endif
#ifndef Cdrskin_libburn_minoR
#define Cdrskin_libburn_minoR 5
#define Cdrskin_libburn_minoR 6
#endif
#ifndef Cdrskin_libburn_micrO
#define Cdrskin_libburn_micrO 8
@ -135,43 +135,43 @@ or
#endif /* Cdrskin_libburn_cvs_A60220_tS */
#ifdef Cdrskin_libburn_0_5_8
#define Cdrskin_libburn_versioN "0.5.8"
#ifdef Cdrskin_libburn_0_6_8
#define Cdrskin_libburn_versioN "0.6.8"
#define Cdrskin_libburn_from_pykix_svN 1
#endif /* Cdrskin_libburn_0_5_8 */
#endif /* Cdrskin_libburn_0_6_8 */
#ifdef Cdrskin_libburn_0_5_9
#define Cdrskin_libburn_versioN "0.5.9"
#ifdef Cdrskin_libburn_0_6_9
#define Cdrskin_libburn_versioN "0.6.9"
#define Cdrskin_libburn_from_pykix_svN 1
/* Place novelty switch macros here.
Move them down to Cdrskin_libburn_from_pykix_svN on version leap
*/
/* there are no libburn novelties in 0.5.9 yet */
/* there are no libburn novelties yet */
#endif /* Cdrskin_libburn_0_5_9 */
#endif /* Cdrskin_libburn_0_6_9 */
#ifndef Cdrskin_libburn_versioN
#define Cdrskin_libburn_0_5_8
#define Cdrskin_libburn_versioN "0.5.8"
#define Cdrskin_libburn_0_6_8
#define Cdrskin_libburn_versioN "0.6.8"
#define Cdrskin_libburn_from_pykix_svN 1
#endif
#ifdef Cdrskin_libburn_0_5_8
#ifdef Cdrskin_libburn_0_6_8
#undef Cdrskin_libburn_majoR
#undef Cdrskin_libburn_minoR
#undef Cdrskin_libburn_micrO
#define Cdrskin_libburn_majoR 0
#define Cdrskin_libburn_minoR 5
#define Cdrskin_libburn_minoR 6
#define Cdrskin_libburn_micrO 8
#endif
#ifdef Cdrskin_libburn_0_5_9
#ifdef Cdrskin_libburn_0_6_9
#undef Cdrskin_libburn_majoR
#undef Cdrskin_libburn_minoR
#undef Cdrskin_libburn_micrO
#define Cdrskin_libburn_majoR 0
#define Cdrskin_libburn_minoR 5
#define Cdrskin_libburn_minoR 6
#define Cdrskin_libburn_micrO 9
#endif
@ -251,9 +251,15 @@ or
/* 0.4.8 */
/* Bug fix release for write_start_address=... on DVD-RAM and BD-RE */
/* 0.5.0 , 0.5.2 , 0.5.4 , 0.5.6 , 0.5.8 */
/* 0.5.0 , 0.5.2 , 0.5.4 , 0.5.6 , 0.5.8 , 0.6.0 , 0.6.2 */
/* novel libburn features are transparent to cdrskin */
/* 0.6.4 */
/* Ended to mark novelties by macros.
libburnia libburn and cdrskin are fixely in sync now.
icculus libburn did not move for 30 months.
*/
#ifdef Cdrskin_new_api_tesT
@ -2692,10 +2698,13 @@ set_dev:;
" --single_track accept only last argument as source_address\n");
#ifdef Cdrskin_libburn_has_stream_recordinG
printf(" stream_recording=\"on\"|\"off\"|number\n");
printf(
" stream_recording=\"on\"|\"off\" \"on\" requests to prefer speed\n");
" \"on\" requests to prefer speed over write\n");
printf(
" over write error management.\n");
" error management. A number prevents this with\n");
printf(
" byte addresses below that number.\n");
#endif
#ifdef Cdrskin_allow_libburn_taO
@ -2892,7 +2901,7 @@ set_severities:;
int major, minor, micro;
printf(
"Cdrecord 2.01-Emulation Copyright (C) 2006-2008, see libburnia-project.org\n");
"Cdrecord 2.01-Emulation Copyright (C) 2006-2009, see libburnia-project.org\n");
printf("libburn interface : %d.%d.%d\n",
burn_header_version_major, burn_header_version_minor,
burn_header_version_micro);
@ -3120,7 +3129,7 @@ struct CdrskiN {
int gracetime;
int dummy_mode;
int force_is_set;
int stream_recording_is_set;
int stream_recording_is_set; /* see burn_write_opts_set_stream_recording() */
int single_track;
int prodvd_cli_compatible;
@ -4399,13 +4408,15 @@ int Cdrskin_report_disc_status(struct CdrskiN *skin, enum burn_disc_status s,
int Cdrskin_scanbus(struct CdrskiN *skin, int flag)
{
int ret,i,busno,first_on_bus,pseudo_transport_group= 0,skipped_devices= 0;
int busmax= 16;
int busmax= 16, busidx;
char shellsafe[5*Cdrskin_strleN+2],perms[40],btldev[Cdrskin_adrleN];
char adr[Cdrskin_adrleN],*raw_dev,*drives_shown= NULL;
int *drives_busses= NULL;
struct stat stbuf;
drives_shown= malloc(skin->n_drives+1);
if(drives_shown==NULL)
drives_busses= malloc((skin->n_drives+1) * sizeof(int));
if(drives_shown == NULL || drives_busses == NULL)
{ret= -1; goto ex;}
for(i=0;i<skin->n_drives;i++)
drives_shown[i]= 0;
@ -4463,7 +4474,28 @@ int Cdrskin_scanbus(struct CdrskiN *skin, int flag)
if(skin->preskin->old_pseudo_scsi_adr)
printf("cdrskin: NOTE : The printed addresses are not cdrecord compatible !\n");
for(busno= 0;busno<=busmax;busno++) {
for(i=0;i<skin->n_drives;i++) {
drives_busses[i]= -1;
ret= Cdrskin_driveno_to_btldev(skin,i,btldev,1);
if(ret >= pseudo_transport_group &&
ret < pseudo_transport_group + 1000000) {
drives_busses[i]= ret - pseudo_transport_group;
if(ret > pseudo_transport_group + busmax)
busmax= 1 + ret - pseudo_transport_group;
}
}
for(busidx= 0; busidx < skin->n_drives + 1; busidx++) {
if(busidx < skin->n_drives)
busno= drives_busses[busidx];
else
busno= busmax;
if(busno < 0)
continue;
for(i= 0; i < busidx; i++)
if(drives_busses[i] == busno)
break;
if(i < busidx)
continue;
first_on_bus= 1;
for(i=0;i<skin->n_drives;i++) {
ret= Cdrskin_driveno_to_btldev(skin,i,btldev,1);
@ -4501,6 +4533,8 @@ int Cdrskin_scanbus(struct CdrskiN *skin, int flag)
ex:;
if(drives_shown!=NULL)
free((char *) drives_shown);
if(drives_busses!=NULL)
free((char *) drives_busses);
return(ret);
}
@ -6466,7 +6500,7 @@ burn_failed:;
burn_write_opts_set_force(o, !!skin->force_is_set);
#endif
#ifdef Cdrskin_libburn_has_stream_recordinG
burn_write_opts_set_stream_recording(o, !!skin->stream_recording_is_set);
burn_write_opts_set_stream_recording(o, skin->stream_recording_is_set);
#endif
if(skin->dummy_mode) {
@ -6988,7 +7022,7 @@ sorry_failed_to_eject:;
int Cdrskin_setup(struct CdrskiN *skin, int argc, char **argv, int flag)
{
int i,k,l,ret,source_has_size=0, idx= -1;
double value,grab_and_wait_value= -1.0;
double value,grab_and_wait_value= -1.0, num;
char *cpt,*value_pt,adr[Cdrskin_adrleN],*blank_mode= "";
struct stat stbuf;
@ -7725,9 +7759,15 @@ set_speed:;
set_stream_recording:;
if(strcmp(value_pt, "on")==0)
skin->stream_recording_is_set= 1;
else
else if(value_pt[0] >= '0' && value_pt[0] <= '9') {
num= Scanf_io_size(value_pt, 0);
num/= 2048.0;
if(num >= 16 && num <= 0x7FFFFFFF)
skin->stream_recording_is_set= num;
else
skin->stream_recording_is_set= 0;
} else
skin->stream_recording_is_set= 0;
} else if(strcmp(argv[i],"-swab")==0) {
skin->swap_audio_bytes= 0;

View File

@ -2,7 +2,7 @@
<HEAD>
<META NAME="description" CONTENT="cdrskin, a limited cdrecord compatibility wrapper for libburn">
<META NAME="keywords" CONTENT="cdrskin, libburn, libburnia, burn, CD, DVD, linux, recording, burning, CD-R, CD-RW, DVD-R, DVD-RW, DVD+RW, DVD+R, DVD+R/DL, DVD-RAM, BD-RE, cdrecord, compatible, scdbackup">
<META NAME="keywords" CONTENT="cdrskin, libburn, libburnia, burn, CD, DVD, linux, recording, burning, CD-R, CD-RW, DVD-R, DVD-RW, DVD+RW, DVD+R, DVD+R/DL, DVD-RAM, BD-RE, BD-R, cdrecord, compatible, scdbackup">
<META NAME="robots" CONTENT="follow">
<TITLE>cdrskin homepage english</TITLE>
</HEAD>
@ -24,7 +24,7 @@
<P>
<H2>Purpose:</H2>
Burns preformatted data to CD, DVD, and BD media:<BR>
CD-R, DVD-R, DVD+R, DVD+R/DL, CD-RW, DVD-RW, DVD-RAM, DVD+RW, BD-RE
CD-R, DVD-R, DVD+R, DVD+R/DL, BD-R, CD-RW, DVD-RW, DVD-RAM, DVD+RW, BD-RE
</P>
<P>
@ -59,12 +59,12 @@ and to MMC-5 for DVD or BD).
GPL software included:<BR>
</H2>
<DL>
<DT>libburn-0.5.8</DT>
<DT>libburn-0.6.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)
</DD>
<DD>transfers data to CD, DVD, BD-RE</DD>
<DD>transfers data to CD, DVD, BD</DD>
</DL>
</P>
@ -93,7 +93,7 @@ are provided in a compatible way.<BR>
On all DVD media except DVD-R DL, cdrskin is able to perform any recording job
which is possible with cdrecord.
Other than with cdrecord, option -multi is supported with many DVD types and
write mode -tao works with anything but quickly blanked DVD-RW.
BD-R. Write mode -tao works with anything but quickly blanked DVD-RW.
</DT>
<BR><BR>
<DT>Get an overview of drives and their addresses</DT>
@ -148,6 +148,9 @@ as listed by option --devices.</DT>
<DD><KBD>&nbsp;&nbsp;--tell_media_space 2>/dev/null)</KBD></DD>
<DD>$<KBD>&nbsp;echo "Available: $x blocks of 2048 data bytes"</KBD></DD>
<DT>Accelerate BD-RE writing to full nominal speed after the first 250 MB</DT>
<DD>$<KBD>&nbsp;cdrskin ... stream_recording=250m ...</KBD>
<DT>Write audio tracks to CD:</DT>
<DD>$<KBD>&nbsp;cdrskin -v dev=ATA:1,0,0 speed=48 -sao \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;track1.wav track2.au -audio -swab track3.raw</KBD></DD>
@ -174,14 +177,11 @@ man cdrecord</A></KBD></DD>
<DL>
<DT>Learn to know a more versatile way to burn ISO 9660 formatted data</DT>
<DD>
Standalone ISO 9660 multi-session CD/DVD tool
Standalone ISO 9660 multi-session CD/DVD/BD tool
<A HREF="http://scdbackup.sourceforge.net/xorriso_eng.html">xorriso</A>.
</DD>
</DL>
Testers wanted who are willing to risk some DVD-R DL media
or to do experiments on BD-R media.
</P>
<HR>
@ -191,8 +191,8 @@ or to do experiments on BD-R media.
<P>
<DL>
<DT>Download as source code (see README):</DT>
<DD><A HREF="cdrskin-0.5.8.pl00.tar.gz">cdrskin-0.5.8.pl00.tar.gz</A>
(740 KB).
<DD><A HREF="cdrskin-0.6.8.pl00.tar.gz">cdrskin-0.6.8.pl00.tar.gz</A>
(750 KB).
</DD>
<DD>
The cdrskin tarballs are source code identical with libburn releases
@ -241,45 +241,49 @@ cdrskin_0.4.2.pl00-x86-suse9_0-static.tar.gz</A>, (310 KB), -static compiled,
<HR>
<P>
Enhancements towards previous stable version cdrskin-0.5.6.pl00:
Enhancements towards previous stable version cdrskin-0.6.6.pl00:
<UL>
<LI>Improvements about BD-RE formatting</LI>
<LI>Made -scanbus work with high SCSI bus numbers</LI>
<!--
<LI>none</LI>
-->
</UL>
Bug fixes towards cdrskin-0.5.6.pl00:
Bug fixes towards cdrskin-0.6.6.pl00:
<UL>
<LI>
A session without leadout entry on CD caused a SIGSEGV by NULL
</LI>
<LI>Old MMC-1 drives were rejected</LI>
<!--
<LI>none</LI>
-->
</UL>
</P>
<HR>
<P>
<DL>
<DT><H3>Development snapshot, version 0.5.9 :</H3></DT>
<DD>Enhancements towards current stable version 0.5.8.pl00:
<DT><H3>Development snapshot, version 0.6.9 :</H3></DT>
<DD>Enhancements towards current stable version 0.6.8.pl00:
<UL>
<!--
<LI>none yet</LI>
<!--
-->
<LI>Formatting and writing of BD-R media</LI>
</UL>
</DD>
<DD>Bug fixes towards cdrskin-0.6.8.pl00:
<UL>
<LI>none yet</LI>
<!--
-->
</UL>
</DD>
<DD>&nbsp;</DD>
<DD><A HREF="README_cdrskin_devel">README 0.5.9</A>
<DD><A HREF="cdrskin__help_devel">cdrskin_0.5.9 --help</A></DD>
<DD><A HREF="cdrskin_help_devel">cdrskin_0.5.9 -help</A></DD>
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 0.5.9)</A></DD>
<DD><A HREF="README_cdrskin_devel">README 0.6.9</A>
<DD><A HREF="cdrskin__help_devel">cdrskin_0.6.9 --help</A></DD>
<DD><A HREF="cdrskin_help_devel">cdrskin_0.6.9 -help</A></DD>
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 0.6.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>
@ -299,8 +303,8 @@ admins with full system souvereignty.</DT>
<A HREF="README_cdrskin_devel">upcoming README</A> ):
</DD>
<DD>
<A HREF="cdrskin-0.5.9.tar.gz">cdrskin-0.5.9.tar.gz</A>
(740 KB).
<A HREF="cdrskin-0.6.9.tar.gz">cdrskin-0.6.9.tar.gz</A>
(750 KB).
</DD>
<!-- This is not offered any more since spring 2008
@ -333,7 +337,7 @@ Historic versions based on Derek's and Ben's
<BR>
Very special thanks to Andy Polyakov whose
<A HREF="http://fy.chalmers.se/~appro/linux/DVD+RW/tools">dvd+rw-tools</A>
provide libburn with invaluable examples on how to deal with DVD media.
provide libburn with invaluable examples on how to deal with DVD and BD media.
</P>
<HR>
@ -495,12 +499,17 @@ and by <A HREF="http://sourceforge.net">sourceforge.net</A><BR>
<A href="http://sourceforge.net">
<IMG src="sflogo-88-1.png" BORDER="0" ALT="SourceForge Logo"></A>
<!-- on sourceforge use : <IMG src="http://sourceforge.net/sflogo.php?group_id=16010" width="88" height="31" border="0" alt="SourceForge Logo"></A> -->
<P>
Enjoying a FreeBSD shell account with the opportunity to
build and install cdrskin at<BR>
<A HREF="http://www.en.free-shells.com.ar">free-shells.com.ar</A>
</P>
</FONT></CENTER>
<HR>
<DL>
<DT>Links to my other published software projects :
<DD><A HREF="http://scdbackup.webframe.org/xorriso_eng.html">
xorriso, a standalone ISO 9660 multi-session CD/DVD burn tool.
xorriso, a standalone ISO 9660 multi-session CD/DVD/BD burn tool.
No mkisofs needed.
<DL>
<DD>

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2008.12.29.105341"
#define Cdrskin_timestamP "2009.07.14.100001"

View File

@ -6091,17 +6091,647 @@ Dec 07 2008 [2253]
+ cdrskin/add_ts_changes_to_libburn_0_5_9
Updated cdrskin tarball generator
Dec 07 2008 []
Dec 07 2008 [2254]
cdrskin/changelog.txt
Documented changes and release timestamp
Dec 07 2008 [2255]
svn move -m "libburn release 0.5.8 is ready" \
http://svn.libburnia-project.org/libburn/branches/ZeroFiveEigh \
http://svn.libburnia-project.org/libburn/tags/ZeroFiveEight
svn delete -m 'Deleted obsolete branch' \
http://svn.libburnia-project.org/libburn/branches/"$svn_name"
------------------------------------ cycle - cdrskin-0.5.9 - 2008.12.07.155219
2008.12.09.123314 [2264]
libburn/libburn.h
libburn/drive.c
libburn/async.c
libburn/write.c
libburn/mmc.c
Beginning to implement write code for BD-R SRM without POW
2008.12.09.123558 [2265]
cdrskin/cdrskin.c
Beginning to implement write code for BD-R SRM without POW
2008.12.10.092535 [2271]
libburn/transport.h
libburn/async.c
libburn/mmc.h
libburn/mmc.c
Formatting of BD-R SRM to default size and by index
2008.12.10.114241 [2273]
cdrskin/cdrskin.c
Formatting of BD-R SRM to default size and by index
10 Dec 2008 [2274]
README
cdrskin/README
cdrskin/cdrskin.1
cdrskin/wiki_plain.txt
Mentioning BD-R in documentation
2008.12.11.072308 [2276]
libburn/libdax_msgs.h
libburn/async.c
Rejecting unformattable BD-R more early
2008.12.11.092204 [2278]
libburn/libdax_msgs.h
libburn/async.c
libburn/mmc.c
cdrskin/cdrskin.1
Catching BD-R zero spare formatting with NOTE rather than SORRY
2008.12.12.112129 [2279]
libburn/libburn.h
libburn/async.c
libburn/mmc.c
Making format size of BD-RE and BD-R quite freely adjustable
2008.12.12.214013 [2280]
libburn/transport.h
libburn/async.c
libburn/mmc.c
Interpreting feature 0023h for BD formatting capabilities
2008.12.13.144909 [2284]
configure.ac
Now producing libburn.so.4.24.0
------------------------------------ cycle - cdrskin-0.5.9 - 2008.12.13.144909
* Formatting and writing of BD-R media
------------------------------------ cycle - cdrskin-0.5.9 -
------------------------------------ cycle - cdrskin-0.5.9 -
14 Dec 2008 [2289]
test/libburner.c
Updated libburner to BD-R
14 Dec 2008 [2290]
cdrskin/cdrskin_eng.html
Updated cdrskin web page
2008.12.17.091905 [2297]
libburn/libburn.h
libburn/drive.c
New API function burn_get_read_capacity()
17 Dec 2008 [2298] [2302]
doc/comments
Removed project overview and references to libisofs and libisoburn
------------------------------------ cycle - cdrskin-0.5.9 - 2008.12.19.070912
* New API function burn_get_read_capacity()
2008.12.19.203523 [2306]
libburn/libburn.h
Clarified blank, appendable, closed burn_disc_status
2008.12.22.130527 [2323]
libburn/async.c
Fixed denial of fast formatting with BD-RE introduced by revision 2280
------------------------------------ cycle - cdrskin-0.5.9 - 2008.12.23.144853
2008.12.29.105341 [2342]
libburn/libburn.h
test/libburner.c
Cosmetic changes
Jan 02 2009 [2346]
svn copy http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/ZeroSixZero
Preparing for libburn-0.6.0
02 Jan 2009 [2347]
COPYRIGHT
libburn/libdax_msgs.c
libburn/libdax_msgs.h
test/libburner.c
Updated copyright claims to year 2009
2009.01.02.160001 [2348]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition to 0.6.0
02 Jan 2009 [2349]
- cdrskin/add_ts_changes_to_libburn_0_5_8
- cdrskin/add_ts_changes_to_libburn_0_5_9
+ cdrskin/add_ts_changes_to_libburn_0_6_0
+ cdrskin/add_ts_changes_to_libburn_0_6_1
Updated cdrskin tarball generator
02 Jan 2009 [2350]
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------ release - cdrskin-0.6.0.pl00 - 2009.01.02.160001
* Formatting and writing of BD-R media
* New API function burn_get_read_capacity()
2009.01.04.112716 [2351]
COPYRIGHT
libburn/libdax_msgs.c
libburn/libdax_msgs.h
test/libburner.c
Updated copyright claims to year 2009
2009.01.04.113401 [2352]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition to 0.6.1
04 Jan 2009 [2353]
- cdrskin/add_ts_changes_to_libburn_0_5_8
- cdrskin/add_ts_changes_to_libburn_0_5_9
+ cdrskin/add_ts_changes_to_libburn_0_6_0
+ cdrskin/add_ts_changes_to_libburn_0_6_1
Updated cdrskin tarball generator
03 Jan 2009 [2354]
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------------ cycle - cdrskin-0.6.1 - 2009.01.04.113401
04 Jan 2009 [2356]
svn move
http://svn.libburnia-project.org/libburn/branches/ZeroSixZero
http://svn.libburnia-project.org/libburn/tags/ZeroSixZero
libburn release 0.6.0 is ready
2009.01.06.122534 [2366]
libburn/spc.c
Error texts for ASC 73 : power calibration and program memory
2009.01.06.122808 [2367] [2369]
libburn/async.c
libburn/libdax_msgs.h
Complaining and refusing more early with unformatted BD-RE
7 Jan 2009 [2370]
cdrskin/cdrskin.1
Clarification about one-time DVD and BD media
2009.01.07.154414 [2371]
libburn/write.c
Bug fix: BD-R were not correctly finalized
7 Jan 2009 [2372]
cdrskin/cdrskin_eng.html
Mentioned bug fix and pl01
------------------------------------ cycle - cdrskin-0.6.1 - 2009.01.07.154414
7 Jan 2009 [2373]
svn copy -m "Branching for libburn bugfix release 0.6.0.pl01" \
http://svn.libburnia-project.org/libburn/ \
http://svn.libburnia-project.org/libburn/
7 Jan 2009 [2374]
svn rm -m 'Removing falsly copied tag' \
http://svn.libburnia-project.org/libburn/libburn
7 Jan 2009 [2375]
svn copy -m "Branching for libburn bugfix release 0.6.0.pl01" \
http://svn.libburnia-project.org/libburn/tags/ZeroSixZero \
http://svn.libburnia-project.org/libburn/branches/ZeroSixZeroPl01
2009.01.07.140001 [branch 2376]
README
cdrskin/README
cdrskin/cdrskin_eng.html
cdrskin/cdrskin_timestamp.h
Mentioned bug fix and pl01
2009.01.07.140001 [branch 2377]
libburn/write.c
Bug fix: BD-R were not correctly finalized
7 Jan 2009 [2378]
svn move -m 'libburn bugfix release 0.6.0.pl01 is ready' \
http://svn.libburnia-project.org/libburn/branches/ZeroSixZeroPl01 \
http://svn.libburnia-project.org/libburn/tags/ZeroSixZeroPl01
------------------------------------ cycle - cdrskin-0.6.1 - 2009.01.07.154414
2009.01.09.095943 [2381]
libburn/transport.h
libburn/write.c
libburn/mmc.c
libburn/libdax_msgs.h
Recognizing BD-R media spoiled by the close bug and handling them as appendable
------------------------------------ cycle - cdrskin-0.6.1 - 2009.01.09.100210
2009.01.09.161704 [2383]
libburn/write.c
Preventing a possible bug with a burn run of more than one session at once
2009.01.11.102711 [2390]
libburn/write.c
libburn/libdax_msgs.h
Prepared eventual closing of spoiled BD-R media by a pseudo write run
11 Jan 2009 [2391]
doc/cookbook.txt
Updated cookbook about BD-R media
27 Jan 2009 [2431]
README
libburn/libburn.h
Mentioned the need for 64 bit file i/o
2009.02.04.102822 [2447]
Makefile.am
Linking with $LIBBURN_ARCH_LIBS to get -lcam on FreeBSD
4 Feb 2009 [2448]
README
cdrskin/README
Mentioned hald as possibly conflicting service
2009.02.19.192801 [2479]
libburn/spc.c
Human readable error messages with asynchronous SCSI errors
20 Feb 2009 [2482]
svn copy http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/ZeroSixZero
Preparing for libburn-0.6.0
2009.02.20.090001 [2483]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition to 0.6.2
20 Feb 2009 [2484]
- cdrskin/add_ts_changes_to_libburn_0_6_0
- cdrskin/add_ts_changes_to_libburn_0_6_1
+ cdrskin/add_ts_changes_to_libburn_0_6_2
+ cdrskin/add_ts_changes_to_libburn_0_6_3
Updated cdrskin tarball generator
------------------------------ release - cdrskin-0.6.2.pl00 - 2009.02.20.090001
* Improvements with build system for FreeBSD
2009.02.20.124909 [2485]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition to 0.6.3
20 Feb 2009 [2486]
- cdrskin/add_ts_changes_to_libburn_0_6_0
- cdrskin/add_ts_changes_to_libburn_0_6_1
+ cdrskin/add_ts_changes_to_libburn_0_6_2
+ cdrskin/add_ts_changes_to_libburn_0_6_3
Updated cdrskin tarball generator
------------------------------------ cycle - cdrskin-0.6.3 - 2009.02.20.132535
20 Feb 2009 [2489]
svn move -m libburn release 0.6.2 is ready
http://svn.libburnia-project.org/libburn/branches/ZeroSixTwo
http://svn.libburnia-project.org/libburn/tags/ZeroSixTwo
2009.02.27.143100 [2500]
libburn/libburn.h
libburn/transport.h
libburn/drive.c
libburn/options.c
libburn/write.c
libburn/mmc.c
New API function burn_drive_set_stream_recording()
2009.02.27.211707 [2501]
cdrskin/cdrskin.c
cdrskin/cdrskin.1
New stream_recording mode with start number
2009.03.02.170126 [2513]
libburn/os.h
libburn/libdax_msgs.h
libburn/sg.c
+ libburn/os-dummy.h
+ libburn/sg-dummy.c
New operating system adapter "dummy" for stdio on POSIX-like systems
2009.03.02.193353 [2514]
libburn/drive.c
Fixed a race condition on abort with stdio writing which could cause SIGSEGV
2009.03.02.200132 [2515]
libburn/sg.c
Added a dummy function with loud compiler warning to sg.c dummy case
2009.03.03.092057 [2516]
configure.ac
libburn/sg-dummy.c
Making optional use of statvfs() in sg-dummy
------------------------------------ cycle - cdrskin-0.6.3 - 2009.03.03.092057
* New API function burn_drive_set_stream_recording()
* New stream recording mode with start number
2009.03.05.145309 [2520]
acinclude.m4
Lifted the ban on operating systems other than Linux and FreeBSD
------------------------------------ cycle - cdrskin-0.6.3 - 2009.03.05.145309
* New operating system adapter "dummy" for stdio on POSIX-like systems
2009.03.08.140120 [2522]
libburn/cleanup.c
Reacted on compiler warnings of SchilliX-0.6.7 (based on Solaris 5.11)
13 Mar 2009 [2529]
svn copy -m "Branching for libburn release 0.6.4" \
http://svn.libburnia-project.org/libburn/trunk \
http://svn.libburnia-project.org/libburn/branches/ZeroSixFour
2009.03.13.080001 [2530]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made libburn number transition to 0.6.4
13 Mar 2009 [2531]
- cdrskin/add_ts_changes_to_libburn_0_6_2
- cdrskin/add_ts_changes_to_libburn_0_6_3
+ cdrskin/add_ts_changes_to_libburn_0_6_4
+ cdrskin/add_ts_changes_to_libburn_0_6_5
Updated cdrskin tarball generator
13 Mar 2009 [2534]
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------ release - cdrskin-0.6.4.pl00 - 2009.03.13.080001
* New operating system adapter "dummy" for stdio on general X/Open systems
* New API function burn_drive_set_stream_recording()
* New stream recording mode with start address
2009.03.13.135818 [2532]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made libburn number transition to 0.6.5
13 Mar 2009 [2533]
- cdrskin/add_ts_changes_to_libburn_0_6_2
- cdrskin/add_ts_changes_to_libburn_0_6_3
+ cdrskin/add_ts_changes_to_libburn_0_6_4
+ cdrskin/add_ts_changes_to_libburn_0_6_5
Updated cdrskin tarball generator
13 Mar 2009 [2535]
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------------ cycle - cdrskin-0.6.5 - 2009.03.13.162355
13 Mar 2009 [2538]
svn move -m "libburn release 0.6.4 is ready" \
http://svn.libburnia-project.org/libburn/branches/ZeroSixFour \
http://svn.libburnia-project.org/libburn/tags/ZeroSixFour
2009.03.16.190745 [2547]
configure.ac
acinclude.m4
Makefile.am
Get on FreeBSD pkgconfigdir=.../libdata , on Linux and others: .../lib
2009.03.18.124558 [2553]
libburn/spc.c
Human readable error messages for asc=08 "Logical unit communication failure"
2009.03.18.172512 [2554]
libburn/drive.c
Bug fix: burn_abort() did not work with broken output pipe (since rev 2514)
2009.04.30.065653 [2623]
libburn/write.c
Marked alleged use of uninitialized memory reported by valgrind
2009.04.30.065918 [2624]
libburn/write.c
Replaced 8 blanks by a tab
2009.04.30.070813 [2625]
libburn/sg-freebsd.c
Bug fix: Device scan stalled on FreeBSD. Ticket 148 jwehle
------------------------------------ cycle - cdrskin-0.6.5 - 2009.04.30.070813
Bug fix: burn_abort() did not work with broken output pipe (since rev 2514)
Bug fix: Device scan stalled on FreeBSD. Ticket 148 jwehle
7 May 2009 [2628]
svn copy -m "Branching for libburn release 0.6.6"
http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/ZeroSixSix
7 May 2009 [2629]
cdrskin/cdrskin.1
Mentioned BD were it was missing
2009.05.07.100001 [2630]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition and activated development documentation
7 May 2009 [2631]
- cdrskin/add_ts_changes_to_libburn_0_6_4
- cdrskin/add_ts_changes_to_libburn_0_6_5
+ cdrskin/add_ts_changes_to_libburn_0_6_6
+ cdrskin/add_ts_changes_to_libburn_0_6_7
Updated cdrskin tarball generator
7 May 2009 [2632]
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------ release - cdrskin-0.6.6.pl00 - 2009.05.07.100001
Bug fix: burn_abort() did not work with broken output pipe (since rev 2514)
Bug fix: Device scan stalled on FreeBSD. Ticket 148 jwehle
7 May 2009 [2633]
cdrskin/cdrskin.1
Mentioned BD were it was missing
2009.05.07.181034 [2634]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition and activated development documentation
7 May 2009 [2635]
- cdrskin/add_ts_changes_to_libburn_0_6_4
- cdrskin/add_ts_changes_to_libburn_0_6_5
+ cdrskin/add_ts_changes_to_libburn_0_6_6
+ cdrskin/add_ts_changes_to_libburn_0_6_7
Updated cdrskin tarball generator
7 May 2009 [2636]
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------------ cycle - cdrskin-0.6.7 - 2009.05.07.181034
8 May 2009 [2637]
svn move -m libburn release 0.6.6 is ready
http://svn.libburnia-project.org/libburn/branches/ZeroSixSix
http://svn.libburnia-project.org/libburn/tags/ZeroSixSix
2009.05.17.144304 [2645]
cdrskin/cdrskin.c
Made -scanbus work with SCSI bus numbers like 85 (USB, kernel 2.6.18.2)
2009.06.02.162841 [2655]
libburn/drive.c
libburn/async.c
libburn/options.c
libburn/spc.c
libburn/libdax_msgs.h
Rectified use of burn_drive.mdata->valid
2 Jun 2009 [2656]
test/libburner.c
Avoided SIGSEGV if no drives were found by scan
2009.06.02.172201 [2657]
libburn/drive.c
Avoided to enumerate faulty drive objects
2009.06.03.085637 [2658]
libburn/spc.c
Bug fix: Old MMC-1 drives were rejected because of mode page 2Ah length
2009.06.03.185118 [2659]
libburn/transport.h
libburn/drive.c
libburn/spc.c
libburn/mmc.c
Bug fix: No usable media was detected with old MMC-1 drives
2009.06.14.095004 [2669]
libburn/sg-linux.c
Retrying 3 times on EBUSY drives with generous usleep intervals
------------------------------------ cycle - cdrskin-0.6.7 - 2009.06.14.095833
Made -scanbus work with high SCSI bus numbers
Bug fix: Old MMC-1 drives were rejected because of mode page 2Ah length
Bug fix: No usable media was detected with old MMC-1 drives
7 Jul 2009 [2691]
acinclude.m4
configure.ac
configure options --enable-libdir-pkgconfig and --enable-pkgconfig-path=DIR
2009.07.07.191134 [2692]
Timestamp for revision 2691
14 Jul 2009 [2894]
svn copy -m "Branching for libburn release 0.6.8"
http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/ZeroSixEight
2009.07.14.100001 [2695]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition and activated development documentation
14 Jul 2009 [2696]
- cdrskin/add_ts_changes_to_libburn_0_6_6
- cdrskin/add_ts_changes_to_libburn_0_6_7
+ cdrskin/add_ts_changes_to_libburn_0_6_8
+ cdrskin/add_ts_changes_to_libburn_0_6_9
Updated cdrskin tarball generator
14 Jul 2009 []
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------ release - cdrskin-0.6.8.pl00 - 2009.07.14.100001
Made -scanbus work with high SCSI bus numbers
Bug fix: Old MMC-1 drives were rejected because of mode page 2Ah length
Bug fix: No usable media was detected with old MMC-1 drives
------------------------------------ cycle - cdrskin-0.6.9 -
------------------------------------ cycle - cdrskin-0.6.9 -
===============================================================================
TODO
@ -6110,7 +6740,6 @@ Documented changes and release timestamp
--------------------------------- bugs -------------------------------------
- Needed is a system dependend facility: dev_t <-> major, minor
- Do something about drive->buffer asynchronous race conditions
and dangerous use of local heap memory.
@ -6132,13 +6761,11 @@ READ TRACK INFORMATION[#5]:
------------------------------ end of bugs ---------------------------------
Support for BD-R SRM+POW
? Provide an option to open track source file O_DIRECT ?
(needs read chunks much larger than 2 kB)
interpret feature 0023h byte 4 for BD-RE formatting capabilities
Enable profile 0x41 BD-R sequential recording (much like DVD+R)
? Enable profile 0x42 BD-R random recording
Provide DVD+R DL layer break setter
@ -6150,9 +6777,6 @@ problem with telltoc: double descriptor list from before load and after load
What about cdrskin rc files ? Forward with fallback runs ?
cdrskin/README
Thin out
[]
Emulate -dummy on overwriteables ?

View File

@ -1,13 +1,13 @@
#!/bin/sh
# compile_cdrskin.sh
# Copyright 2005 - 2008 Thomas Schmitt, scdbackup@gmx.net, GPL version 2
# Copyright 2005 - 2009 Thomas Schmitt, scdbackup@gmx.net, GPL version 2
# to be executed within ./libburn-* resp ./cdrskin-*
debug_opts="-O2"
def_opts=
largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1"
libvers="-DCdrskin_libburn_0_5_9"
libvers="-DCdrskin_libburn_0_6_8"
cleanup_src_or_obj="libburn/cleanup.o"
libdax_msgs_o="libburn/libdax_msgs.o"
libdax_audioxtr_o="libburn/libdax_audioxtr.o"
@ -33,15 +33,15 @@ do
libdax_audioxtr_o=
libdax_msgs_o="libburn/message.o"
cleanup_src_or_obj="-DCleanup_has_no_libburn_os_H cdrskin/cleanup.c"
elif test "$i" = "-libburn_0_5_8"
elif test "$i" = "-libburn_0_6_8"
then
libvers="-DCdrskin_libburn_0_5_8"
libvers="-DCdrskin_libburn_0_6_8"
libdax_audioxtr_o="libburn/libdax_audioxtr.o"
libdax_msgs_o="libburn/libdax_msgs.o"
cleanup_src_or_obj="libburn/cleanup.o"
elif test "$i" = "-libburn_svn"
then
libvers="-DCdrskin_libburn_0_5_9"
libvers="-DCdrskin_libburn_0_6_9"
libdax_audioxtr_o="libburn/libdax_audioxtr.o"
libdax_msgs_o="libburn/libdax_msgs.o"
cleanup_src_or_obj="libburn/cleanup.o"
@ -75,10 +75,8 @@ do
echo "Options:"
echo " -compile_cdrfifo compile program cdrskin/cdrfifo."
echo " -compile_dewav compile program test/dewav without libburn."
echo " -cvs_A60220 set macro to match libburn-CVS of 20 Feb 2006."
echo " -libburn_0_5_8 set macro to match libburn-0.5.8"
echo " -libburn_0_6_8 set macro to match libburn-0.6.8"
echo " -libburn_svn set macro to match current libburn-SVN."
echo " -no_largefile do not use 64 bit off_t (must match libburn)."
echo " -do_not_compile_cdrskin omit compilation of cdrskin/cdrskin."
echo " -experimental use newly introduced libburn features."
echo " -oldfashioned use pre-0.2.2 libburn features only."

View File

@ -1,4 +1,4 @@
AC_INIT([libburn], [0.5.9], [http://libburnia-project.org])
AC_INIT([libburn], [0.6.8], [http://libburnia-project.org])
AC_PREREQ([2.50])
dnl AC_CONFIG_HEADER([config.h])
@ -7,7 +7,7 @@ AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([subdir-objects])
dnl Notes by ts A71207 - A81111 :
dnl Notes by ts A71207 - A90714 :
dnl
dnl Regrettably the meaning of the various version types was misunderstood
dnl before version 0.4.1.
@ -42,7 +42,8 @@ dnl So this is a superspace of the SONAME version space. To avoid
dnl ill SONAME, the value of CURRENT must be larger than AGE.
dnl See also http://www.gnu.org/software/libtool/manual.html#Interfaces
dnl
dnl The name of the dynamic library will be libburn.so.$SONAME.$AGE.$REV .
dnl On Linux the name of the dynamic library will be
dnl libburn.so.$SONAME.$AGE.$REV
dnl In the terminology of this file:
dnl CURRENT = LT_CURRENT
dnl AGE = LT_AGE
@ -67,6 +68,11 @@ dnl 0.5.2 = libburn.so.4.17.0
dnl 0.5.4 = libburn.so.4.19.0
dnl 0.5.6 = libburn.so.4.21.0
dnl 0.5.8 = libburn.so.4.23.0
dnl 0.6.0 = libburn.so.4.25.0
dnl 0.6.2 = libburn.so.4.27.0
dnl 0.6.4 = libburn.so.4.29.0
dnl 0.6.6 = libburn.so.4.31.0
dnl 0.6.8 = libburn.so.4.33.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.
@ -91,8 +97,8 @@ dnl If BURN_*_VERSION changes, be sure to change AC_INIT above to match.
dnl
dnl As said: Only copies. Original in libburn/libburn.h : burn_header_version_*
BURN_MAJOR_VERSION=0
BURN_MINOR_VERSION=5
BURN_MICRO_VERSION=9
BURN_MINOR_VERSION=6
BURN_MICRO_VERSION=8
BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
AC_SUBST(BURN_MAJOR_VERSION)
@ -103,15 +109,15 @@ AC_SUBST(BURN_VERSION)
dnl Libtool versioning
LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
dnl
dnl ts A81207
dnl ### This is the release version libburn-0.5.8 = libburn.so.4.23.0
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 ts A90714
dnl This is the release version libburn-0.6.8 = libburn.so.4.33.0
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 = 28 - 24 = 4 . Library name = libburn.so.4.24.0
LT_CURRENT=28
LT_AGE=24
dnl SONAME = 37 - 33 = 4 . Linux library name = libburn.so.4.33.0
LT_CURRENT=37
LT_AGE=33
LT_REVISION=0
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
@ -158,8 +164,19 @@ AC_SUBST(THREAD_LIBS)
TARGET_SHIZZLE
AC_SUBST(ARCH)
AC_SUBST(LIBBURNIA_PKGCONFDIR)
AC_SUBST(LIBBURN_ARCH_LIBS)
dnl ts A90303
dnl Check the preconditions for using statvfs() in sg-dummy
dnl (sg-linux and sg-freebsd use statvfs() unconditionally)
STATVFS_DEF=-DLibburn_os_has_statvfS
AC_CHECK_HEADER(sys/statvfs.h, X=, STATVFS_DEF=)
AC_CHECK_FUNC([statvfs], X=, STATVFS_DEF=)
dnl If this would be done more specifically in Makefile.am
dnl via libburn_libburn_la_CFLAGS then undesired .o file names would emerge
CFLAGS="$CFLAGS $STATVFS_DEF"
dnl Add compiler-specific flags
dnl See if the user wants aggressive optimizations of the code
@ -179,6 +196,13 @@ else
CFLAGS="$CFLAGS -DDEBUG"
fi
dnl Determine target directory for libburn-*.pc
dnl Important: Must be performed _after_ TARGET_SHIZZLE
dnl
LIBBURNIA_SET_PKGCONFIG
AC_CONFIG_FILES([
Makefile
doc/doxygen.conf

View File

@ -1,4 +1,4 @@
libburnia-project.org Optical Media Rotisserie Recipes as of April 2008
libburnia-project.org Optical Media Rotisserie Recipes as of January 2009
Content:
- TAO Multi-Session CD Cookbook (CD-R, CD-RW)
@ -6,6 +6,7 @@ Content:
- Overwriteable DVD Cookbook (DVD-RAM, DVD+RW, DVD-RW, BD-RE)
- Sequential DVD-R[W] Cookbook
- DVD+R[/DL] Cookbook
- BD-R Cookbook
-------------------------------------------------------------------------------
TAO Multi-Session CD Cookbook
@ -404,7 +405,7 @@ correctness of Pre-gap and Post-gap would become evident.
Inspired by Andy Polyakov's http://fy.chalmers.se/~appro/linux/DVD+RW/tools ,
backed by reading mmc5r03c.pdf from http://www.t10.org/ftp/t10/drafts/mmc5/
by own experiments with drives NEC ND-4570A, LG GSA-4082B, PHILIPS SPD3300L,
and by BD-RE experiments done by Giulio Orsero on LG BE06LU10.
LG GGW H20L, and by BD-RE experiments done by Giulio Orsero on LG BE06LU10.
For libburnia-project.org by Thomas Schmitt <scdbackup@gmx.net>
@ -697,9 +698,14 @@ managment. There is no way to increase payload capacity by format 01h.
(mmc5r03c.pdf 6.5.4.2.2.1)
With BD-RE there are three format types : 00h, 30h and 31h.
00h offers the default size format.
00h offers the default size format. This may be the only fast formatting
mode that is offered by the drive.
Feature 0023h tells whether format 31h and certain 30h subtypes are available.
(mmc5r03c.pdf 5.3.13)
30h offers several sizes with defect management. Usually there are three
size to choose: #1: default size, #2: maximum spare area, #3: minimal spare.
sizes given: #1: default size, #2: maximum spare area, #3: minimal spare.
One may demand any spare size between maximum and minimum. There may be quick
certification and full certification. See feature 0023h.
31h offers a single size and disables defect management. This has the side
effect to speed up writing to nominal speed.
(mmc5r03c.pdf 6.5.4.2.15, 6.24.3.3, Table 472)
@ -738,7 +744,7 @@ DVD-RAM and BD-RE tuning :
A special aspect of DVD-RAM and BD-RE is their low speed with write operations,
which usually is only half than the nominal speed of media and drive.
This is blamed to the automatic checkreading which happens ifor managing
This is blamed to the automatic checkreading which happens for managing
eventual defects.
Defect management of BD-RE can be disabled by format type 31h. See above.
@ -749,7 +755,7 @@ The only known way to get full speed from DVD-RAM or BD-RE with enabled defect
management is the use of AAh WRITE12 with Streaming Bit set to 1.
(mmc5r03c.pdf 6.45)
With some DVD-RAM drives this fails if a write buffer is not full 32 kB.
With the tested BD-RE ione has to write write full 64 kB buffers.
With the tested BD-RE one has to write full 64 kB buffers.
Although it seems not optimal, this is specified not only to disable the
cumbersome checkread but also to ignore known defects and to write data
@ -760,10 +766,10 @@ incorrectable errors.
Caveat:
MMC-5 does not guarantee AAh WRITE12 to work on DVD-RAM or BD-RE at all.
None of the features of profiles 0012h and 0043 promises the existence of
None of the features of profiles 0012h and 0043h promises the existence of
AAh WRITE12.
Nevertheless it worked on all tested drives is proper alignment was observed.
(mmc5r03c.pdf 5.4.13, 6.45)
Nevertheless it worked on all tested drives if proper alignment was observed.
-------------------------------------------------------------------------------
@ -790,9 +796,9 @@ The bytes 0 to 5 of a PVD block are
0x01 'C' 'D' '0' '0' '1'
The sector count can then be read from byte 80 to 83
sectors= pvd[80] | (pvd[81] << 8) | (pvd[82] << 16) | (pvd[83] << 24);
(Ecma-119.pdf 8.4)
To support CD, DVD and BD media alike, it is advisable to round the NWA
to the next multiple of 32 (= 64 KiB).
(Ecma-119.pdf 8.4)
So one can use 0 as MSC1 and prepare a new ISO session for the computed NWA.
After writing the session it is necessary to patch the PVD at LBA 16.
@ -801,7 +807,7 @@ It is stored in both notations LSB and MSB:
for(i= 0; i < 4; i++)
pvd[87 - i]= pvd[80 + i]= (sectors >> (8 * i)) & 0xff;
cdrskin --grow_overwriteable not only patches the sector fields of the
cdrskin --grow_overwriteable_iso not only patches the sector fields of the
PVD block but also the blocks up to LBA 31 which begin with
0xff 'C' 'D' '0' '0' '1'
libisoburn submits 64 KiB data buffer to libisofs before image generation and
@ -1273,3 +1279,118 @@ in http://libburnia-project.org/ticket/13 .
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
BD-R Cookbook
-------------------------------------------------------------------------------
Inspired by reading mmc5r03c.pdf from http://www.t10.org/ftp/t10/drafts/mmc5/
backed by experiments iwith drive LG GGW H20L.
For libburnia-project.org by Thomas Schmitt <scdbackup@gmx.net>
-------------------------------------------------------------------------------
Media type can be recognized by Current Profile from 46h GET CONFIGURATION.
(mmc5r03c.pdf 6.6.2.1)
BD-R 0042h
There are two basic recording modes defined: Sequential Recording Mode SRM and
Random Recording Mode RRM. The latter is optional and for now not topic of this
text.
(mmc5r03c.pdf 4.5.3.5)
- SRM Formatting
- Writing a session in SRM-POW
(- Pseudo-OverWrite SRM+POW)
-------------------------------------------------------------------------------
SRM Formatting:
Despite being write-once media BD-R can optionally carry some formatting.
SRM has a disc structure model with tracks and sessions.
Several tracks may be open at the same time, each having its own NWA.
(mmc5r03c.pdf 4.5.3.5.2.2)
This structure is formatted onto blank media automatically as soon as the
first serious write attempt occurs.
(mmc5r03c.pdf 4.5.3.5)
Before such a write attempt, blank media may be explicitely formatted with
spares, which provide defect management.
(mmc5r03c.pdf 4.5.3.5.3)
Tracks get created from other tracks via RESERVE TRACK splitting.
(mmc5r03c.pdf 4.5.3.5.2.5)
On top of defect management there may be Pseudo-OverWrite SRM+POW, a costly
way to write several times to the same LBA. See below.
Fully sequential states are called SRM-POW.
(mmc5r03c.pdf 4.5.3.5.4)
Explicite formatting is done by 04h FORMAT UNIT. Its data payload consists
of a Format List Header and a Format Descriptor. It is advisable to set
the Immed bit and the FOV bit in header byte number 1. The descriptor should
be a copy of a descriptor from 23h READ FORMAT CAPACITIES but the size may be
adjusted within a certain range.
(mmc5r03c.pdf 6.5, 6.5.3.2, 6.5.3.3)
Format type 00h creates SRM layouts with a default number of spares (or
eventually RRM) chosen by the format sub-type:
00b = SRM with support for POW
01b = SRM without POW (but with some spares for defect management)
10b = (RRM)
(mmc5r03c.pdf 6.5.4.2.1.6)
Format type 32h uses the same sub-types but allows to allocate non-default
amounts of spares. Similar to BD-RE format 31h, three format descriptors are
offered: #1: default size, #2: maximum spare area, #3: minimal spare.
The size may be chosen within that range.
The sense behind the Type Dependent Parameters is obscure
to me. Best will be to set ISA_V and TDMA_V to 0.
(mmc5r03c.pdf 6.5.4.2.1.17)
-------------------------------------------------------------------------------
Writing a session in SRM:
The procedure and constraints for writing BD-R SRM-POW are very similar to
DVD+R. libburn flatly re-uses its DVD+R code except the Close Function for
finalizing a disc.
In short:
If all written sessions are closed, then there is exactly one NWA.
In the beginning there is an empty session and track. A new track can be
written either with pre-announced size (by RESERVE TRACK) or open-end by
simply starting to write to the NWA. When done the track gets closed by
close function 001b. Then either session or disc gets closed depending on
the Close Function used:
- Close Function 010b closes the session and keeps the media appendable
(same as with DVD+R)
- Close Function 110b finalizes the media and makes it read-only.
(differs from libburn DVD+R procedure which uses 101b)
-------------------------------------------------------------------------------
Pseudo-OverWrite POW: (no used yet by libburn)
This enhancement of SRM emulates overwriting of existing data blocks.
(mmc5r03c.pdf 4.5.3.5.4)
POW establishes a virtual vLBA space on top of the real address space rLBA.
All read and write commands deal with vLBA. It seems that track NWAs are
assumed to be identical in vLBA space and in rLBA space.
It is not clear whether one may write to vLBA blocks which are neither written
yet nor at one of the track NWAs. Probably not, or else one could make NWAs run
into vLBAs which are associated with older rLBAs.
Replacing invalidated blocks consumes addresses in rLBA space at the NWA of
some track. I.e. no spares are consumed by POW. Nevertheless it is costly by
a special map called Orphanage. It covers rLBA which have been consumed
by differing vLBAs. It never shrinks and can grow with each write to remapped
addresses.
To avoid heavy Orphanage growth it is advised to write mostly to vLBA which
still coincide with their rLBA. E.g. those addresses which have neither been
written as rLBA nor as vLBA yet. So one should begin the vLBA of new sessions
at the NWA of a sufficiently sized track.
(mmc5r03c.pdf 4.5.3.5.4.2 , 4.5.3.6.9)
-------------------------------------------------------------------------------

View File

@ -527,12 +527,15 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
{
struct write_opts o;
char reasons[BURN_REASONS_LEN+80];
struct burn_drive *d;
d = opts->drive;
/* ts A61006 */
/* a ssert(!SCAN_GOING()); */
/* a ssert(!find_worker(opts->drive)); */
if ((SCAN_GOING()) || find_worker(opts->drive) != NULL) {
libdax_msgs_submit(libdax_messenger, opts->drive->global_index,
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020102,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
"A drive operation is still going on (want to write)",
@ -541,14 +544,14 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
}
/* For the next lines any return indicates failure */
opts->drive->cancel = 1;
d->cancel = 1;
/* ts A70203 : people have been warned in API specs */
if (opts->write_type == BURN_WRITE_NONE)
return;
if (opts->drive->drive_role == 0) {
libdax_msgs_submit(libdax_messenger, opts->drive->global_index,
if (d->drive_role == 0) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020146,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
"Drive is a virtual placeholder (null-drive)", 0, 0);
@ -556,9 +559,9 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
}
/* ts A61007 : obsolete Assert in spc_select_write_params() */
if (opts->drive->drive_role == 1 && !opts->drive->mdata->valid) {
if (d->drive_role == 1 && d->mdata->valid <= 0) {
libdax_msgs_submit(libdax_messenger,
opts->drive->global_index, 0x00020113,
d->global_index, 0x00020113,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
"Drive capabilities not inquired yet", 0, 0);
return;
@ -571,21 +574,33 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
if (burn_precheck_write(opts, disc, reasons + strlen(reasons), 1)
<= 0) {
libdax_msgs_submit(libdax_messenger,
opts->drive->global_index, 0x00020139,
d->global_index, 0x00020139,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
reasons, 0, 0);
return;
}
opts->drive->cancel = 0; /* End of the return = failure area */
/* ts A90106 : early catching of unformatted BD-RE */
if (d->current_profile == 0x43)
if (d->read_format_capacities(d, 0x00) > 0 &&
d->format_descr_type != BURN_FORMAT_IS_FORMATTED) {
libdax_msgs_submit(libdax_messenger,
d->global_index, 0x00020168,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
"Media not properly formatted. Cannot write.",
0, 0);
return;
}
o.drive = opts->drive;
d->cancel = 0; /* End of the return = failure area */
o.drive = d;
o.opts = opts;
o.disc = disc;
opts->refcount++;
add_worker(Burnworker_type_writE, opts->drive,
add_worker(Burnworker_type_writE, d,
(WorkerFunc) write_disc_worker_func, &o);
}

View File

@ -97,8 +97,8 @@ static int Cleanup_handler_exit(int exit_value, int signum, int flag)
return(2);
}
if(cleanup_exiting) {
fprintf(stderr,"cleanup: ABORT : repeat by pid=%d, signum=%d\n",
getpid(),signum);
fprintf(stderr,"cleanup: ABORT : repeat by pid=%.f, signum=%d\n",
(double) getpid(), signum);
return(0);
}
cleanup_exiting= 1;

View File

@ -62,6 +62,7 @@ int burn_setup_drive(struct burn_drive *d, char *fname)
d->stdio_fd = -1;
d->status = BURN_DISC_UNREADY;
d->do_stream_recording = 0;
d->stream_recording_start= 0;
return 1;
}
@ -231,7 +232,7 @@ int burn_drive_inquire_media(struct burn_drive *d)
/* ts A61020 : d->status was set to BURN_DISC_BLANK as pure guess */
/* ts A71128 : run read_disc_info() for any recognizeable profile */
if (d->current_profile > 0 ||
if (d->current_profile > 0 || d->current_is_guessed_profile ||
d->mdata->cdr_write || d->mdata->cdrw_write ||
d->mdata->dvdr_write || d->mdata->dvdram_write) {
@ -417,6 +418,9 @@ int burn_drive_unregister(struct burn_drive *d)
struct burn_drive *burn_drive_finish_enum(struct burn_drive *d)
{
struct burn_drive *t;
char msg[BURN_DRIVE_ADR_LEN + 160];
int ret;
/* ts A60821
<<< debug: for tracing calls which might use open drive fds */
int mmc_function_spy(struct burn_drive *d, char * text);
@ -429,13 +433,19 @@ struct burn_drive *burn_drive_finish_enum(struct burn_drive *d)
mmc_function_spy(NULL, "enumerate_common : -------- doing grab");
/* try to get the drive info */
if (t->grab(t)) {
ret = t->grab(t);
if (ret) {
burn_print(2, "getting drive info\n");
t->getcaps(t);
t->unlock(t);
t->released = 1;
} else {
burn_print(2, "unable to grab new located drive\n");
/* ts A90602 */
d->mdata->valid = -1;
sprintf(msg, "Unable to grab scanned drive %s", d->devname);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x0002016f, LIBDAX_MSGS_SEV_DEBUG,
LIBDAX_MSGS_PRIO_LOW, msg, 0, 0);
burn_drive_unregister(t);
t = NULL;
}
@ -792,6 +802,18 @@ enum burn_drive_status burn_drive_get_status(struct burn_drive *d,
return d->busy;
}
int burn_drive_set_stream_recording(struct burn_drive *d, int recmode,
int start, int flag)
{
if (recmode == 1)
d->do_stream_recording = 1;
else if (recmode == -1)
d->do_stream_recording = 0;
d->stream_recording_start = start;
return(1);
}
void burn_drive_cancel(struct burn_drive *d)
{
pthread_mutex_lock(&d->access_lock);
@ -842,7 +864,7 @@ static int drive_getcaps(struct burn_drive *d, struct burn_drive_info *out)
a ssert(d->mdata);
#endif
if (!d->idata->valid || !d->mdata->valid)
if(d->idata->valid <= 0 || d->mdata->valid <= 0)
return 0;
id = (struct burn_scsi_inquiry_data *)d->idata;
@ -908,7 +930,7 @@ int burn_drive_scan_sync(struct burn_drive_info *drives[],
*/
unsigned char scanned[32];
unsigned count = 0;
int i;
int i, ret;
/* ts A61007 : moved up to burn_drive_scan() */
/* a ssert(burn_running); */
@ -965,13 +987,22 @@ int burn_drive_scan_sync(struct burn_drive_info *drives[],
if (drive_array[i].global_index < 0)
continue; /* invalid device */
while (!drive_getcaps(&drive_array[i],
&(*drives)[*n_drives])) {
/* ts A90602 : This old loop is not plausible. See A70907.
while (!drive_getcaps(&drive_array[i],
&(*drives)[*n_drives])) {
sleep(1);
}
(*n_drives)++;
}
*/
/* ts A90602 : A single call shall do (rather than a loop) */
ret = drive_getcaps(&drive_array[i], &(*drives)[*n_drives]);
if (ret > 0)
(*n_drives)++;
scanned[i / 8] |= 1 << (i % 8);
}
if (*drives != NULL && *n_drives == 0) {
free ((char *) *drives);
*drives = NULL;
}
return(1);
}
@ -1127,14 +1158,14 @@ void burn_sectors_to_msf(int sectors, int *m, int *s, int *f)
int burn_drive_get_read_speed(struct burn_drive *d)
{
if(!d->mdata->valid)
if(d->mdata->valid <= 0)
return 0;
return d->mdata->max_read_speed;
}
int burn_drive_get_write_speed(struct burn_drive *d)
{
if(!d->mdata->valid)
if(d->mdata->valid <= 0)
return 0;
return d->mdata->max_write_speed;
}
@ -1142,7 +1173,7 @@ int burn_drive_get_write_speed(struct burn_drive *d)
/* ts A61021 : New API function */
int burn_drive_get_min_write_speed(struct burn_drive *d)
{
if(!d->mdata->valid)
if(d->mdata->valid <= 0)
return 0;
return d->mdata->min_write_speed;
}
@ -1729,6 +1760,10 @@ int burn_abort(int patience,
unsigned long wait_grain= 100000;
time_t start_time, current_time, pacifier_time, end_time;
#ifndef NIX
time_t stdio_patience = 3;
#endif
current_time = start_time = pacifier_time = time(0);
end_time = start_time + patience;
@ -1744,10 +1779,38 @@ int burn_abort(int patience,
occup = burn_drive_is_occupied(&(drive_array[i]));
if(occup == -2)
continue;
if(drive_array[i].drive_role != 1) {
#ifdef NIX
/* ts A90302
<<< this causes a race condition with drive
usage and drive disposal.
*/
drive_array[i].busy = BURN_DRIVE_IDLE;
burn_drive_forget(&(drive_array[i]), 1);
} else if(occup <= 10) {
continue;
#else /* NIX */
/* ts A90318
>>> but if a pipe breaks then the drive
never gets idle.
So for now with a short patience timespan
and eventually a deliberate memory leak.
*/
if (current_time - start_time >
stdio_patience) {
drive_array[i].global_index = -1;
continue;
}
#endif /* ! NIX */
}
if(occup <= 10) {
burn_drive_forget(&(drive_array[i]), 1);
} else if(occup <= 100) {
if(first_round)
@ -2037,7 +2100,7 @@ int burn_drive_get_speedlist(struct burn_drive *d,
struct burn_speed_descriptor *sd, *csd = NULL;
(*speed_list) = NULL;
if(!d->mdata->valid)
if(d->mdata->valid <= 0)
return 0;
for (sd = d->mdata->speed_descriptors; sd != NULL; sd = sd->next) {
ret = burn_speed_descriptor_new(&csd, NULL, csd, 0);
@ -2062,7 +2125,7 @@ int burn_drive_get_best_speed(struct burn_drive *d, int speed_goal,
if (speed_goal < 0)
best_speed = 2000000000;
*best_descr = NULL;
if(!d->mdata->valid)
if(d->mdata->valid <= 0)
return 0;
for (sd = d->mdata->speed_descriptors; sd != NULL; sd = sd->next) {
if (flag & 1)

View File

@ -3,11 +3,15 @@
#ifndef LIBBURN_H
#define LIBBURN_H
/* Needed for off_t which is the (POSIX-ly) appropriate type for
expressing a file or stream size.
/*
Applications must use 64 bit off_t. E.g. by defining
#define _LARGEFILE_SOURCE
#define _FILE_OFFSET_BITS 64
or take special precautions to interface with the library by 64 bit integers
where this .h files prescribe off_t. Not to use 64 bit file i/o will keep the
application from producing and processing ISO images of more than 2 GB size.
XXX we should enforce 64-bitness for off_t
ts A61101 : this is usually done by the build system (if it is not broken)
*/
#include <sys/types.h>
@ -1384,6 +1388,28 @@ int burn_precheck_write(struct burn_write_opts *o, struct burn_disc *disc,
*/
void burn_disc_write(struct burn_write_opts *o, struct burn_disc *disc);
/* ts A90227 */
/** Control stream recording during the write run and eventually set the start
LBA for stream recording.
Stream recording is set from struct burn_write_opts when the write run
gets started. See burn_write_opts_set_stream_recording().
The call described here can be used later to override this setting and
to program automatic switching at a given LBA. It also affects subsequent
calls to burn_random_access_write().
@param drive The drive which performs the write operation.
@param recmode -1= disable stream recording
0= leave setting as is
1= enable stream recording
@param start The LBA where actual stream recording shall start.
(0 means unconditional stream recording)
@param flag Bitfield for control purposes (unused yet, submit 0).
@return 1=success , <=0 failure
@since 0.6.4
*/
int burn_drive_set_stream_recording(struct burn_drive *drive, int recmode,
int start, int flag);
/** Cancel an operation on a drive.
This will only work when the drive's busy state is BURN_DRIVE_READING or
BURN_DRIVE_WRITING.
@ -1902,12 +1928,15 @@ void burn_write_opts_set_force(struct burn_write_opts *opts, int use_force);
/* ts A80412 */
/** Eventually makes use of the more modern write command AAh WRITE12 and
sets the Streaming bit. With DVD-RAM this can override the traditional
slowdown to half nominal speed. But if it speeds up writing then it also
disables error management and correction. Weigh your priorities.
This only affects the write operations of burn_disc_write().
sets the Streaming bit. With DVD-RAM and BD this can override the
traditional slowdown to half nominal speed. But if it speeds up writing
then it also disables error management and correction. Weigh your
priorities. This affects the write operations of burn_disc_write()
and subsequent calls of burn_random_access_write().
@param opts The write opts to change
@param value 0=use 2Ah WRITE10, 1=use AAh WRITE12 with Streaming bit
@since 0.6.4:
>=16 use WRITE12 but not before the LBA given by value
@since 0.4.6
*/
void burn_write_opts_set_stream_recording(struct burn_write_opts *opts,
@ -2230,8 +2259,8 @@ void burn_version(int *major, int *minor, int *micro);
*/
#define burn_header_version_major 0
#define burn_header_version_minor 5
#define burn_header_version_micro 9
#define burn_header_version_minor 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.

View File

@ -1,7 +1,7 @@
/* libdax_msgs
Message handling facility of libdax.
Copyright (C) 2006 - 2008 Thomas Schmitt <scdbackup@gmx.net>,
Copyright (C) 2006 - 2009 Thomas Schmitt <scdbackup@gmx.net>,
provided under GPL version 2
*/

View File

@ -1,7 +1,7 @@
/* libdax_msgs
Message handling facility of libdax.
Copyright (C) 2006-2008 Thomas Schmitt <scdbackup@gmx.net>,
Copyright (C) 2006-2009 Thomas Schmitt <scdbackup@gmx.net>,
provided under GPL version 2
*/
@ -536,6 +536,20 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
0x00020161 (WARNING,HIGH) = Empty session deleted
0x00020162 (SORRY,HIGH) = BD-R not unformatted blank any more. Cannot format
0x00020163 (NOTE,HIGH) = Blank BD-R left unformatted for zero spare capacity
0x00020164 (SORRY,HIGH) = Drive does not format BD-RE without spares
0x00020165 (WARNING,HIGH) = Drive does not support fast formatting
0x00020166 (WARNING,HIGH) = Drive does not support full formatting
0x00020167 (SORRY,HIGH) = Drive does not support non-default formatting
0x00020168 (FAILURE,HIGH) = Media not properly formatted. Cannot write.
0x00020169 (WARNING,HIGH) = Last session on media is still open
0x0002016a (FAILURE,HIGH) = No MMC transport adapter is present
0x0002016b (WARNING,HIGH) = No MMC transport adapter is present
0x0002016c (DEBUG,HIGH) = No MMC transport adapter is present
0x0002016e (DEBUG,HIGH) = MODE SENSE page 2A too short
0x0002016f (DEBUG,HIGH) = Unable to grab scanned drive
0x00020170 (NOTE,HIGH) = Closing open session before writing new one
0x00020171 (NOTE,HIGH) = Closing BD-R with accidently open session
libdax_audioxtr:
0x00020200 (SORRY,HIGH) = Cannot open audio source file

View File

@ -55,10 +55,10 @@ extern struct libdax_msgs *libdax_messenger;
/* ts A70306 */
#define Libburn_support_dvd_plus_R 1
/* ts A70509 : handling 0x41 and 0x42 as read-only types */
/* ts A70509 : handling 0x41 as read-only type */
#define Libburn_support_bd_r_readonlY 1
/* >>> ts A81208 */
/* ts A81208 */
#define Libburn_support_bd_plus_r_srM 1
@ -77,6 +77,12 @@ extern struct libdax_msgs *libdax_messenger;
# define Libburn_do_not_format_dvd_ram_or_bd_rE 1
*/
/* ts A90603 : Simulate the command restrictions of an old MMC-1 drive
# define Libisofs_simulate_old_mmc1_drivE 1
*/
/* DVD/BD progress report:
ts A61219 : It seems to work with a used (i.e. thoroughly formatted) DVD+RW.
Error messages of class DEBUG appear because of inability to
@ -124,6 +130,7 @@ extern struct libdax_msgs *libdax_messenger;
BD-RE is now an officially supported profile.
ts A81209 : The first two sessions have been written to BD-R SRM
(auto formatted without Defect Management).
ts A90107 : BD-R is now supported media type
*/
/* ts A70519 : With MMC commands of data direction FROM_DRIVE:
@ -744,7 +751,7 @@ int mmc_write(struct burn_drive *d, int start, struct buffer *buf)
mmc_wait_for_buffer_free(d, buf);
/* ts A80412 */
if(d->do_stream_recording > 0) {
if(d->do_stream_recording > 0 && start >= d->stream_recording_start) {
/* >>> ??? is WRITE12 available ? */
/* >>> ??? inquire feature 107h Stream Writing bit ? */
@ -1459,6 +1466,75 @@ inquire_drive:;
}
/* ts A61201 */
static char *mmc_obtain_profile_name(int profile_number)
{
static char *texts[0x53] = {NULL};
int i, max_pno = 0x53;
if (texts[0] == NULL) {
for (i = 0; i<max_pno; i++)
texts[i] = "";
/* mmc5r03c.pdf , Table 89, Spelling: guessed cdrecord style */
texts[0x01] = "Non-removable disk";
texts[0x02] = "Removable disk";
texts[0x03] = "MO erasable";
texts[0x04] = "Optical write once";
texts[0x05] = "AS-MO";
texts[0x08] = "CD-ROM";
texts[0x09] = "CD-R";
texts[0x0a] = "CD-RW";
texts[0x10] = "DVD-ROM";
texts[0x11] = "DVD-R sequential recording";
texts[0x12] = "DVD-RAM";
texts[0x13] = "DVD-RW restricted overwrite";
texts[0x14] = "DVD-RW sequential recording";
texts[0x15] = "DVD-R/DL sequential recording";
texts[0x16] = "DVD-R/DL layer jump recording";
texts[0x1a] = "DVD+RW";
texts[0x1b] = "DVD+R";
texts[0x2a] = "DVD+RW/DL";
texts[0x2b] = "DVD+R/DL";
texts[0x40] = "BD-ROM";
texts[0x41] = "BD-R sequential recording";
texts[0x42] = "BD-R random recording";
texts[0x43] = "BD-RE";
texts[0x50] = "HD-DVD-ROM";
texts[0x51] = "HD-DVD-R";
texts[0x52] = "HD-DVD-RAM";
}
if (profile_number<0 || profile_number>=max_pno)
return "";
return texts[profile_number];
}
/* ts A90603 : to be used if the drive knows no GET CONFIGURATION
*/
static int mmc_guess_profile(struct burn_drive *d, int flag)
{
int cp;
cp = 0;
if (d->status == BURN_DISC_BLANK ||
d->status == BURN_DISC_APPENDABLE) {
cp = 0x09;
} else if (d->status == BURN_DISC_FULL) {
cp = 0x08;
}
if (cp)
if (d->erasable)
cp = 0x0a;
d->current_profile = cp;
if (cp == 0)
return 0;
d->current_is_cd_profile = 1;
d->current_is_supported_profile = 1;
strcpy(d->current_profile_text, mmc_obtain_profile_name(cp));
return 1;
}
static int mmc_read_disc_info_al(struct burn_drive *d, int *alloc_len)
{
struct buffer buf;
@ -1466,8 +1542,8 @@ static int mmc_read_disc_info_al(struct burn_drive *d, int *alloc_len)
struct command c;
char msg[160];
/* ts A70131 : had to move mmc_read_toc() to end of function */
int do_read_toc = 0, session_state, disc_status, len, old_alloc_len;
int ret;
int do_read_toc = 0, disc_status, len, old_alloc_len;
int ret, number_of_sessions = -1;
/* ts A61020 */
d->start_lba = d->end_lba = -2000000000;
@ -1526,6 +1602,9 @@ static int mmc_read_disc_info_al(struct burn_drive *d, int *alloc_len)
d->erasable = !!(data[2] & 16);
disc_status = data[2] & 3;
d->state_of_last_session = (data[2] >> 2) & 3;
number_of_sessions = (data[9] << 8) | data[4];
if (d->current_profile == 0x10 || d->current_profile == 0x40) {
/* DVD-ROM , BD-ROM */
disc_status = 2; /* always full and finalized */
@ -1581,16 +1660,35 @@ regard_as_blank:;
ret = mmc_read_capacity(d);
/* Freshly formatted, unwritten BD-R pretend to be appendable
but in our model they need to be regarded as blank.
Criterion: BD-R seq, read capacity known and 0,
declared appendable, single empty session
*/
if (d->current_profile == 0x41 && ret > 0 &&
if (d->current_profile == 0x41 &&
d->status == BURN_DISC_APPENDABLE &&
d->media_read_capacity == 0)
ret > 0 && d->media_read_capacity == 0 &&
d->state_of_last_session == 0 && number_of_sessions == 1)
goto regard_as_blank;
if (d->current_profile == 0x41 &&
d->status == BURN_DISC_APPENDABLE &&
d->state_of_last_session == 1) {
/* ??? apply this test to other media types ? */
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020169,
LIBDAX_MSGS_SEV_WARNING, LIBDAX_MSGS_PRIO_HIGH,
"Last session on media is still open.", 0, 0);
}
do_read_toc = 1;
break;
}
/* ts A90603 : An MMC-1 drive might not know the media type yet */
if (d->current_is_guessed_profile && d->current_profile == 0)
mmc_guess_profile(d, 0);
if ((d->current_profile != 0 || d->status != BURN_DISC_UNREADY)
&& ! d->current_is_supported_profile) {
if (!d->silent_on_scsi_error) {
@ -1606,7 +1704,7 @@ regard_as_blank:;
return 0;
}
/* >>> ts A61217 : Note for future
/* ts A61217 : Note for future
growisofs performs OPC if (data[0]<<8)|data[1]<=32
which indicates no OPC entries are attached to the
reply from the drive.
@ -1634,10 +1732,9 @@ regard_as_blank:;
d->complete_sessions = 0;
} else {
/* ts A70131 : number of non-empty sessions */
d->complete_sessions = (data[9] << 8) | data[4];
session_state = (data[2] >> 2) & 3;
d->complete_sessions = number_of_sessions;
/* mmc5r03c.pdf 6.22.3.1.3 State of Last Session: 3=complete */
if (session_state != 3 && d->complete_sessions >= 1)
if (d->state_of_last_session != 3 && d->complete_sessions >= 1)
d->complete_sessions--;
/* ts A70129 : mmc5r03c.pdf 6.22.3.1.7
@ -2147,49 +2244,6 @@ void mmc_set_speed(struct burn_drive *d, int r, int w)
}
/* ts A61201 */
static char *mmc_obtain_profile_name(int profile_number)
{
static char *texts[0x53] = {NULL};
int i, max_pno = 0x53;
if (texts[0] == NULL) {
for (i = 0; i<max_pno; i++)
texts[i] = "";
/* mmc5r03c.pdf , Table 89, Spelling: guessed cdrecord style */
texts[0x01] = "Non-removable disk";
texts[0x02] = "Removable disk";
texts[0x03] = "MO erasable";
texts[0x04] = "Optical write once";
texts[0x05] = "AS-MO";
texts[0x08] = "CD-ROM";
texts[0x09] = "CD-R";
texts[0x0a] = "CD-RW";
texts[0x10] = "DVD-ROM";
texts[0x11] = "DVD-R sequential recording";
texts[0x12] = "DVD-RAM";
texts[0x13] = "DVD-RW restricted overwrite";
texts[0x14] = "DVD-RW sequential recording";
texts[0x15] = "DVD-R/DL sequential recording";
texts[0x16] = "DVD-R/DL layer jump recording";
texts[0x1a] = "DVD+RW";
texts[0x1b] = "DVD+R";
texts[0x2a] = "DVD+RW/DL";
texts[0x2b] = "DVD+R/DL";
texts[0x40] = "BD-ROM";
texts[0x41] = "BD-R sequential recording";
texts[0x42] = "BD-R random recording";
texts[0x43] = "BD-RE";
texts[0x50] = "HD-DVD-ROM";
texts[0x51] = "HD-DVD-R";
texts[0x52] = "HD-DVD-RAM";
}
if (profile_number<0 || profile_number>=max_pno)
return "";
return texts[profile_number];
}
/* ts A61201 : found in unfunctional state
*/
static int mmc_get_configuration_al(struct burn_drive *d, int *alloc_len)
@ -2209,6 +2263,7 @@ static int mmc_get_configuration_al(struct burn_drive *d, int *alloc_len)
d->current_profile_text[0] = 0;
d->current_is_cd_profile = 0;
d->current_is_supported_profile = 0;
d->current_is_guessed_profile = 0;
d->current_has_feat21h = 0;
d->current_feat21h_link_size = -1;
d->current_feat23h_byte4 = 0;
@ -2231,8 +2286,24 @@ static int mmc_get_configuration_al(struct burn_drive *d, int *alloc_len)
c.dir = FROM_DRIVE;
d->issue_command(d, &c);
if (c.error)
#ifdef Libisofs_simulate_old_mmc1_drivE
c.error = 1;
c.sense[2] = 0x5;
c.sense[12] = 0x20;
c.sense[13] = 0x0;
#endif /* Libisofs_simulate_old_mmc1_drivE */
if (c.error) {
/* ts A90603 : MMC-1 drive do not know 46h GET CONFIGURATION */
if (c.sense[2] == 0x5 && c.sense[12] == 0x20 &&
c.sense[13] == 0x0) {
d->current_is_guessed_profile = 1;
/* Will yield a non-zero profile only after
mmc_read_disc_info_al() was called */
mmc_guess_profile(d, 0);
}
return 0;
}
old_alloc_len = *alloc_len;
*alloc_len = len = mmc_four_char_to_int(c.page->data);
if (len > old_alloc_len)
@ -2852,7 +2923,8 @@ selected_not_suitable:;
d->current_profile == 0x14 ||
d->current_profile == 0x1a ||
d->current_profile == 0x12 ||
d->current_profile == 0x43))
d->current_profile == 0x41 ||
d->current_profile == 0x43))
goto unsuitable_media;
format_type = d->format_descriptors[index].type;
@ -2860,7 +2932,8 @@ selected_not_suitable:;
format_type == 0x10 ||
format_type == 0x11 || format_type == 0x13 ||
format_type == 0x15 || format_type == 0x26 ||
format_type == 0x30 || format_type == 0x31 ))
format_type == 0x30 || format_type == 0x31 ||
format_type == 0x32))
goto selected_not_suitable;
if (flag & 4) {
num_of_blocks =
@ -2872,7 +2945,8 @@ selected_not_suitable:;
c.page->data[9 + i] =
( d->format_descriptors[index].tdp >>
(16 - 8 * i)) & 0xff;
if (format_type == 0x30 || format_type == 0x31) {
if (format_type == 0x30 || format_type == 0x31 ||
format_type == 0x32) {
if (flag & 64)
format_sub_type = 3; /* Quick certification */
else
@ -3454,6 +3528,14 @@ static int mmc_get_write_performance_al(struct burn_drive *d,
c.page->bytes = 0;
c.dir = FROM_DRIVE;
d->issue_command(d, &c);
#ifdef Libisofs_simulate_old_mmc1_drivE
c.error = 1;
c.sense[2] = 0x5;
c.sense[12] = 0x20;
c.sense[13] = 0x0;
#endif /* Libisofs_simulate_old_mmc1_drivE */
if (c.error)
return 0;
len = mmc_four_char_to_int(c.page->data);
@ -3789,6 +3871,7 @@ int mmc_setup_drive(struct burn_drive *d)
d->current_profile_text[0] = 0;
d->current_is_cd_profile = 0;
d->current_is_supported_profile = 0;
d->current_is_guessed_profile = 0;
d->current_has_feat21h = 0;
d->current_feat21h_link_size = -1;
d->current_feat23h_byte4 = 0;
@ -3799,6 +3882,7 @@ int mmc_setup_drive(struct burn_drive *d)
d->bg_format_status = -1;
d->num_format_descr = 0;
d->complete_sessions = 0;
d->state_of_last_session = -1;
d->last_track_no = 1;
d->media_capacity_remaining = 0;
d->media_lba_limit = 0;

View File

@ -143,7 +143,7 @@ int burn_write_opts_set_simulate(struct burn_write_opts *opts, int sim)
int burn_write_opts_set_underrun_proof(struct burn_write_opts *opts,
int underrun_proof)
{
if (!opts->drive->mdata->valid)
if (opts->drive->mdata->valid <= 0)
return 0;
if (opts->drive->mdata->underrun_proof) {
opts->underrun_proof = underrun_proof;
@ -385,7 +385,7 @@ void burn_write_opts_set_force(struct burn_write_opts *opts, int use_force)
void burn_write_opts_set_stream_recording(struct burn_write_opts *opts,
int value)
{
opts->do_stream_recording = !!value;
opts->do_stream_recording = value;
}

63
libburn/os-dummy.h Normal file
View File

@ -0,0 +1,63 @@
/* os-dummy.h
Operating system specific libburn definitions and declarations. Included
by os.h in case of compilation for
Unknown POSIX like systems
with the dummy MMC transport adapter sg-dummy.c
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
*/
/** List of all signals which shall be caught by signal handlers and trigger
a graceful abort of libburn. (See man 7 signal.)
*/
/* Once as system defined macros */
#define BURN_OS_SIGNAL_MACRO_LIST \
SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT, \
SIGFPE, SIGSEGV, SIGPIPE, SIGALRM, SIGTERM, \
SIGUSR1, SIGUSR2, SIGXCPU, SIGTSTP, SIGTTIN, \
SIGTTOU
/* Once as text 1:1 list of strings for messages and interpreters */
#define BURN_OS_SIGNAL_NAME_LIST \
"SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGABRT", \
"SIGFPE", "SIGSEGV", "SIGPIPE", "SIGALRM", "SIGTERM", \
"SIGUSR1", "SIGUSR2", "SIGXCPU", "SIGTSTP", "SIGTTIN", \
"SIGTTOU"
/* The number of above list items */
#define BURN_OS_SIGNAL_COUNT 16
/** To list all signals which shall surely not be caught */
#define BURN_OS_NON_SIGNAL_MACRO_LIST \
SIGKILL, SIGCHLD, SIGSTOP
/* The number of above list items */
#define BURN_OS_NON_SIGNAL_COUNT 3
/* The maximum size for a (SCSI) i/o transaction */
/* Important : MUST be at least 32768 ! */
#define BURN_OS_TRANSPORT_BUFFER_SIZE 65536
/* To hold the position of the most recently delivered address from
device enumeration.
*/
struct burn_drive_enumerator_struct {
int pos;
int info_count;
char **info_list;
};
#define BURN_OS_DEFINE_DRIVE_ENUMERATOR_T \
typedef struct burn_drive_enumerator_struct burn_drive_enumerator_t;
/* The list of operating system dependent elements in struct burn_drive.
Usually they are initialized in sg-*.c:enumerate_common().
*/
#define BURN_OS_TRANSPORT_DRIVE_ELEMENTS \
int just_a_dummy;

View File

@ -3,7 +3,7 @@
Operating system specific libburn definitions and declarations.
The macros defined here are used by libburn modules in order to
avoid own system dependent case distinctions.
Copyright (C) 2006 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
*/
#ifndef BURN_OS_H_INCLUDED
@ -20,14 +20,23 @@
#include "os-freebsd.h"
#else /* operating system case distinction */
#else
#ifdef __linux
/* --------- Linux kernels 2.4 and 2.6 with Linux SCSI Generic (sg) -------- */
#include "os-linux.h"
#endif /* End of operating system case distinction */
#else
/* --------- Any other system. With dummy MMC transport sg-dummy.c --------- */
#include "os-dummy.h"
#endif /* ! __linux */
#endif /* ! __FreeBSD__ */
#endif /* ! BURN_OS_H_INCLUDED */

229
libburn/sg-dummy.c Normal file
View File

@ -0,0 +1,229 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/*
This is the main operating system dependent SCSI part of libburn. It implements
the transport level aspects of SCSI control and command i/o.
Present implementation: default dummy which enables libburn only to work
with stdio: pseudo drive addresses.
For real implementations see sg-linux.c or sg-freebsd.c
*/
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <string.h>
#ifdef Libburn_os_has_statvfS
#include <sys/statvfs.h>
#endif /* Libburn_os_has_stavtfS */
#include "transport.h"
#include "drive.h"
#include "sg.h"
#include "spc.h"
#include "mmc.h"
#include "sbc.h"
#include "debug.h"
#include "toc.h"
#include "util.h"
#include "libdax_msgs.h"
extern struct libdax_msgs *libdax_messenger;
/** Returns the next index number and the next enumerated drive address.
The enumeration has to cover all available and accessible drives. It is
allowed to return addresses of drives which are not available but under
some (even exotic) circumstances could be available. It is on the other
hand allowed, only to hand out addresses which can really be used right
in the moment of this call. (This implementation chooses the former.)
@param idx An opaque handle. Make no own theories about it.
@param adr Takes the reply
@param adr_size Gives maximum size of reply including final 0
@param initialize 1 = start new,
0 = continue, use no other values for now
-1 = finish
@return 1 = reply is a valid address , 0 = no further address available
-1 = severe error (e.g. adr_size too small)
*/
int sg_give_next_adr(burn_drive_enumerator_t *idx,
char adr[], int adr_size, int initialize)
{
return 0;
}
/** Brings all available, not-whitelist-banned, and accessible drives into
libburn's list of drives.
*/
/* ts A61115: replacing call to sg-implementation internals from drive.c */
int scsi_enumerate_drives(void)
{
libdax_msgs_submit(libdax_messenger, -1, 0x0002016b,
LIBDAX_MSGS_SEV_WARNING, LIBDAX_MSGS_PRIO_HIGH,
"No MMC transport adapter is present. Running on sg-dummy.c.",
0, 0);
return 1;
}
/** Tells wether libburn has the given drive in use or exclusively reserved.
If it is "open" then libburn will eventually call sg_release() on it when
it is time to give up usage resp. reservation.
*/
/** Published as burn_drive.drive_is_open() */
int sg_drive_is_open(struct burn_drive * d)
{
return 0;
}
/** Opens the drive for SCSI commands and - if burn activities are prone
to external interference on your system - obtains an exclusive access lock
on the drive. (Note: this is not physical tray locking.)
A drive that has been opened with sg_grab() will eventually be handed
over to sg_release() for closing and unreserving.
*/
int sg_grab(struct burn_drive *d)
{
libdax_msgs_submit(libdax_messenger, d->global_index, 0x0002016a,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
"No MMC transport adapter is present. Running on sg-dummy.c.",
0, 0);
return 0;
}
/** Gives up the drive for SCSI commands and releases eventual access locks.
(Note: this is not physical tray locking.)
*/
int sg_release(struct burn_drive *d)
{
return 0;
}
/** Sends a SCSI command to the drive, receives reply and evaluates wether
the command succeeded or shall be retried or finally failed.
Returned SCSI errors shall not lead to a return value indicating failure.
The callers get notified by c->error. An SCSI failure which leads not to
a retry shall be notified via scsi_notify_error().
The Libburn_log_sg_commandS facility might be of help when problems with
a drive have to be examined. It shall stay disabled for normal use.
@return: 1 success , <=0 failure
*/
int sg_issue_command(struct burn_drive *d, struct command *c)
{
libdax_msgs_submit(libdax_messenger, d->global_index, 0x0002016a,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
"No MMC transport adapter is present. Running on sg-dummy.c.",
0, 0);
return -1;
}
/** Tries to obtain SCSI address parameters.
@return 1 is success , 0 is failure
*/
int sg_obtain_scsi_adr(char *path, int *bus_no, int *host_no, int *channel_no,
int *target_no, int *lun_no)
{
libdax_msgs_submit(libdax_messenger, -1, 0x0002016c,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
"No MMC transport adapter is present. Running on sg-dummy.c.",
0, 0);
return 0;
}
/** Tells wether a text is a persistent address as listed by the enumeration
functions.
*/
int sg_is_enumerable_adr(char *adr)
{
return(0);
}
/** Estimate the potential payload capacity of a file address.
@param path The address of the file to be examined. If it does not
exist yet, then the directory will be inquired.
@param bytes The pointed value gets modified, but only if an estimation is
possible.
@return -2 = cannot perform necessary operations on file object
-1 = neither path nor dirname of path exist
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)
{
struct stat stbuf;
#ifdef Libburn_os_has_statvfS
struct statvfs vfsbuf;
#endif
char testpath[4096], *cpt;
long blocks;
off_t add_size = 0;
testpath[0] = 0;
blocks = *bytes / 512;
if (stat(path, &stbuf) == -1) {
strcpy(testpath, path);
cpt = strrchr(testpath, '/');
if(cpt == NULL)
strcpy(testpath, ".");
else if(cpt == testpath)
testpath[1] = 0;
else
*cpt = 0;
if (stat(testpath, &stbuf) == -1)
return -1;
#ifdef Libburn_if_this_was_linuX
} else if(S_ISBLK(stbuf.st_mode)) {
fd = open(path, open_mode);
if (fd == -1)
return -2;
ret = ioctl(fd, BLKGETSIZE, &blocks);
close(fd);
if (ret == -1)
return -2;
*bytes = ((off_t) blocks) * (off_t) 512;
#endif /* Libburn_if_this_was_linuX */
} else if(S_ISREG(stbuf.st_mode)) {
add_size = stbuf.st_blocks * (off_t) 512;
strcpy(testpath, path);
} else
return 0;
if (testpath[0]) {
#ifdef Libburn_os_has_statvfS
if (statvfs(testpath, &vfsbuf) == -1)
return -2;
*bytes = add_size + ((off_t) vfsbuf.f_bsize) *
(off_t) vfsbuf.f_bavail;
#else /* Libburn_os_has_statvfS */
return 0;
#endif /* ! Libburn_os_has_stavtfS */
}
return 1;
}

View File

@ -1,6 +1,5 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
#include <assert.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
@ -553,11 +552,26 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
if (c->page) {
ccb->csio.data_ptr = c->page->data;
if (c->dir == FROM_DRIVE) {
ccb->csio.dxfer_len = BUFFER_SIZE;
/* ts A90430 : Ticket 148 , by jwehle :
"On ... FreeBSD 6.4 which has a usb memory reader in
addition to a ATAPI DVD burner sg_issue_command
will hang while the SCSI bus is being scanned"
*/
if (c->dxfer_len >= 0)
ccb->csio.dxfer_len = c->dxfer_len;
else
ccb->csio.dxfer_len = BUFFER_SIZE;
/* touch page so we can use valgrind */
memset(c->page->data, 0, BUFFER_SIZE);
} else {
assert(c->page->bytes > 0);
/* ts A90430 */
/* a ssert(c->page->bytes > 0); */
if (c->page->bytes <= 0) {
c->error = 1;
return 0;
}
ccb->csio.dxfer_len = c->page->bytes;
}
} else {

View File

@ -470,7 +470,7 @@ static int sg_fcntl_lock(int *fd, char *fd_name, int l_type, int verbous)
/* ts A60926 */
static int sg_open_drive_fd(char *fname, int scan_mode)
{
int open_mode = O_RDWR, fd;
int open_mode = O_RDWR, fd, tries= 0;
char msg[81];
/* ts A70409 : DDLP-B */
@ -502,7 +502,8 @@ static int sg_open_drive_fd(char *fname, int scan_mode)
"libburn: experimental: O_EXCL= %d , O_NDELAY= %d\n",
!!(open_mode&O_EXCL),!!(open_mode&O_NDELAY));
*/
try_open:;
fd = open(fname, open_mode);
if (fd == -1) {
/* <<< debugging
@ -511,6 +512,17 @@ static int sg_open_drive_fd(char *fname, int scan_mode)
fname,errno);
*/
if (errno == EBUSY) {
tries++;
/* <<< debugging
fprintf(stderr,
"\nlibburn_DEBUG: EBUSY , tries= %d\n", tries);
*/
if (tries < 4) {
usleep(2000000);
goto try_open;
}
sg_handle_busy_device(fname, errno);
return -1;
@ -793,7 +805,7 @@ static int is_scsi_drive(char *fname, int *bus_no, int *host_no,
if (ret<=0) {
if (linux_sg_enumerate_debug)
fprintf(stderr, "cannot lock siblings\n");
sg_handle_busy_device(fname, 0);
sg_handle_busy_device(fname, 0);
return 0;
}
/* the final occupation will be done in sg_grab() */

View File

@ -1,7 +1,7 @@
/* sg.c
Switcher for operating system dependent transport level modules of libburn.
Copyright (C) 2006 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
*/
@ -10,8 +10,32 @@
#include "sg-freebsd.c"
#else
#ifdef __linux
#include "sg-linux.c"
#endif
#else
/* The dummy adapter formally fulfills the expectations of libburn towards
its SCSI command transport. It will show no drives and perform no SCSI
commands.
libburn will then be restricted to using its stdio pseudo drives.
*/
static int intentional_compiler_warning(void)
{
int INTENTIONAL_COMPILER_WARNING_;
int Cannot_recognize_Linux_nor_FreeBSD_;
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_Linux_nor_FreeBSD;
int INTENTIONAL_COMPILER_WARNING;
return(0);
}
#include "sg-dummy.c"
#endif /* ! __linux */
#endif /* ! __FreeBSD__ */

View File

@ -104,7 +104,9 @@ int spc_wait_unit_attention(struct burn_drive *d, int max_sec, char *cmd_text,
int flag)
{
int i, ret = 1, key = 0, asc = 0, ascq = 0;
char msg[160];
char msg[320];
unsigned char sense[14];
enum response resp;
if (!(flag & 1))
usleep(100000);
@ -138,10 +140,24 @@ int spc_wait_unit_attention(struct burn_drive *d, int max_sec, char *cmd_text,
/* media change notice = try again */
goto slumber;
#ifdef NIX
sprintf(msg,
"Asynchromous SCSI error on %s: key=%X asc=%2.2Xh ascq=%2.2Xh",
cmd_text, (unsigned) key, (unsigned) asc,
(unsigned) ascq);
#else
/* ts A90213 */
sprintf(msg,
"Asynchromous SCSI error on %s: ", cmd_text);
sense[2] = key;
sense[12] = asc;
sense[13] = ascq;
resp = scsi_error_msg(d, sense, 14, msg + strlen(msg),
&key, &asc, &ascq);
#endif /* ! NIX */
libdax_msgs_submit(libdax_messenger, d->global_index,
0x0002014d,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
@ -275,7 +291,7 @@ void spc_allow(struct burn_drive *d)
}
/*
ts A70518 : Do not call with *alloc_len < 8
ts A70518 - A90603 : Do not call with *alloc_len < 10
*/
/** flag&1= do only inquire alloc_len */
static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag)
@ -287,13 +303,19 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag)
unsigned char *page;
struct command c;
struct burn_speed_descriptor *sd;
char msg[BURN_DRIVE_ADR_LEN + 160];
/* ts A61225 : 1 = report about post-MMC-1 speed descriptors */
static int speed_debug = 0;
if (*alloc_len < 8)
if (*alloc_len < 10)
return 0;
/* ts A90602 : Clearing mdata before command execution */
m = d->mdata;
m->valid = 0;
burn_mdata_free_subs(m);
memset(&buf, 0, sizeof(buf));
scsi_init_command(&c, SPC_MODE_SENSE, sizeof(SPC_MODE_SENSE));
/*
@ -312,12 +334,11 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag)
d->issue_command(d, &c);
if (c.error) {
memset(&buf, 0, sizeof(buf));
d->mdata->valid = -1;
m->valid = -1;
was_error = 1;
}
size = c.page->data[0] * 256 + c.page->data[1];
m = d->mdata;
page = c.page->data + 8;
/* ts A61225 :
@ -326,18 +347,28 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag)
in MMC-3 6.3.11 there are at least 28 bytes plus a variable length
set of speed descriptors. In MMC-5 E.11 it is declared "legacy".
*/
/* ts A90603 :
SPC-1 8.3.3 enumerates mode page format bytes from 0 to n and
defines Page Length as (n-1).
*/
page_length = page[1];
old_alloc_len = *alloc_len;
*alloc_len = page_length + 8;
*alloc_len = page_length + 10;
if (flag & 1)
return !was_error;
if (page_length + 8 > old_alloc_len)
page_length = old_alloc_len - 8;
if (page_length < 22)
return 0;
if (page_length + 10 > old_alloc_len)
page_length = old_alloc_len - 10;
m->valid = 0;
burn_mdata_free_subs(m);
/* ts A90602 : 20 asserts page[21]. (see SPC-1 8.3.3) */
if (page_length < 20) {
m->valid = -1;
sprintf(msg, "MODE SENSE page 2A too short: %s : %d",
d->devname, page_length);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x0002016e, LIBDAX_MSGS_SEV_DEBUG,
LIBDAX_MSGS_PRIO_LOW, msg, 0, 0);
return 0;
}
m->buffer_size = page[12] * 256 + page[13];
m->dvdram_read = page[2] & 32;
@ -368,12 +399,13 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag)
m->min_end_lba = 0x7fffffff;
m->max_end_lba = 0;
m->valid = 1;
if (!was_error)
m->valid = 1;
mmc_get_configuration(d);
/* ts A61225 : end of MMC-1 , begin of MMC-3 */
if (page_length < 32) /* no write speed descriptors ? */
if (page_length < 30) /* no write speed descriptors ? */
goto try_mmc_get_performance;
m->cur_write_speed = page[28] * 256 + page[29];
@ -397,12 +429,12 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag)
}
for (i = 0; i < num_write_speeds; i++) {
speed = page[32 + 4*i + 2] * 256 + page[32 + 4*i + 3];
speed = page[32 + 4 * i + 2] * 256 + page[32 + 4 * i + 3];
if (speed_debug)
fprintf(stderr,
"LIBBURN_DEBUG: write speed #%d = %d kB/s (rc %d)\n",
i, speed, page[32 + 4*i +1] & 7);
i, speed, page[32 + 4 * i + 1] & 7);
/* ts A61226 */
ret = burn_speed_descriptor_new(&(d->mdata->speed_descriptors),
@ -415,7 +447,7 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag)
strcpy(sd->profile_name,
d->current_profile_text);
}
sd->wrc = (( page[32 + 4*i +1] & 7 ) == 1 );
sd->wrc = (( page[32 + 4 * i + 1] & 7 ) == 1 );
sd->write_speed = speed;
}
@ -443,7 +475,7 @@ try_mmc_get_performance:;
void spc_sense_caps(struct burn_drive *d)
{
int alloc_len, start_len = 22, ret;
int alloc_len, start_len = 30, ret;
if (mmc_function_spy(d, "sense_caps") <= 0)
return;
@ -904,6 +936,18 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
sprintf(msg,
"Logical unit is in the process of becoming ready");
return RETRY;
case 0x08:
if (*key != 4)
break;
if (*ascq == 0)
sprintf(msg, "Logical unit communication failure");
else if (*ascq == 1)
sprintf(msg, "Logical unit communication timeout");
else if (*ascq == 2)
sprintf(msg, "Logical unit communication parity error");
else if (*ascq == 3)
sprintf(msg, "Logical unit communication crc error");
return RETRY;
case 0x09:
if (*key != 4)
break;
@ -1122,6 +1166,20 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
else
break;
return FAIL;
case 0x73:
if (*key == 3 && *ascq == 0)
sprintf(msg, "CD control error");
else if (*key == 3 && *ascq == 2)
sprintf(msg, "Power calibration area is full");
else if (*key == 3 && *ascq == 3)
sprintf(msg, "Power calibration area error");
else if (*key == 3 && *ascq == 4)
sprintf(msg, "Program memory area update failure");
else if (*key == 3 && *ascq == 5)
sprintf(msg, "Program memory area is full");
else
break;
return FAIL;
}
sprintf(msg_data,
"Failure. See mmc3r10g.pdf: Sense Key %X ASC %2.2X ASCQ %2.2X",

View File

@ -161,6 +161,8 @@ struct burn_drive
char current_profile_text[80];
int current_is_cd_profile;
int current_is_supported_profile;
/* ts A90603 */
int current_is_guessed_profile;
/* ts A70128 : MMC-to-MMC feature info from 46h for DVD-RW.
Quite internal. Regard as opaque :)
@ -205,6 +207,11 @@ struct burn_drive
with BD-RE */
int do_stream_recording;
/* ts A90227 : the LBA where stream recording shall start.
Writing to lower LBA will be done without streaming.
*/
int stream_recording_start;
/* ts A61218 from 51h READ DISC INFORMATION */
int bg_format_status; /* 0=needs format start, 1=needs format restart*/
@ -236,6 +243,9 @@ struct burn_drive
/* ts A70131 : from 51h READ DISC INFORMATION Number of Sessions (-1)*/
int complete_sessions;
/* ts A90107 */
int state_of_last_session;
/* ts A70129 :
from 51h READ DISC INFORMATION Last Track Number in Last Session */
int last_track_no;

View File

@ -1159,19 +1159,29 @@ int burn_disc_close_track_dvd_minus_r(struct burn_write_opts *o,
int burn_disc_finalize_dvd_plus_r(struct burn_write_opts *o)
{
struct burn_drive *d = o->drive;
char msg[80];
sprintf(msg, "Finalizing %s ...",
d->current_profile_text);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
"Finalizing DVD+R ...", 0, 0);
msg, 0, 0);
/* CLOSE SESSION, 101b, Finalize with minimal radius */
d->close_track_session(d, 2, 1); /* (2<<1)|1 = 5 */
if(d->current_profile == 0x41) { /* BD-R */
/* CLOSE SESSION, 110b, Finalize Disc */
d->close_track_session(d, 3, 0); /* (3<<1)|0 = 6 */
} else {
/* CLOSE SESSION, 101b, Finalize with minimal radius */
d->close_track_session(d, 2, 1); /* (2<<1)|1 = 5 */
}
sprintf(msg, "... finalizing %s done ",
d->current_profile_text);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
"... finalizing DVD+R done ", 0, 0);
msg, 0, 0);
return 1;
}
@ -1389,10 +1399,70 @@ int burn_disc_close_session_dvd_minus_r(struct burn_write_opts *o,
int burn_dvd_write_session(struct burn_write_opts *o,
struct burn_session *s, int is_last_session)
{
int i,ret;
int i, ret, multi_mem;
struct burn_drive *d = o->drive;
/* >>> open_session ? */
/* ts A90108 */
if (d->current_profile == 0x41 && d->status == BURN_DISC_APPENDABLE &&
d->state_of_last_session == 1) {
/* last session on BD-R is still open */;
/* BR-R were not closed by libburn-0.6.0.pl00 if o->multi==0.
This leads to an unreadable, but recoverable) media state.
Technically they are appendable although the last session
is not readable.
By default the open session gets closed here before the new
session is written. E.g. after writing a small dummy seesion
number 2 one can read session 1 and write session 3 which
points to data of session 1.
For the case that no media with 3 sessions is desired it is
possible to activate the following coarse single-session
closing code:
No new session will be written but calling programs will
report success. Quite misleading.
Activate only if really needed by
# define Libburn_bug_A90108_close_disC yes
*/
#ifdef Libburn_bug_A90108_close_disC
/* Close open session and media.
That was the goal of the failed run which led to the
unreadable (but recoverable) media state.
It is not easy to implement a general close function for
all media types. Therefore this pseudo write code is under
control of #ifdef.
*/
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020171,
LIBDAX_MSGS_SEV_NOTE, LIBDAX_MSGS_PRIO_HIGH,
"Closing BD-R with accidently open session",
0, 0);
d->close_track_session(d, 3, 0); /* CLOSE SESSION, 110b */
d->state_of_last_session = 3; /* mark as complete session */
d->status = BURN_DISC_FULL;
sleep(3); /* The caller might need time to arrange itself */
return 1;
#else /* Libburn_bug_A90108_close_disC */
/* This is the default mode.
*/
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020170,
LIBDAX_MSGS_SEV_NOTE, LIBDAX_MSGS_PRIO_HIGH,
"Closing open session before writing new one",
0, 0);
d->close_track_session(d, 1, 0); /* CLOSE SESSION, 010b */
d->state_of_last_session = 3; /* mark as complete session */
#endif /* ! Libburn_bug_A90108_close_disC */
}
for (i = 0; i < s->tracks; i++) {
ret = burn_dvd_write_track(o, s, i,
@ -1403,7 +1473,11 @@ int burn_dvd_write_session(struct burn_write_opts *o,
if (d->current_profile == 0x11 || d->current_profile == 0x14 ||
d->current_profile == 0x15) {
/* DVD-R , DVD-RW Sequential, DVD-R/DL Sequential */
multi_mem = o->multi;
if (!is_last_session)
o->multi = 1;
ret = burn_disc_close_session_dvd_minus_r(o, s);
o->multi = multi_mem;
if (ret <= 0)
return 0;
} else if (d->current_profile == 0x12 || d->current_profile == 0x43) {
@ -1771,6 +1845,13 @@ 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)
{
if (d->cancel)
return 0;
/*
fprintf(stderr, "libburn_DEBUG: write(%d, %lX, %d)\n",
fd, (unsigned long) buf, count);
*/
if (write(fd, buf, count) != count) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020148,
@ -2019,9 +2100,9 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
{
struct cue_sheet *sheet;
struct burn_drive *d = o->drive;
struct buffer buf, *buffer_mem = o->drive->buffer;
struct buffer *buffer_mem = o->drive->buffer;
struct burn_track *lt, *t;
int first = 1, i, ret, lba, nwa = 0;
int first = 1, i, ret, lba, nwa = 0, multi_mem;
off_t default_size;
char msg[80];
@ -2032,11 +2113,40 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
/* ts A61224 */
burn_disc_init_write_status(o, disc); /* must be done very early */
/* ts A80412 */
d->do_stream_recording = o->do_stream_recording;
/* ts A80412 , A90227 */
d->do_stream_recording = !!o->do_stream_recording;
if (o->do_stream_recording >= 16)
d->stream_recording_start = o->do_stream_recording;
else
d->stream_recording_start = 0;
d->buffer = calloc(sizeof(struct buffer), 1);
if (d->buffer == NULL)
goto fail_wo_sync;
/* >>> ts A90321
d->buffer = &buf;
memset(d->buffer, 0, sizeof(struct buffer));
fprintf(stderr, "libburn_DEBUG: d->buffer = %lX , size = %d\n",
(unsigned long) d->buffer, (int) sizeof(struct buffer));
calloc() seems not to have the desired effect. valgrind warns:
==18251== Syscall param write(buf) points to uninitialised byte(s)
==18251== at 0x5071DEB: (within /lib64/libpthread-2.5.so)
==18251== by 0x4723FA: burn_stdio_write (write.c:1850)
==18251== by 0x4725DC: burn_stdio_mmc_write (write.c:1894)
==18251== by 0x483B7A: get_sector (sector.c:229)
==18251== by 0x484F11: sector_data (sector.c:639)
==18251== by 0x4729FE: burn_stdio_write_track (write.c:2012)
==18251== by 0x472CF4: burn_stdio_write_sync (write.c:2072)
==18251== by 0x472E8D: burn_disc_write_sync (write.c:2125) <<< we are here
==18251== by 0x460254: write_disc_worker_func (async.c:514)
==18251== by 0x506B09D: start_thread (in /lib64/libpthread-2.5.so)
==18251== by 0x55484CC: clone (in /lib64/libc-2.5.so)
*/
d->rlba = -150;
d->toc_temp = 9;
@ -2171,7 +2281,12 @@ return crap. so we send the command, then ignore the result.
d->alba += 4500;
}
}
if (!burn_write_session(o, disc->session[i]))
multi_mem = o->multi;
if(i < disc->sessions - 1)
o->multi = 1;
ret = burn_write_session(o, disc->session[i]);
o->multi = multi_mem;
if (!ret)
goto fail;
lt = disc->session[i]->track[disc->session[i]->tracks - 1];
@ -2229,6 +2344,8 @@ fail_wo_sync:;
d->busy = BURN_DRIVE_IDLE;
ex:;
d->do_stream_recording = 0;
if (d->buffer != NULL)
free((char *) d->buffer);
d->buffer = buffer_mem;
return;
}

View File

@ -1,6 +1,6 @@
/* test/libburner.c , API illustration of burning data or audio tracks to CD */
/* Copyright (C) 2005 - 2008 Thomas Schmitt <scdbackup@gmx.net> */
/* Copyright (C) 2005 - 2009 Thomas Schmitt <scdbackup@gmx.net> */
/* Provided under GPLv2,see also "License and copyright aspects" at file end */
@ -106,7 +106,7 @@ int libburner_aquire_drive(char *drive_adr, int *driveno)
ret = libburner_aquire_by_adr(drive_adr);
else
ret = libburner_aquire_by_driveno(driveno);
if (ret <= 0)
if (ret <= 0 || *driveno <= 0)
return ret;
burn_disc_get_profile(drive_list[0].drive, &current_profile,
current_profile_name);