Compare commits

..

4 Commits

56 changed files with 928 additions and 3226 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-2011 Mario Danic, Thomas Schmitt
Copyright (C) 2006-2010 Mario Danic, Thomas Schmitt
This program is free software; you can redistribute it and/or modify

291
ChangeLog
View File

@ -1,290 +1 @@
libburn-1.0.6.pl00.tar.gz Sat Apr 9 2011
===============================================================================
* Burning DVD-R DAO with 2 kB size granularity rather than 32 kB
* New API call burn_allow_drive_role_4()
libburn-1.0.4.pl00.tar.gz Thu Mar 3 2011
===============================================================================
* Bug fix: Read-only file descriptors were classified as write-only pseudo
drives
libburn-1.0.2.pl00.tar.gz Wed Feb 23 2011
===============================================================================
* Removed compilation obstacles on Solaris 9.
* Improved recognition of non-seekable stdio pseudo-drives.
libburn-1.0.0.pl00.tar.gz Sun Jan 16 2011
===============================================================================
* Allowed umask to create stdio-drive files with rw-permissions for all
* cdrskin now refuses to burn if the foreseeable size exceeds media capacity
libburn-0.9.0.pl00.tar.gz Wed Dec 08 2010
===============================================================================
* Regression fix: SCSI reply data logging was disabled in release 0.8.6
libburn-0.8.8.pl00.tar.gz Wed Oct 20 2010
===============================================================================
* New API call burn_offst_source_new()
* New API call burn_disc_get_bd_spare_info()
libburn-0.8.6.pl00.tar.gz Fri Sep 17 2010
===============================================================================
* Lifted test reservation on DVD-R DL media.
* Hiding all non-API symbols from the linker by use of --version-script
* Now with history of release notes in ./ChangeLog file.
libburn-0.8.4.pl00.tar.gz Wed Jun 30 2010
===============================================================================
* General POSIX system adapters ignore SIGWINCH and SIGURG if defined
* Allowed 64 kB max output buffer size on all OSes
libburn-0.8.2.pl00.tar.gz Fri Jun 11 2010
===============================================================================
* New system adapter for Solaris uscsi (tested on snv134, kernel 5.11)
* Bug fix: CD TOC was not read if the first track did not start at LBA 0
* Bug fix: CD-ROM media got attributed random lead-in and lead-out adresses
* Bug fix: SIGSEGV of experimental libcdio system adapter if drive list is
empty
libburn-0.8.0.pl00.tar.gz Fri Apr 09 2010
===============================================================================
* libburn now works with ahci driver on FreeBSD 8-STABLE.
libburn-0.7.8.pl00.tar.gz Wed Mar 10 2010
===============================================================================
* Bug fix: On FreeBSD, piped input was falsely attributed a small fixed size.
* Built-in abort handling is more suitable for FreeBSD now.
cdrskin novelties:
* Bug fix: Option fs=0 led to SIGSEGV. Regression introduced by version 0.7.4
in december 2009.
* Abort handling is more suitable for FreeBSD now.
libburn-0.7.6.pl00.tar.gz Sat Jan 23 2010
===============================================================================
* Bug fix: System adapter for generic X/Open was missing in libburn release
tarball
* Bug fix: with non-Linux adapters there were 0 readable bytes on block devices
* Made FreeBSD system adapter safe from mutal burn spoiling and drive deadlock
* Enabled FreeBSD system adapter for Debian kfreebsd
* Experimental SCSI transport adapter via GNU libcdio 0.83git
cdrskin novelties:
* none
libburn-0.7.4.pl01.tar.gz Sat Dec 26 2009
===============================================================================
* Bug fix: Added missing system adapter for generic X/Open to libburn release
tarball
Libburn 0.7.4.pl00 Mon Dec 07 2009
===============================================================================
* Bug fix: SIGSEGV from NULL pointer with media product id inquiry on LG
GH22LS30
* Bug fix: DVD DAO track size was rounded up much too generously
* Workaround for Pioneer DVR-216D which got stuck on DVD-R burns.
(already fixed in 0.7.2.pl01)
* Workaround for Pioneer DVR-216D refusal to eject.
(already fixed in 0.7.2.pl01)
* Configure options --enable-dvd-obs-64k, --enable-track-src-odirect
* New API calls burn_write_opts_set_dvd_obs(),
burn_write_opts_set_stdio_fsync()
* New API call burn_set_scsi_logging()
* New API calls burn_fifo_get_statistics(), burn_fifo_next_interval(),
burn_fifo_fill()
* Re-implemented ECMA-130 P-parity, Q-parity and scrambling for BURN_WRITE_RAW
cdrskin novelties:
* cdrskin option -V for logging of SCSI commands
* New cdrskin options dvd_obs= and stdio_fsync=
* New compile_cdrskin.sh option -dvd_obs_64k
libburn-0.7.2.pl01.tar.gz Fri Nov 13 2009
===============================================================================
* Workaround for Pioneer DVR-216D which got stuck on DVD-R burns.
* Workaround for Pioneer DVR-216D refusal to eject.
Libburn 0.7.2.pl00 Mon Oct 12 2009
===============================================================================
* Bug fix: CD TAO sessions with multiple tracks did not work in -dummy mode
* New API calls burn_get_media_product_id() , burn_guess_manufacturer() ,
burn_guess_cd_manufacturer()
* New API call burn_disc_get_cd_info()
* New API call burn_track_set_cdxa_conv()
cdrskin novelties:
* Better interpretation of options -mode2, -xa, -xa1, -xa2
* New option --xa1-ignore
* New -atip report lines "Product Id:" and "Producer:"
libburn-0.7.0.pl00.tar.gz Thu Aug 27 2009
===============================================================================
* New API calls burn_drive_get_all_profiles(), burn_obtain_profile_name() allow
to inquire and process the list of supported media types. cdrskin lists all
supported profiles with option -atip -v
* New API call burn_drive_snooze() allows to calm down a drive when no i/o is
expected for a while.
* Bug fix: Some SCSI commands stalled on U3 memory sticks which appear as a hub
with a memory stick and a CD-ROM drive containing a small CD. These commands
make not much sense with a CD-ROM and are now avoided for this media
situation.
libburn-0.6.8.pl00.tar.gz Tue Jul 14 2009
===============================================================================
* Bug fix: Old MMC-1 drives were rejected because of mode page 2Ah length.
* cdrskin -scanbus now works with high SCSI bus numbers.
libburn-0.6.6.pl00.tar.gz Fri May 8 2009
===============================================================================
* Bug fix: Improper abort handling with broken pipe during outputto a stdio:
pseudo-drive.
* Bug fix: Device scan stalled on FreeBSD with non-burner USB device
libburn-0.6.4.pl00.tar.gz Fri Mar 13 2009
===============================================================================
* New operating system adapter "dummy" for stdio on general X/Open systems
* New API function burn_drive_set_stream_recording() allows to write the
crucial start blocks of a filesystem with slow BD-RE Defect Management and to
write the bulk of data with full nominal speed.
libburn-0.6.2.pl00.tar.gz Fri Feb 20 2009
===============================================================================
* Improvements with build system for FreeBSD
libburn-0.6.0.pl01.tar.gz Wed Jan 07 2009
===============================================================================
* Bug fix: BD-R were not correctly finalized
libburn-0.6.0.pl00.tar.gz Sun Jan 04 2009
===============================================================================
* Formatting and writing of BD-R media
* New API function burn_get_read_capacity()
libburn-0.5.8.pl00.tar.gz Mon Dec 08 2008
===============================================================================
* Bug fix: A session without leadout entry on CD caused a SIGSEGV by NULL
* Improvements about BD-RE formatting
libburn-0.5.6.pl00.tar.gz Wed Nov 12 2008
===============================================================================
* Bug fix: libburn fifo thread was not aborted when burn run was aborted which
could lead to use of freed memory.
libburn-0.5.4.pl00.tar.gz Mon Oct 6 2008
===============================================================================
* Bug fix: On Linux 2.4 /dev/sr0 was accepted as enumerable address but then
failed to work.
libburn-0.5.2.pl00.tar.gz Wed Aug 20 2008
===============================================================================
* Larger set of possibly acceptable drive device file names
libburn-0.5.0.pl00.tar.gz Thu Jul 17 2008
===============================================================================
* Bug fix: cdrskin option drive_scsi_dev_family=scd lead to buffer overflow
* Ability to use /dev/scd as fallback if /dev/sr does not exist
* New API call burn_fifo_peek_data()
libburn-0.4.8.pl00.tar.gz Sat May 17 2008
===============================================================================
* Bug fix: Random access addressing for DVD-RAM and BD-RE did not work.
* cdrskin: Affected were options write_start_address= and
-- grow_overwriteable_iso on DVD-RAM or BD-RE.
* xorriso: Affected were sessions on DVD-RAM or BD-RE after the first one.
libburn-0.4.6.pl00.tar.gz Sun May 11 2008
===============================================================================
* Support for BD-RE media is now official
* New burn_write_opts_set_stream_recording() can speed up DVD-RAM and BD-RE
* New cdrskin option --list_formats
* New cdrskin blank types for expert formatting of DVD-RAM and BD-RE
* New cdrskin blank type blank=as_needed for automatic handling of media
libburn-0.4.4.tar.gz Thu April 10 2008
===============================================================================
* Support for DVD+R/DL media is now official
libburn-0.4.2.tar.gz Sun Feb 3 2008
===============================================================================
* Long term commitment to ABI libburn.so.4.
* ABI compatibility is guaranteed for any older feature set released since
libburn-0.3.2 about one year ago.
* libburn provides means for compile time and runtime checking of its version.
* Compile time check in cdrskin for proper version of libburn include file.
Required is at least 0.4.2.
* Runtime check in cdrskin prevents dynamic linking with outdated version of
libburn.so.4. Required is at least the version seen in the include file at
compile time.
libburn-0.4.0.tar.gz Mon Oct 29 2007
===============================================================================
* New option direct_write_amount=
* New option --grow_overwriteable_iso
* New option --allow_emulated_drives dev=stdio:<path>
* More cdrecord options supported: -format, -inq, -load, -lock, -immed, -waiti
* New option fallback_program=
* A lot of libburn API additions.
libburn-0.3.8.tar.gz Tue Jul 31 2007
===============================================================================
* Now able to cope with the peculiarities of Linux 2.4 USB
* Refusal to perform -dummy runs on media which cannot simulate burning
* New option modesty_on_drive= may help with hda -> hdb burns
* New option minbuf= , cdrecord compatible frontend of modesty_on_drive=
* New option --adjust_speed_to_drive
* Precautions against using the burner drive as track source
* Note: ABI has not been broken.
libburn-0.3.6.tar.gz Thu Apr 26 2007
===============================================================================
* On Linux kernel 2.6, /dev/sr* gets used rather than /dev/sg*.
* DVD+R now get finalized (if not -multi is given)
libburn-0.3.4.tar.gz Mon Mar 12 2007
===============================================================================
* Multi-session recording on DVD+R, including -toc, -msinfo
* Options --tell_media_space , assert_write_lba=
* Bug fix of rare multi track fifo stall
libburn-0.3.2.tar.gz Feb 11 2007
===============================================================================
* Burnfree enabled by default
* Multi-session recording on sequential DVD-R[W], including -toc, -msinfo
* DVD-R[W] Disk-at-once recording
libburn-0.3.0.1.tar.gz Tue Jan 30 2007
===============================================================================
* Improved recognition of unsuitable media types
* Replaced ban of chmod u+s by loud warning
* detailed man page for cdrskin
* Burning of DVD+RW and DVD-RAM media as single-track TAO-like initial session
* Formatting and then burning to DVD-RW like to DVD+RW
* New option -msifile=path from cdrkit/wodim
* 0.3.0.1 release notes *
* Bug fix enabling tracks >= 1.3 GB from disk file
libburn-0.2.6.3.tar.gz Fri Dec 29 2006
===============================================================================
* 0.2.6 release notes (Wed Nov 22 2006)
* After a lot of time with dedication to this project, we proudly present you
libburn 0.2.6. It is the first version of cdrskin and libburn after they have
been split from genisofs and libisofs. Main new features are write mode TAO
and support for multi session.
* 0.2.6.1 release notes (Fri Nov 24 2006)
* Point release to fix misleading version numbers in messages and documentation
* 0.2.6.2 release notes (Sat Dec 16 2006)
* cdrskin man page backported from development version 0.2.7.
* 0.2.6.3 release notes (Fri Dec 29 2006)
* Point release to fix build system problems people have experienced with the
past release.
libburn-0.2.3.snapshot02.tar.gz Thu Nov 02 2006
===============================================================================
* Stabilized snapshot including release 0.2.4.pl01 of cdrskin
* cdrskin 0.2.4 release notes
* Compatibility with cdrecord has been improved in respect to drive addresses,
audio extraction from .wav, -scanbus, -toc, drive buffer fill indicator.
* Note: The previous snapshot01 with the same source base is handicapped by a
broken ./configure setup. It works well on Intel compatible CPUs but is
supposed to be unusable on big-endian architectures.
libburn-0.2.2.tar.gz Wed Sep 20 2006
===============================================================================
Initial release of libburnia's libburn combined with cdrskin.
nothing here now

View File

@ -75,15 +75,11 @@ libburn_libburn_la_SOURCES = \
libinclude_HEADERS = \
libburn/libburn.h
install-exec-hook:
$(LIBBURNIA_LDCONFIG_CMD) "$(DESTDIR)$(libdir)" || echo 'NOTE: Explicite dynamic library configuration failed. If needed, configure manually for:' "$(DESTDIR)$(libdir)"
## ========================================================================= ##
## Build test applications
noinst_PROGRAMS = \
test/libburner \
test/offst_source \
test/telltoc \
test/dewav \
test/fake_au \
@ -98,9 +94,6 @@ LIBBURN_EXTRALIBS = $(LIBBURN_ARCH_LIBS) $(THREAD_LIBS)
test_libburner_CPPFLAGS = -Ilibburn
test_libburner_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
test_libburner_SOURCES = test/libburner.c
test_offst_source_CPPFLAGS = -Ilibburn
test_offst_source_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
test_offst_source_SOURCES = test/offst_source.c
test_telltoc_CPPFLAGS = -Ilibburn
test_telltoc_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
test_telltoc_SOURCES = test/telltoc.c
@ -117,9 +110,9 @@ test_structest_CPPFLAGS = -Ilibburn
test_structest_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
test_structest_SOURCES = test/structest.c
## cdrskin construction site - ts A60816 - B10409
## cdrskin construction site - ts A60816 - B00611
cdrskin_cdrskin_CPPFLAGS = -Ilibburn
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_1_0_6
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_8_2
# cdrskin_cdrskin_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
# ts A80123, change proposed by Simon Huggins to cause dynamic libburn linking
@ -150,10 +143,7 @@ doc/html: doc/doxygen.conf
doc-upload: doc/html
scp -r $</* $(webhost):$(webpath)
## ts B00729
## Not by default any more.
## It is unclear who is supposed to create file ./doc/doc.lock
# all: doc
all: doc
install-data-local:
if [ -f ./doc/doc.lock ]; then \
@ -209,7 +199,6 @@ EXTRA_DIST = \
cdrskin/wiki_plain.txt \
cdrskin/cleanup.h \
cdrskin/cleanup.c \
libburn/libburn.ver \
libburn/os-dummy.h \
libburn/os-freebsd.h \
libburn/os-linux.h \

102
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-2011 Mario Danic, Thomas Schmitt
Copyright (C) 2006-2010 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-1.0.6.pl00.tar.gz
http://files.libburnia-project.org/releases/libburn-0.8.2.pl00.tar.gz
------------------------------------------------------------------------------
@ -19,10 +19,10 @@ Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
From tarball
Obtain libburn-1.0.6.pl00.tar.gz, take it to a directory of your choice and do:
Obtain libburn-0.8.2.pl00.tar.gz, take it to a directory of your choice and do:
tar xzf libburn-1.0.6.pl00.tar.gz
cd libburn-1.0.6
tar xzf libburn-0.8.2.pl00.tar.gz
cd libburn-0.8.2
./configure --prefix=/usr
make
@ -60,11 +60,6 @@ Warning: The trunk might contain experimental features which might not
Special ./configure options
make install on GNU/Linux will try to run program ldconfig with the library
installation directory as only argument. Failure to do so will not abort
installation. One may disable ldconfig by ./configure option:
--disable-ldconfig-at-install
In some situations Linux may deliver a better write performance to drives if
the track input is read with O_DIRECT (see man 2 open). The API call
burn_os_open_track_src() and the input readers of cdrskin and libburn fifo
@ -81,12 +76,6 @@ Alternatively the transport of SCSI commands can be done via libcdio-0.83.
You may install it and re-run libburn's ./configure with option
--enable-libcdio
By use of a version script, the libburn.so library exposes no other function
names but those of the API definition in libburn/libburn.h.
If -Wl,--version-script=... makes problems with the local compiler, then
disable this encapsulation feature by
--disable-versioned-libs
Make sure to re-compile all source files after running ./configure
make clean ; make
make install
@ -150,8 +139,7 @@ The project components (list subject to growth, hopefully):
- libisofs is the library to pack up hard disk files and directories into a
ISO 9660 disk image. This may then be brought to CD via libburn.
An own ISO 9660 extension stores ACLs, xattr, and MD5 of file
content.
libisofs is to be the foundation of our upcoming mkisofs emulation.
- libisoburn is an add-on to libburn and libisofs which coordinates both and
also allows to grow ISO-9660 filesystem images on multi-session
@ -176,8 +164,8 @@ The project components (list subject to growth, hopefully):
Rock Ridge extensions. Manipulation is not only adding or
overwriting of files but also deleting, renaming, attribute
changing, incremental backups, activating boot images, and
extracting of files from ISO images to disk. There is also a
sparse emulation of cdrecord and a more laborate one of mkisofs.
extracting of files from ISO images to disk. An own ISO 9660
extension stores ACLs, xattr, and MD5 of file content.
All features of xorriso are also available via a C language API
of libisoburn.
See xorriso/README for more.
@ -539,80 +527,6 @@ Project history as far as known to me:
- 11 Jun 2010 libburn-0.8.2 now works on Solaris.
- 14 Jun 2010 By release 0.5.8.pl00 of libisoburn, xorriso becomes a public C
language API of libisoburn. The emulations of mkisofs and cdrecord have
been enhanced.
- Tue Jun 29 2010 Version 0.6.34 of libisofs provides new features about
hiding file names from directory trees.
- Wed Jun 30 2010 libburn-0.8.4 removes some restrictions on operating
systems other than Linux and FreeBSD.
- Fri Jul 02 2010 Release 0.6.0.pl00 of libisoburn adds more options to the
mkisofs emulation of xorriso. It also fixes minor bugs and shortcommings.
- Wed Sep 15 2010 Version 0.6.36 of libisofs can produce ISO images which
bear a partiton 1 with non-zero start address. They can be mounted from
USB stick via the main device file (e.g. /dev/sdb) as well as via the
partition device file (e.g. /dev/sdb1).
- Fri Sep 17 2010 libburn-0.8.6 lifts the test reservation on DVD-R DL media.
- Sat Sep 18 2010 Release 0.6.2.pl00 of libisoburn introduces a partition
with non-zero offset for ISO 9660 images on USB sticks, improves mkisofs
emulation, and fixes a regression which existed since version 0.4.2.
- Wed Oct 20 2010 libburn-0.8.8 can report the used amount of BD spare blocks.
- Sat Oct 23 2010 Version 0.6.38 of libisofs can use libjte to produce jigdo
files along with the ISO image. Further filesystem images may be appended
as MBR partitions 1 to 4. The capability was added to produce boot blocks
for computers with MIPS CPU.
- Tue Oct 26 2010 Release 0.6.4.pl00 of libisoburn and xorriso makes use of
the new libisofs capabilities.
- Wed Dec 08 2010 libburn-0.9.0 fixes a regression with SCSI command logging.
- Fri Dec 10 2010 Version 0.6.40 of libisofs makes the prediction of the
emerging image size less expensive and is able to make images bootable
for SUN SPARC systems.
- Sun Dec 12 2010 Release 0.6.6.pl00 of libisoburn and xorriso can read ISO
images which were copied to a different start address than they were prepared
for.
- Mon Jan 17 2011 we go for release 1.0.0. This does not indicate a
technological overhaul but shall emphasize the maturity of the software.
libisofs-1.0.0 fixes a bug about the length of ECMA-119 directory names and
is ready to allow untranslated ECMA-119 names (violating the specs).
libburn-1.0.0.pl00 allows umask to create stdio-drive files with
rw-permissions for all. cdrskin now refuses to burn if the foreseeable size
exceeds media capacity
libisoburn-1.0.0.pl00 allows to create an ISO 9660:1999 directory tree,
improved the emulation fidelity of command -as mkisofs, lowered the default
abort threshold for xorriso batch mode, and increased that threshold for
xorriso dialog mode.
- Wed Feb 23 2011 release 1.0.2:
libisofs fixes several bugs and introduces the capability to copy files
inside the ISO filesystem.
libburn removed a compilation obstacle on Solaris 9 and improved recognition
of stdio pseudo-drives.
libisoburn and xorriso fix bugs and make use of the new libisofs capability.
xorriso improves its mkisofs emulation.
- Thu Mar 10 2011 release 1.0.4:
Several bugs were fixed in the libraries and in the mkisofs emulation of
xorriso. This emulation xorrisofs has now an own man page and info document.
- Sat Apr 09 2011 release 1.0.6:
libburn refined its representation of emulated drives. The size alignment
of DVD DAO is now 2 kB rather than 32 kB. Libisofs produces Joliet names of
up to 103 characters. xorriso fixes two bugs and makes use of the library
improvements.
------------------------------------------------------------------------------

View File

@ -16,13 +16,11 @@ AC_DEFUN([TARGET_SHIZZLE],
AC_MSG_CHECKING([target operating system])
LIBBURNIA_LDCONFIG_CMD="echo 'No ldconfig run performed. If needed, configure manually for:'"
case $target_os in
linux*)
ARCH=linux
LIBBURN_ARCH_LIBS=
LIBBURNIA_LDCONFIG_CMD=ldconfig
;;
freebsd*)
ARCH=freebsd
@ -44,21 +42,6 @@ AC_DEFUN([TARGET_SHIZZLE],
])
dnl LIBBURN_ASSERT_VERS_LIBS is by Thomas Schmitt, libburnia project
dnl It tests whether -Wl,--version-script=... works with the compiler
AC_DEFUN([LIBBURN_ASSERT_VERS_LIBS],
[
libburnia_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--version-script=libburn/libburn.ver"
AC_TRY_LINK([#include <stdio.h>], [printf("Hello\n");],
[vers_libs_test="yes"], [vers_libs_test="no"])
if test x$vers_libs_test = xno
then
LDFLAGS="$libburnia_save_LDFLAGS"
fi
])
dnl LIBBURNIA_SET_PKGCONFIG determines the install directory for the *.pc file.
dnl Important: Must be performed _after_ TARGET_SHIZZLE
dnl

View File

@ -4,9 +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-1.0.6.pl00.tar.gz
http://scdbackup.sourceforge.net/cdrskin-0.8.2.pl00.tar.gz
Copyright (C) 2006-2011 Thomas Schmitt, provided under GPL version 2 or later.
Copyright (C) 2006-2010 Thomas Schmitt, provided under GPL version 2 or later.
------------------------------------------------------------------------------
@ -26,10 +26,10 @@ By using this software you agree to the disclaimer at the end of this text
Compilation, First Glimpse, Installation
Obtain cdrskin-1.0.6.pl00.tar.gz, take it to a directory of your choice and do:
Obtain cdrskin-0.8.2.pl00.tar.gz, take it to a directory of your choice and do:
tar xzf cdrskin-1.0.6.pl00.tar.gz
cd cdrskin-1.0.6
tar xzf cdrskin-0.8.2.pl00.tar.gz
cd cdrskin-0.8.2
Within that directory execute:
@ -310,11 +310,10 @@ Add-on session (equivalent to growisofs -M):
cdrskin dev=/dev/sr0 --grow_overwriteable_iso ... -
DVD-RW , DVD-R , DVD-R DL
DVD-RW and DVD-R
DVD-RW are usable if formatted to state "Restricted Overwrite" or if in state
"Sequential Recording". DVD-R are always in sequential state. DVD-R DL are
always sequential and incapable of multi-session.
"Sequential Recording". DVD-R are always in sequential state.
"Sequential" is the state of unused media and of media previously blanked
or written by cdrecord. dvd+rw-format -blank can also achieve this state.

View File

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

View File

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

View File

@ -34,7 +34,7 @@
/* Macro for creation of arrays of objects (or single objects) */
#define TSOB_FELD(typ,anz) (typ *) calloc(anz, sizeof(typ));
#define TSOB_FELD(typ,anz) (typ *) malloc((anz)*sizeof(typ));
#define Cdrfifo_buffer_chunK 2048

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 "Jan 09, 2011"
.TH CDRSKIN 1 "Jun 10, 2010"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -47,7 +47,7 @@ Multi session on CD (follow-up sessions in TAO only)
.br
or on DVD-R[W] (in Incremental mode) or DVD+R[/DL] or BD-R.
.br
Single session Disk-at-once on DVD-RW, DVD-R, DVD-R DL.
Single session on DVD-RW or DVD-R (Disk-at-once).
.br
Single session or emulated ISO-9660 multi-session
.br
@ -166,7 +166,7 @@ needed.
.SS
.B Sequentially Recordable DVD or BD Media:
.br
Currently DVD-RW, DVD-R[DL], DVD+R[DL], and BD-R can be used for the Sequential
Currently DVD-RW, DVD-R , DVD+R[/DL], and BD-R can be used for the Sequential
recording model. It resembles the model of CD media. Only DVD-RW can be
blanked and re-used from scratch.
.br
@ -186,8 +186,8 @@ of recognizable size or the size has to be announced explicitly by options
or
.B tao_to_sao_tsize= .
.br
DAO is the only mode for DVD-R media which do not offer feature 21h Incremental
Streaming (e.g. DVD-R DL). DAO may also be selected explicitly by option
DAO is the only mode for media which do not offer feature 21h Incremental
Streaming. DAO may also be selected explicitly by option
.B -sao .
Program growisofs uses DAO on sequential DVD-R[W] media for maximum
DVD-ROM/-Video compatibility.
@ -198,7 +198,7 @@ Incremental Streaming may be selected explicitly by option
.B -tao
as it resembles much CD TAO by allowing track sources of
unpredicted length and to keep media appendable by option
.B -multi . It does not work with DVD-R DL and minimally blanked DVD-RW.
.B -multi .
The only restriction towards CD-R[W] is the lack of support for -audio tracks.
Multiple tracks per session are permissible.
.br
@ -554,9 +554,6 @@ which appear to be in the desired blank or format state already.
This option enables a burn run with option -dummy even if libburn believes
that drive and media will not simulate the write mode but will write for real.
.br
It enables a burn run where cdrskin expects to exceed the available media
capacity.
.br
.B Caution:
Use this only when in urgent need.
.TP
@ -662,8 +659,7 @@ 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
The following sessions can only be written in -tao mode. -multi is prohibited
with DVD-R[W] DAO write mode and on DVD-R DL media.
Option --prodvd_cli_compatible eventually makes
with DVD-R[W] DAO write mode. Option --prodvd_cli_compatible eventually makes
-multi tolerable but cannot make it work.
.br
In order to have all filesystem content accessible, the eventual ISO-9660
@ -757,8 +753,6 @@ Mode -tao can be used with track sources of unpredictable size, like standard
input or named pipes. It is also the only mode that can be used for writing
to appendable media which already hold data. With unformatted DVD-R[W] it is
the only mode which allows -multi.
.br
Mode -tao is not usable for minimally blanked DVD-RW and for DVD-R DL.
.TP
.BI \-toc
Print the table of content (TOC) which describes the tracks recorded on disc.
@ -1096,11 +1090,12 @@ This option is only needed for revoking eventual --ignore_signals or
.TP
.BI \--allow_untested_media
Enable the use of media profiles which have been implemented but not yet
tested. Currently this option is without effect because no media types are
under test reservation.
tested. Currently this applies to :
.br
(If you really test experimental media, then please report the outcome on
libburn-hackers@pykix.org)
Profile 0015h , DVD-R/DL Sequential (will not allow -multi).
.br
If you really test such media, then please report the outcome on
libburn-hackers@pykix.org
.TP
.BI dev_translation= <sep><from><sep><to>
Set drive address alias. This was necessary before cdrskin-0.2.4 to manually
@ -1270,7 +1265,7 @@ cdrskin -v dev=/dev/hdc speed=12 fs=8m \\
.br
blank=as_needed -eject padsize=300k my_image.iso
.SS
.B Write compressed afio archive on-the-fly (not possible with minimally blanked DVD-RW or DVD-R DL):
.B Write compressed afio archive on-the-fly (not possible with minimally blanked DVD-RW):
.br
find . | afio -oZ - | \\
.br

View File

@ -1,6 +1,6 @@
/*
cdrskin.c , Copyright 2006-2011 Thomas Schmitt <scdbackup@gmx.net>
cdrskin.c , Copyright 2006-2010 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
A cdrecord compatible command line interface for libburn.
@ -88,20 +88,20 @@ or
/** The official program version */
#ifndef Cdrskin_prog_versioN
#define Cdrskin_prog_versioN "1.0.6"
#define Cdrskin_prog_versioN "0.8.2"
#endif
/** The official libburn interface revision to use.
(May get changed further below)
*/
#ifndef Cdrskin_libburn_majoR
#define Cdrskin_libburn_majoR 1
#define Cdrskin_libburn_majoR 0
#endif
#ifndef Cdrskin_libburn_minoR
#define Cdrskin_libburn_minoR 0
#define Cdrskin_libburn_minoR 8
#endif
#ifndef Cdrskin_libburn_micrO
#define Cdrskin_libburn_micrO 6
#define Cdrskin_libburn_micrO 2
#endif
@ -135,43 +135,47 @@ or
#endif /* Cdrskin_libburn_cvs_A60220_tS */
#ifdef Cdrskin_libburn_1_0_6
#define Cdrskin_libburn_versioN "1.0.6"
#ifdef Cdrskin_libburn_0_8_2
#define Cdrskin_libburn_versioN "0.8.2"
#define Cdrskin_libburn_from_pykix_svN 1
#endif /* Cdrskin_libburn_1_0_6 */
#endif /* Cdrskin_libburn_0_8_2 */
#ifdef Cdrskin_libburn_1_0_7
#define Cdrskin_libburn_versioN "1.0.7"
#ifdef Cdrskin_libburn_0_8_3
#define Cdrskin_libburn_versioN "0.8.3"
#define Cdrskin_libburn_from_pykix_svN 1
/* Place novelty switch macros here.
Move them down to Cdrskin_libburn_from_pykix_svN on version leap
*/
/* Do not stay in signal handler but only cancel and set Cdrskin_abort_leveL.
Make use of burn_is_aborting() to detect pending libburn aborts.
*/
#endif /* Cdrskin_libburn_1_0_7 */
#endif /* Cdrskin_libburn_0_8_3 */
#ifndef Cdrskin_libburn_versioN
#define Cdrskin_libburn_1_0_7
#define Cdrskin_libburn_versioN "1.0.7"
#define Cdrskin_libburn_0_8_2
#define Cdrskin_libburn_versioN "0.8.2"
#define Cdrskin_libburn_from_pykix_svN 1
#endif
#ifdef Cdrskin_libburn_1_0_6
#ifdef Cdrskin_libburn_0_8_2
#undef Cdrskin_libburn_majoR
#undef Cdrskin_libburn_minoR
#undef Cdrskin_libburn_micrO
#define Cdrskin_libburn_majoR 1
#define Cdrskin_libburn_minoR 0
#define Cdrskin_libburn_micrO 6
#define Cdrskin_libburn_majoR 0
#define Cdrskin_libburn_minoR 8
#define Cdrskin_libburn_micrO 2
#endif
#ifdef Cdrskin_libburn_1_0_7
#ifdef Cdrskin_libburn_0_8_3
#undef Cdrskin_libburn_majoR
#undef Cdrskin_libburn_minoR
#undef Cdrskin_libburn_micrO
#define Cdrskin_libburn_majoR 1
#define Cdrskin_libburn_minoR 0
#define Cdrskin_libburn_micrO 7
#define Cdrskin_libburn_majoR 0
#define Cdrskin_libburn_minoR 8
#define Cdrskin_libburn_micrO 3
#endif
@ -359,6 +363,9 @@ or
#include "../libburn/libburn.h"
#ifdef Cdrskin_libburn_has_audioxtR
#include "../libburn/libdax_audioxtr.h"
#endif
#ifdef Cdrskin_libburn_has_cleanup_handleR
#define Cleanup_set_handlers burn_set_signal_handling
@ -416,7 +423,7 @@ static int Cdrskin_abort_leveL= 0;
/* Imported from scdbackup-0.8.5/src/cd_backup_planer.c */
/** Macro for creation of arrays of objects (or single objects) */
#define TSOB_FELD(typ,anz) (typ *) calloc(anz, sizeof(typ));
#define TSOB_FELD(typ,anz) (typ *) malloc((anz)*sizeof(typ));
/** Convert a text so that eventual characters special to the shell are
@ -566,7 +573,7 @@ int Sfile_multi_read_argv(char *progname, char **filenames, int filename_count,
if(pass==0)
maxl= strlen(progname)+1;
else {
(*argv)[0]= (char *) calloc(1, strlen(progname)+1);
(*argv)[0]= (char *) malloc(strlen(progname)+1);
if((*argv)[0]==NULL)
{ret= -1; goto ex;}
strcpy((*argv)[0],progname);
@ -597,7 +604,7 @@ int Sfile_multi_read_argv(char *progname, char **filenames, int filename_count,
} else {
if(argcount >= *argc)
break;
(*argv)[argcount]= (char *) calloc(1, l+1);
(*argv)[argcount]= (char *) malloc(l+1);
if((*argv)[argcount]==NULL)
{ret= -1; goto ex;}
strcpy((*argv)[argcount],buf);
@ -611,9 +618,9 @@ int Sfile_multi_read_argv(char *progname, char **filenames, int filename_count,
if(pass==0){
*argc= argcount;
if(argcount>0) {
*argv= (char **) calloc(argcount, sizeof(char *));
*argidx= (int *) calloc(argcount, sizeof(int));
*arglno= (int *) calloc(argcount, sizeof(int));
*argv= (char **) malloc(argcount*sizeof(char *));
*argidx= (int *) malloc(argcount*sizeof(int));
*arglno= (int *) malloc(argcount*sizeof(int));
if(*argv==NULL || *argidx==NULL || *arglno==NULL)
{ret= -1; goto ex;}
}
@ -813,8 +820,8 @@ int Cdradrtrn_add(struct CdradrtrN *trn, char *from, char *to, int flag)
}
if(strlen(from)>=Cdrskin_adrleN || strlen(to)>=Cdrskin_adrleN)
return(0);
trn->from_address[cnt]= calloc(1, strlen(from_pt)+1);
trn->to_address[cnt]= calloc(1, strlen(to_pt)+1);
trn->from_address[cnt]= malloc(strlen(from_pt)+1);
trn->to_address[cnt]= malloc(strlen(to_pt)+1);
if(trn->from_address[cnt]==NULL ||
trn->to_address[cnt]==NULL)
return(-2);
@ -2217,7 +2224,6 @@ LIBBURN_MISCONFIGURATION_ = 0;
return(-1);
}
Cdrpreskin_set_severities(preskin,NULL,NULL,0);
burn_allow_drive_role_4(1);
return(1);
}
@ -3168,7 +3174,7 @@ set_severities:;
int major, minor, micro;
printf(
"Cdrecord 2.01-Emulation Copyright (C) 2006-2011, see libburnia-project.org\n");
"Cdrecord 2.01-Emulation Copyright (C) 2006-2010, see libburnia-project.org\n");
if(o->fallback_program[0]) {
char *hargv[2];
@ -4738,8 +4744,8 @@ int Cdrskin_scanbus(struct CdrskiN *skin, int flag)
int *drives_busses= NULL;
struct stat stbuf;
drives_shown= calloc(1, skin->n_drives+1);
drives_busses= calloc((skin->n_drives+1), sizeof(int));
drives_shown= malloc(skin->n_drives+1);
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++)
@ -4897,10 +4903,6 @@ int Cdrskin_checkdrive(struct CdrskiN *skin, char *profile_name, int flag)
printf("%s\n","Emulated (stdio-drive, 2k random read-write)");
else if(ret==3)
printf("%s\n","Emulated (stdio-drive, sequential write-only)");
else if(ret==4)
printf("%s\n","Emulated (stdio-drive, 2k random read-only)");
else if(ret == 5)
printf("%s\n","Emulated (stdio-drive, 2k random write-only)");
else if(ret!=1)
printf("%s\n","Emulated (stdio-drive)");
else
@ -5144,7 +5146,7 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag)
#endif
char media_class[80];
int nominal_sessions= 1, ftils= 1, ltils= 1, first_track= 1, read_capacity= 0;
int app_code, cd_info_valid, lra, alloc_blocks, free_blocks;
int app_code, cd_info_valid, lra;
off_t avail, buf_count;
char disc_type[80], bar_code[9], buf[2 * 2048];
unsigned int disc_id;
@ -5240,11 +5242,6 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag)
printf("Disk type: unrecognizable\n");
if(cd_info_valid & 2)
printf("Disk id: 0x%-X\n", disc_id);
ret= burn_disc_get_bd_spare_info(drive, &alloc_blocks, &free_blocks, 0);
if(ret == 1) {
printf("BD Spare Area consumed: %d\n", alloc_blocks - free_blocks);
printf("BD Spare Area available: %d\n", free_blocks);
}
printf("\n");
printf("Track Sess Type Start Addr End Addr Size\n");
@ -5645,7 +5642,7 @@ ex:;
int Cdrskin_list_formats(struct CdrskiN *skin, int flag)
{
struct burn_drive *drive;
int ret, i, status, num_formats, profile_no, type, alloc_blocks, free_blocks;
int ret, i, status, num_formats, profile_no, type;
off_t size;
unsigned dummy;
char status_text[80], profile_name[90];
@ -5692,10 +5689,6 @@ int Cdrskin_list_formats(struct CdrskiN *skin, int flag)
} else
sprintf(status_text, "illegal status according to MMC-5");
printf("Format status: %s\n", status_text);
ret= burn_disc_get_bd_spare_info(drive, &alloc_blocks, &free_blocks, 0);
if(ret == 1)
printf("BD Spare Area: %d blocks consumed, %d blocks available\n",
alloc_blocks - free_blocks, free_blocks);
for (i = 0; i < num_formats; i++) {
ret= burn_disc_get_format_descr(drive, i, &type, &size, &dummy);
@ -6907,7 +6900,7 @@ int Cdrskin_direct_write(struct CdrskiN *skin, int flag)
if(ret<=0)
goto ex;
}
buf= calloc(1, max_chunksize);
buf= malloc(max_chunksize);
if(buf==NULL) {
fprintf(stderr,
"cdrskin: FATAL : Cannot allocate %d bytes of read buffer.\n",
@ -7082,10 +7075,6 @@ int Cdrskin_burn(struct CdrskiN *skin, int flag)
double put_counter, get_counter, empty_counter, full_counter;
int total_min_fill, fifo_percent;
#endif
#ifdef Cdrskin_libburn_has_get_spacE
off_t free_space;
char msg[80];
#endif
if(skin->tell_media_space)
doing= "estimating";
@ -7329,12 +7318,17 @@ burn_failed:;
/* write capacity estimation and return without actual burning */
#ifdef Cdrskin_libburn_has_get_spacE
free_space= burn_disc_available_space(drive,o);
sprintf(msg,"%d\n",(int) (free_space/(off_t) 2048));
if(skin->preskin->result_fd>=0) {
write(skin->preskin->result_fd,msg,strlen(msg));
} else
printf("%s",msg);
{
off_t free_space;
char msg[80];
free_space= burn_disc_available_space(drive,o);
sprintf(msg,"%d\n",(int) (free_space/(off_t) 2048));
if(skin->preskin->result_fd>=0) {
write(skin->preskin->result_fd,msg,strlen(msg));
} else
printf("%s",msg);
}
#endif /* Cdrskin_libburn_has_get_spacE */
if(skin->track_counter>0)
@ -7344,23 +7338,6 @@ burn_failed:;
{ret= 1; goto ex;}
}
#ifdef Cdrskin_libburn_has_get_spacE
if(skin->fixed_size > 0 && !skin->force_is_set) {
free_space= burn_disc_available_space(drive,o);
if(skin->fixed_size > free_space && free_space > 0) {
fprintf(stderr,
"cdrskin: FATAL : predicted session size %lus does not fit on media (%lus)\n",
(unsigned long) ((skin->fixed_size + 2047.0) / 2048.0),
(unsigned long) ((free_space + 2047) / 2048));
ClN(fprintf(stderr,
"cdrskin: HINT : This test may be disabled by option -force\n");)
{ret= 0; goto ex;}
}
}
#endif /* Cdrskin_libburn_has_get_spacE */
Cdrskin_adjust_speed(skin,0);
#ifndef Cdrskin_extra_leaN

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, BD, linux, recording, burning, CD-R, CD-RW, DVD-R, DVD-R DL, DVD-RW, DVD+RW, DVD+R, DVD+R DL, DVD-RAM, BD-RE, BD-R, 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,8 +24,7 @@
<P>
<H2>Purpose:</H2>
Burns preformatted data to CD, DVD, and BD media:<BR>
CD-R, DVD-R, DVD-R DL, DVD+R, DVD+R DL, BD-R, 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>
@ -65,7 +64,7 @@ connected via SCSI, PATA (aka IDE, ATA), USB, or SATA.
GPL software included:<BR>
</H2>
<DL>
<DT>libburn-1.0.6</DT>
<DT>libburn-0.8.2</DT>
<DD>(founded by Derek Foreman and Ben Jansens,
developed and maintained since August 2006 by
Thomas Schmitt from team of libburnia-project.org)
@ -96,11 +95,10 @@ Ports to other usable systems are appreciated. Reports are welcome.
<DL>
<DT>The most common options of cdrecord for data and audio on CD media
are provided in a compatible way.<BR>
On all DVD media, cdrskin is able to perform any recording job
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
BD-R. Write mode -tao works with anything but quickly blanked DVD-RW and
DVD-R DL, which both support no -multi.
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>
@ -133,8 +131,7 @@ On Solaris it is r-permission and privileges "basic,sys_devices".</DT>
<DD>$<KBD>&nbsp;cdrskin -v dev=/dev/hdc speed=12 fs=8m \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;blank=as_needed -eject padsize=300k my_image.iso</KBD></DD>
<DT>Write compressed afio archive on-the-fly
(not DVD-R DL or minimally blanked DVD-RW):</DT>
<DT>Write compressed afio archive on-the-fly:</DT>
<DD>$<KBD>&nbsp;find . | afio -oZ - | \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;cdrskin -v dev=0,1,0 fs=32m speed=8 \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;blank=as_needed padsize=300k -</KBD></DD>
@ -200,8 +197,8 @@ Standalone ISO 9660 multi-session CD/DVD/BD tool
<P>
<DL>
<DT>Download as source code (see README):</DT>
<DD><A HREF="cdrskin-1.0.6.pl00.tar.gz">cdrskin-1.0.6.pl00.tar.gz</A>
(870 KB).
<DD><A HREF="cdrskin-0.8.2.pl00.tar.gz">cdrskin-0.8.2.pl00.tar.gz</A>
(845 KB).
</DD>
<DD>
The cdrskin tarballs are source code identical with libburn releases
@ -250,18 +247,25 @@ cdrskin_0.4.2.pl00-x86-suse9_0-static.tar.gz</A>, (310 KB), -static compiled,
<HR>
<P>
Enhancements towards previous stable version cdrskin-1.0.4.pl00:
Enhancements towards previous stable version cdrskin-0.8.0.pl00:
<UL>
<LI>Burning DVD-R DAO with 2 kB size granularity rather than 32 kB</LI>
</LI>
<LI>A new system adapter allows to burn CD, DVD and BD on OpenSolaris</LI>
<!--
<LI>none</LI>
-->
</UL>
Bug fixes towards cdrskin-1.0.4.pl00:
Bug fixes towards cdrskin-0.8.0.pl00:
<UL>
<LI>none</LI>
<LI>
CD TOC was not read if the first track did not start at LBA 0
</LI>
<LI>
CD-ROM media got attributed random lead-in and lead-out adresses
</LI>
<LI>
SIGSEGV of experimental libcdio system adapter if drive list is empty
</LI>
<!--
<LI>none</LI>
-->
@ -271,8 +275,8 @@ Bug fixes towards cdrskin-1.0.4.pl00:
<P>
<DL>
<DT><H3>Development snapshot, version 1.0.7 :</H3></DT>
<DD>Enhancements towards current stable version 1.0.6.pl00:
<DT><H3>Development snapshot, version 0.8.3 :</H3></DT>
<DD>Enhancements towards current stable version 0.8.2.pl00:
<UL>
<LI>none yet</LI>
<!--
@ -282,7 +286,7 @@ Bug fixes towards cdrskin-1.0.4.pl00:
</UL>
</DD>
<DD>Bug fixes towards cdrskin-1.0.6.pl00:
<DD>Bug fixes towards cdrskin-0.8.2.pl00:
<UL>
<LI>none yet</LI>
<!--
@ -292,10 +296,10 @@ Bug fixes towards cdrskin-1.0.4.pl00:
</DD>
<DD>&nbsp;</DD>
<DD><A HREF="README_cdrskin_devel">README 1.0.7</A>
<DD><A HREF="cdrskin__help_devel">cdrskin-1.0.7 --help</A></DD>
<DD><A HREF="cdrskin_help_devel">cdrskin-1.0.7 -help</A></DD>
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 1.0.7)</A></DD>
<DD><A HREF="README_cdrskin_devel">README 0.8.3</A>
<DD><A HREF="cdrskin__help_devel">cdrskin_0.8.3 --help</A></DD>
<DD><A HREF="cdrskin_help_devel">cdrskin_0.8.3 -help</A></DD>
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 0.8.3)</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>
@ -315,8 +319,8 @@ admins with full system souvereignty.</DT>
<A HREF="README_cdrskin_devel">upcoming README</A> ):
</DD>
<DD>
<A HREF="cdrskin-1.0.7.tar.gz">cdrskin-1.0.7.tar.gz</A>
(870 KB).
<A HREF="cdrskin-0.8.3.tar.gz">cdrskin-0.8.3.tar.gz</A>
(845 KB).
</DD>
<!-- This is not offered any more since spring 2008

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2011.04.08.180001"
#define Cdrskin_timestamP "2010.06.11.080001"

View File

@ -8472,7 +8472,7 @@ Made number transition to 0.8.2
+ cdrskin/add_ts_changes_to_libburn_0_8_3
Updated cdrskin tarball generator
11 Jun 2010 [3253]
[]
cdrskin/changelog.txt
Documented changes and release timestamp
@ -8482,952 +8482,26 @@ Documented changes and release timestamp
* Bug fix: SIGSEGV of experimental libcdio system adapter if drive list is empty
* New system adapter for Solaris uscsi (tested on snv134, kernel 5.11)
------------------------------------ cycle - cdrskin-0.8.3 -
------------------------------------ cycle - cdrskin-0.8.3 -
2010.06.11.104830 [3254]
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.8.3
11 Jun 2010 [3255]
- cdrskin/add_ts_changes_to_libburn_0_8_0
- cdrskin/add_ts_changes_to_libburn_0_8_1
+ cdrskin/add_ts_changes_to_libburn_0_8_2
+ cdrskin/add_ts_changes_to_libburn_0_8_3
Updated cdrskin tarball generator
11 Jun 2010 [3256]
cdrskin/changelog.txt
Documented changes and release timestamp
11 Jun 2010 [3257]
svn move -m libburn release 0.8.2 is ready
http://svn.libburnia-project.org/libburn/branches/ZeroEightTwo
http://svn.libburnia-project.org/libburn/tags/ZeroEightTwo
------------------------------------ cycle - cdrskin-0.8.3 - 2010.06.11.104830
2010.06.13.190707 [3267]
libburn/sg-solaris.c
New less obtrusive implementation of sg_is_enumerable_adr for Solaris
2010.06.15.155423 [3272]
libburn/sg-libcdio.c
Avoided compiler warning about unused variable on non-Solaris systems
2010.06.15.155625 [3273]
libburn/os-dummy.h
libburn/os-libcdio.h
Let general POSIX system adapters ignore SIGWINCH and SIGURG if defined
2010.06.15.155739 [3274]
configure.ac
Incremented LT_CURRENT and LT_AGE of libburn
2010.06.16.082457 [3277]
libburn/os-solaris.h
libburn/os-libcdio.h
libburn/os-freebsd.h
Allowed 64 kB max output buffer size on all OSes
30 Jun 2010 [3307]
svn copy -m "Branching for libburn release 0.8.4" \
http://svn.libburnia-project.org/libburn/trunk \
http://svn.libburnia-project.org/libburn/branches/ZeroEightFour
2010.06.30.100001 [3308]
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.8.4
30 Jun 2010 [3309]
- cdrskin/add_ts_changes_to_libburn_0_8_2
- cdrskin/add_ts_changes_to_libburn_0_8_3
+ cdrskin/add_ts_changes_to_libburn_0_8_4
+ cdrskin/add_ts_changes_to_libburn_0_8_5
Updated cdrskin tarball generator
30 Jun 2010 [3310]
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------ release - cdrskin-0.8.4.pl00 - 2010.06.30.100001
* Let general POSIX system adapters ignore SIGWINCH and SIGURG if defined
* Allowed 64 kB max output buffer size on all OSes
2010.06.30.112709 [3311]
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.8.5
30 Jun 2010 [3312]
- cdrskin/add_ts_changes_to_libburn_0_8_2
- cdrskin/add_ts_changes_to_libburn_0_8_3
+ cdrskin/add_ts_changes_to_libburn_0_8_4
+ cdrskin/add_ts_changes_to_libburn_0_8_5
Updated cdrskin tarball generator
30 Jun 2010 [3313]
cdrskin/changelog.txt
Documented changes and release timestamp
30 Jun 2010 [3314]
svn move -m libburn release 0.8.4 is ready \
http://svn.libburnia-project.org/libburn/branches/ZeroEightFour \
http://svn.libburnia-project.org/libburn/tags/ZeroEightFour
------------------------------------ cycle - cdrskin-0.8.5 - 2010.06.30.112709
2010.07.04.131219 [3323]
libburn/libburn.h
libburn/libdax_audioxtr.h
libburn/libdax_audioxtr.c
cdrskin/cdrskin.c
test/dewav.c
Moved public part of libdax_audioxtr.h to libburn.h
2010.07.04.170035 [3325]
configure.ac
Makefile.am
+ libburn/libburn.ver
Hiding all non-API symbols from the linker by use of --version-script
04 Jul [3326]
README
Mentioned new configure option --disable-versioned-libs
2010.07.06.113304 [3329]
configure.ac
acinclude.m4
Let configure perform linker test with --version-script if enabled
2010.07.06.113356 [3330]
libburn/libburn.h
Mentioned that public API calls must be in libisofs/libisofs.ver
2010.07.12.193201 [3334]
cdrskin/cdrskin.c
cdrskin/cdrfifo.c
Changed all malloc() to calloc()
2010.07.12.193644 [3335]
libburn/async.c
libburn/drive.c
libburn/file.c
libburn/libdax_audioxtr.c
libburn/libdax_msgs.c
libburn/mmc.c
libburn/null.c
libburn/options.c
libburn/read.c
libburn/sg-freebsd.c
libburn/sg-freebsd-port.c
libburn/util.c
libburn/write.c
Changed all malloc() to calloc()
2010.07.29.083453 [3336]
libburn/spc.h
libburn/spc.c
libburn/mmc.c
libburn/sg-freebsd.c
libburn/sg-solaris.c
libburn/sg-libcdio.c
Recognizing sense data format 0x72 if given instead of 0x70
2010.07.29.164100 [3337]
Makefile.am
Detached make target "doc" from target "all".
30 Jul 2010 [3341]
doc/doxygen.conf.in
Removed problematic DETAILS_AT_TOP to silence warning of Debian buildd
2010.08.02.100630 [3345]
libburn/spc.h
libburn/spc.c
libburn/sg-linux.c
libburn/sg-freebsd.c
libburn/sg-libcdio.c
Reporting sense data with burn_set_scsi_logging()
2010.08.02.131946 [3346]
libburn/sg-linux.c
Added error simulation code to Linux system adapter
2010.08.02.141233 [3347]
libburn/sg-solaris.c
Committed Solaris system adapter which was forgotten with rev 3345
------------------------------------ cycle - cdrskin-0.8.5 - 2010.08.02.141233
* Hiding all non-API symbols from the linker by use of --version-script
2010.08.03.191151 [3348]
libburn/sg-linux.c
libburn/sg-freebsd.c
libburn/sg-libcdio.c
libburn/sg-solaris.c
Obeying burn_set_scsi_logging() with errors of class RETRY
2010.08.08.091224 [3349]
libburn/spc.h
libburn/spc.c
libburn/sg-linux.c
libburn/sg-freebsd.c
libburn/sg-libcdio.c
libburn/sg-solaris.c
New SCSI comand response "GO_ON"
2010.08.08.091317 [3350]
libburn/libburn.h
Hopefully silenced a warning of doxygen on Debian buildd
2010.08.13.114139 [3352]
libburn/libdax_msgs.h
libburn/libdax_audioxtr.h
Corrected typo in macro names (which shall never be defined anyway)
2010.08.21.095456 [3356]
libburn/libburn.h
libburn/mmc.c
cdrskin/cdrskin.1
cdrskin/cdrskin_eng.html
Lifted test reservation on DVD-R DL media. Thanks to Kevin Kieffer for testing.
28 Aug 2010 [3358]
test/libburner.c
Clarified the meaning of 0x0 and 0x30 signal handlers
2010.09.14.124934 [3368]
libburn/spc.h
libburn/spc.c
libburn/sg-linux.c
libburn/sg-libcdio.c
libburn/sg-freebsd.c
libburn/sg-solaris.c
Centralized interpretation of SCSI command outcome
------------------------------------ cycle - cdrskin-0.8.5 - 2010.09.14.135405
* Lifted test reservation on DVD-R DL media.
15 Sep 2010 [3369]
ChangeLog
Meaningful change log file derived by George Danchev from web site
16 Sep 2010 [3373]
svn copy -m Branching for libburn release 0.8.6
http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/ZeroEightSix
2010.09.16.113001 [3374]
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.8.6
16 Sep 2010 [3375]
- cdrskin/add_ts_changes_to_libburn_0_8_4
- cdrskin/add_ts_changes_to_libburn_0_8_5
+ cdrskin/add_ts_changes_to_libburn_0_8_6
+ cdrskin/add_ts_changes_to_libburn_0_8_7
Updated cdrskin tarball generator
16 Sep 2010 [3376]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------ release - cdrskin-0.8.6.pl00 - 2010.09.16.113001
* Lifted test reservation on DVD-R DL media.
* Hiding all non-API symbols from the linker by use of --version-script
2010.09.17.073827 [3377]
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.8.7
17 Sep 2010 [3378]
- cdrskin/add_ts_changes_to_libburn_0_8_4
- cdrskin/add_ts_changes_to_libburn_0_8_5
+ cdrskin/add_ts_changes_to_libburn_0_8_6
+ cdrskin/add_ts_changes_to_libburn_0_8_7
Updated cdrskin tarball generator
17 Sep 2010 [3379]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
17 Sep 2010 [3381]
svn move -m libburn release 0.8.6 is ready
http://svn.libburnia-project.org/libburn/branches/ZeroEightSix
http://svn.libburnia-project.org/libburn/tags/ZeroEightSix
------------------------------------ cycle - cdrskin-0.8.7 - 2010.09.17.082926
2010.09.22.105426 [3395]
acinclude.m4
configure.ac
Makefile.am
README
On Linux: Run ldconfig during make install,if not --disable-ldconfig-at-install
2010.09.22.175054 [3397]
libburn/libburn.h
libburn/libburn.ver
libburn/libdax_msgs.h
libburn/file.h
libburn/file.c
libburn/source.h
libburn/source.c
New API call burn_offst_source_new()
2010.09.22.180921 [3398]
Makefile.am
+ test/offst_source.c
Temporarily added test program for burn_offst_source_new()
22 Sep 2010 [3399]
test/offst_source.c
Better default input file for test/offst_source.c
2010.09.24.090631 [3401]
libburn/libburn.h
libburn/drive.c
libburn/mmc.h
libburn/mmc.c
ChangeLog
New API call burn_disc_get_bd_spare_info()
2010.09.24.090731 [3402]
cdrskin/cdrskin.c
Displaying eventual BD spare area information with -minfo
2010.09.24.091902 [3403]
cdrskin/cdrskin.c
Displaying eventual BD spare area information with --list_formats
2010.09.24.092535 [3404]
libburn/libburn.ver
Making new API call available in dynamic library
2010.09.24.100255 [3405]
cdrskin/cdrskin.c
Polished appearance of BD spare info with --list_formats
------------------------------------ cycle - cdrskin-0.8.7 - 2010.09.24.100255
* New API call burn_offst_source_new()
* New API call burn_disc_get_bd_spare_info()
2010.09.28.101043 [3408]
libburn/mmc.c
Avoiding to inquire spare area of unsuitable media
2010.10.15.191717 [3445]
libburn/write.c
libburn/libdax_msgs.h
Issue warning after writing a BD-R with more than 300 sessions
2010.10.19.165908 [3450]
libburn/async.c
libburn/write.c
libburn/libdax_msgs.h
Issueing messages with all cases of burn canceling
20 Oct 2010 [3453]
svn copy -m Branching for libburn release 0.8.8
http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/ZeroEightEight
2010.10.20.120001 [3454]
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.8.8
20 Oct 2010 [3455]
- cdrskin/add_ts_changes_to_libburn_0_8_6
- cdrskin/add_ts_changes_to_libburn_0_8_7
+ cdrskin/add_ts_changes_to_libburn_0_8_8
+ cdrskin/add_ts_changes_to_libburn_0_8_9
Updated cdrskin tarball generator
20 Oct 2010 [3456]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------ release - cdrskin-0.8.8.pl00 - 2010.10.20.120001
* New API call burn_offst_source_new()
* New API call burn_disc_get_bd_spare_info()
2010.10.20.125207 [3457]
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.8.9
20 Oct 2010 [3458]
- cdrskin/add_ts_changes_to_libburn_0_8_6
- cdrskin/add_ts_changes_to_libburn_0_8_7
+ cdrskin/add_ts_changes_to_libburn_0_8_8
+ cdrskin/add_ts_changes_to_libburn_0_8_9
Updated cdrskin tarball generator
20 Oct 2010 [3459]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
20 Oct 2010
svn move -m libburn release 0.8.8 is ready
http://svn.libburnia-project.org/libburn/branches/ZeroEightEight
http://svn.libburnia-project.org/libburn/tags/ZeroEightEight
------------------------------------ cycle - cdrskin-0.8.9 - 2010.10.20.134102
2010.10.29.164059 [3474]
libburn/mmc.c
libburn/libdax_msgs.h
Issueing error messages if cache syncing or closing fails
2010.10.29.174455 [3476]
libburn/spc.c
Regression fix: SCSI reply data logging was disabled in rev 3368, 0.8.6
2010.11.16.131221 [3483]
libburn/sg-linux.c
libburn/sg-freebsd.c
libburn/sg-libcdio.c
libburn/sg-solaris.c
Removed outdated development macros
08 Dec 2010 [3502]
svn copy -m Branching for libburn release 0.9.0
http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/ZeroNineZero
2010.12.08.133001 [3503]
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.9.0
08 Dec 2010 [3504]
- cdrskin/add_ts_changes_to_libburn_0_8_8
- cdrskin/add_ts_changes_to_lisburn_0_8_9
+ cdrskin/add_ts_changes_to_libburn_0_9_0
+ cdrskin/add_ts_changes_to_libburn_0_9_1
Updated cdrskin tarball generator
08 Dec 2010 [3505]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------ release - cdrskin-0.9.0.pl00 - 2010.12.08.133001
Regression fix: SCSI reply data logging was disabled in release 0.8.6
2010.12.08.131934 [3506]
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.9.1
08 Dec 2010 [3507]
- cdrskin/add_ts_changes_to_libburn_0_8_8
- cdrskin/add_ts_changes_to_lisburn_0_8_9
+ cdrskin/add_ts_changes_to_libburn_0_9_0
+ cdrskin/add_ts_changes_to_libburn_0_9_1
Updated cdrskin tarball generator
08 Dec 2010 [3508]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
08 Dec 2010 [3509]
svn move -m libburn release 0.9.0 is ready
http://svn.libburnia-project.org/libburn/branches/ZeroNineZero
http://svn.libburnia-project.org/libburn/tags/ZeroNineZero
------------------------------------ cycle - cdrskin-0.9.1 - 2010.12.08.154833
2010.12.13.075956 [3522]
configure.ac
Prepending ./configure generated options to CFLAGS rather than appending them
23 Dec 2010 [3528]
doc/comments
Updated API introduction
2010.12.28.071904 [3537]
libburn/write.c
Allowed umask to create stdio-drive files with rw-permissions for all
2011.01.03.195125 [3542]
libburn/write.c
libburn/sector.c
libburn/structure.h
libburn/structure.c
Allowed stdio tracks of known size to end in TAO mode on premature EOF
2011.01.09.135915 [3546]
cdrskin/cdrskin.c
cdrskin/cdrskin.1
Refusing to burn if foreseeable size exceeds media capacity
------------------------------------ cycle - cdrskin-0.9.1 - 2011.01.09.140240
* Allowed umask to create stdio-drive files with rw-permissions for all
* cdrskin now refuses to burn if the foreseeable size exceeds media capacity
09 Jan 2011 [3547]
cdrskin/cdrskin_eng.html
ChangeLog
Updated change log and web page
16 Jan 2011 [3548]
svn copy -m "Branching for libburn release 1.0.0" \
http://svn.libburnia-project.org/libburn/trunk \
http://svn.libburnia-project.org/libburn/1.0.0"
2011.01.16.123001 [3549] [3550]
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 1.0.0
16 Jan 2011 [3551]
- cdrskin/add_ts_changes_to_libburn_0_9_0
- cdrskin/add_ts_changes_to_libburn_0_9_1
+ cdrskin/add_ts_changes_to_libburn_1_0_0
+ cdrskin/add_ts_changes_to_libburn_1_0_1
Updated cdrskin tarball generator
16 Jan 2011 [3552]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------ release - cdrskin-1.0.0.pl00 - 2011.01.16.123001
* Allowed umask to create stdio-drive files with rw-permissions for all
* cdrskin now refuses to burn if the foreseeable size exceeds media capacity
2011.01.16.140456 [3553]
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 1.0.1
16 Jan 2011 [3554]
- cdrskin/add_ts_changes_to_libburn_0_9_0
- cdrskin/add_ts_changes_to_libburn_0_9_1
+ cdrskin/add_ts_changes_to_libburn_1_0_0
+ cdrskin/add_ts_changes_to_libburn_1_0_1
Updated cdrskin tarball generator
16 Jan 2011 [3555]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
16 Jan 2011 [3556]
svn move -m "libburn release 1.0.0 is ready" \
http://svn.libburnia-project.org/libburn/branches/1.0.0 \
http://svn.libburnia-project.org/libburn/tags/1.0.0
------------------------------------ cycle - cdrskin-1.0.1 - 2011.01.16.152923
2011.01.18.162859 [3570]
libburn/file.c
Using usleep() instead of nanosleep() which is not available on Solaris 9
2011.02.09.114311 [3586]
libburn/write.c
libburn/drive.c
Forced role 3 on drives which stem from open file descriptors without O_RDWR
2011.02.14.085951 [3589]
libburn/drive.c
Reacted on compiler warnings about uninitialized variables
2011.02.18.165542 [3592]
libburn/drive.c
libburn/sector.c
DEBUG message with burn_drive_cancel, FAILURE with premature end-of-input
23 Feb 2011 [3604]
svn copy -m Branching for libburn release 1.0.2
http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/1.0.2
2011.02.23.130001 [3605]
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 1.0.2
23 Feb 2011 [3606]
- cdrskin/add_ts_changes_to_libburn_1_0_0
- cdrskin/add_ts_changes_to_libburn_1_0_1
+ cdrskin/add_ts_changes_to_libburn_1_0_2
+ cdrskin/add_ts_changes_to_libburn_1_0_3
Updated cdrskin tarball generator
23 Feb 2011 [3607]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------ release - cdrskin-1.0.2.pl00 - 2011.02.23.130001
* Removed compilation obstacles on Solaris 9.
* Improved recognition of non-seekable stdio pseudo-drives.
2011.02.23.193502 [3611]
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 1.0.3
23 Feb 2011 [3612]
- cdrskin/add_ts_changes_to_libburn_1_0_0
- cdrskin/add_ts_changes_to_libburn_1_0_1
+ cdrskin/add_ts_changes_to_libburn_1_0_2
+ cdrskin/add_ts_changes_to_libburn_1_0_3
Updated cdrskin tarball generator
23 Feb 2011 [3613]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------------ cycle - cdrskin-1.0.3 - 2011.02.23.193502
23 Feb 2011 [3614]
svn move -m libburn release 1.0.2 is ready
http://svn.libburnia-project.org/libburn/branches/1.0.2
http://svn.libburnia-project.org/libburn/tags/1.0.2
2011.02.23.195650 [3615]
libburn/libdax_msgs.h
Registered new error code
2011.02.24.191718 [3619]
libburn/async.c
Corrected a flaw found by George Danchev with cpp
2011.03.01.144625 [3625]
libburn/drive.c
Bug fix: Read-only file descriptors were classified as write-only pseudo drives
svn copy -m Branching for libburn release 1.0.4
http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/1.0.4
2011.03.10.080001 [3651]
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 1.0.4
10 Mar 2011 [3652]
- cdrskin/add_ts_changes_to_libburn_1_0_2
- cdrskin/add_ts_changes_to_libburn_1_0_3
+ cdrskin/add_ts_changes_to_libburn_1_0_4
+ cdrskin/add_ts_changes_to_libburn_1_0_5
Updated cdrskin tarball generator
10 Mar 2011 [3653]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------ release - cdrskin-1.0.4.pl00 - 2011.03.10.080001
* Bug fix: Read-only file descriptors were classified as write-only pseudo drives
2011.03.10.132603 [3657]
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 1.0.5
10 Mar 2011 [3659]
- cdrskin/add_ts_changes_to_libburn_1_0_2
- cdrskin/add_ts_changes_to_libburn_1_0_3
+ cdrskin/add_ts_changes_to_libburn_1_0_4
+ cdrskin/add_ts_changes_to_libburn_1_0_5
Updated cdrskin tarball generator
10 Mar 2011 [3660]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
10 Mar 2011 [3658]
svn move -m libburn release 1.0.4 is ready
http://svn.libburnia-project.org/libburn/branches/1.0.4
http://svn.libburnia-project.org/libburn/tags/1.0.4
------------------------------------ cycle - cdrskin-1.0.5 - 2011.03.10.132603
12 Mar 2011 [3664]
COPYRIGHT
Updated copyright year
2011.03.12.093520 [3665]
libburn/write.c
libburn/mmc.c
Burning DVD-R DAO with 2 kB size granularity rather than 32 kB
2011.03.13.130746 [3666]
libburn/libburn.h
libburn/init.c
libburn/drive.c
libburn/async.c
libburn/write.c
libburn/libdax_msgs.h
libburn/libburn.ver
New API call burn_allow_drive_role_4()
2011.03.13.130850 [3667]
cdrskin/cdrskin.c
Using burn_allow_drive_role_4() in cdrskin
2011.03.13.192627 [3671]
libburn/read.c
libburn/libdax_msgs.h
Changed severity of "Read attempt on write-only drive" from FATAL to FAILURE
2011.03.18.093128 [3672]
cdrskin/cdrskin.c
Prepared cdrskin for drive role 5
2011.03.18.093410 [3673]
libburn/transport.h
libburn/drive.c
libburn/async.c
libburn/write.c
libburn/read.c
libburn/libdax_msgs.h
Provisory introduction of drive role 5, random access write-only
2011.03.18.153326 [3674]
libburn/async.c
libburn/mmc.c
Enabled BD formatting by index on Pioneer BDR-205 which offers no Cert or QCert
2011.03.19.222152 [3675]
libburn/sector.c
Silenced an error message with input that is not aligned to 2 kB
2011.03.21.090313 [3676]
libburn/drive.c
Corrected nwa computation for drive role 5
2011.03.21.090430 [3677]
libburn/write.c
Adjustments for drive role 5, random access write-only
2011.03.21.092220 [3678]
libburn/async.c
Enabled blanking of drive with role 5
2011.03.22.085956 [3685]
libburn/libburn.h
libburn/init.c
libburn/drive.c
Avoiding appendable role 5 if not explicitely enabled
2011.03.24.182148 [3687]
libburn/libburn.h
libburn/read.c
libburn/libdax_msgs.h
Better handling of read attempt on pseudo-drive without read-permission
8 Apr 2011 [3712]
svn copy -m Branching for libburn release 1.0.6
http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/1.0.6
2011.04.08.180001 [3713]
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 1.0.6
08 Apr 2011 [3714]
- cdrskin/add_ts_changes_to_libburn_1_0_4
- cdrskin/add_ts_changes_to_libburn_1_0_5
+ cdrskin/add_ts_changes_to_libburn_1_0_6
+ cdrskin/add_ts_changes_to_libburn_1_0_7
Updated cdrskin tarball generator
[]
ChangeLog
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------ release - cdrskin-1.0.6.pl00 - 2011.04.08.180001
* Burning DVD-R DAO with 2 kB size granularity rather than 32 kB
* New API call burn_allow_drive_role_4()
------------------------------------ cycle - cdrskin-1.0.7 -
------------------------------------ cycle - cdrskin-1.0.7 -
**********************************************************************
Important: When adding a public API function then add its name to file
libburn/libburn.ver
**********************************************************************
===============================================================================
TODO
===============================================================================
Throw out old burn_print() calls
Expose BD type from bytes 8+4 to 10+4 out of READ BD STRUCTURE form 0.
Better motivation of burn_set_signal_handling() in libburn.h.
-------------------------------- Solaris -----------------------------------
Locking of device files.
Unmounting.
Could need ioctl to obtain SCSI bus,target,lun from fd rather than name
(
Subject: Re: [osol-help] DHCP configuration with fixed addresses
pntadm -A 10.0.0.24 -f MANUAL -i 010008544255E7 -m 10.0.0.0 -y 10.0.0.0
)
----------------------------------------------------------------------------
- change all malloc() to calloc()
- find out from where libburn/crc.c stems. What algorithm is crc_32() ?

View File

@ -1,14 +1,14 @@
#!/bin/sh
# compile_cdrskin.sh
# Copyright 2005 - 2011 Thomas Schmitt, scdbackup@gmx.net, GPL
# Copyright 2005 - 2010 Thomas Schmitt, scdbackup@gmx.net, GPL
# to be executed within ./libburn-* resp ./cdrskin-*
debug_opts="-O2"
def_opts=
largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1"
fifo_opts=""
libvers="-DCdrskin_libburn_1_0_6"
libvers="-DCdrskin_libburn_0_8_2"
# To be used if Makefile.am uses libburn_libburn_la_CFLAGS
# burn="libburn/libburn_libburn_la-"
@ -47,15 +47,15 @@ do
libdax_audioxtr_o=
libdax_msgs_o="$burn"message.o
cleanup_src_or_obj="-DCleanup_has_no_libburn_os_H cdrskin/cleanup.c"
elif test "$i" = "-libburn_1_0_6"
elif test "$i" = "-libburn_0_8_2"
then
libvers="-DCdrskin_libburn_1_0_6"
libvers="-DCdrskin_libburn_0_8_2"
libdax_audioxtr_o="$burn"libdax_audioxtr.o
libdax_msgs_o="$burn"libdax_msgs.o
cleanup_src_or_obj="$burn"cleanup.o
elif test "$i" = "-libburn_svn"
then
libvers="-DCdrskin_libburn_1_0_7"
libvers="-DCdrskin_libburn_0_8_3"
libdax_audioxtr_o="$burn"libdax_audioxtr.o
libdax_msgs_o="$burn"libdax_msgs.o
cleanup_src_or_obj="$burn"cleanup.o
@ -109,7 +109,7 @@ do
echo "Options:"
echo " -compile_cdrfifo compile program cdrskin/cdrfifo."
echo " -compile_dewav compile program test/dewav without libburn."
echo " -libburn_1_0_6 set macro to match libburn-1.0.6"
echo " -libburn_0_8_2 set macro to match libburn-0.8.2"
echo " -libburn_svn set macro to match current libburn-SVN."
echo " -dvd_obs_64k 64 KB default size for DVD/BD writing."
echo " -use_libcdio link with -lcdio because libburn uses it."

View File

@ -1,4 +1,4 @@
AC_INIT([libburn], [1.0.6], [http://libburnia-project.org])
AC_INIT([libburn], [0.8.2], [http://libburnia-project.org])
AC_PREREQ([2.50])
dnl AC_CONFIG_HEADER([config.h])
@ -9,7 +9,7 @@ LIBBURNIA_SET_FLAGS
AM_INIT_AUTOMAKE([subdir-objects])
dnl Notes by ts A71207 - B10409 :
dnl Notes by ts A71207 - B00611 :
dnl
dnl Regrettably the meaning of the various version types was misunderstood
dnl before version 0.4.1.
@ -82,14 +82,6 @@ dnl 0.7.6 = libburn.so.4.41.0
dnl 0.7.8 = libburn.so.4.43.0
dnl 0.8.0 = libburn.so.4.45.0
dnl 0.8.2 = libburn.so.4.47.0
dnl 0.8.4 = libburn.so.4.49.0
dnl 0.8.6 = libburn.so.4.51.0
dnl 0.8.8 = libburn.so.4.53.0
dnl 0.9.0 = libburn.so.4.55.0
dnl 1.0.0 = libburn.so.4.57.0
dnl 1.0.2 = libburn.so.4.59.0
dnl 1.0.4 = libburn.so.4.61.0
dnl 1.0.6 = libburn.so.4.63.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.
@ -113,9 +105,9 @@ dnl
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=1
BURN_MINOR_VERSION=0
BURN_MICRO_VERSION=6
BURN_MAJOR_VERSION=0
BURN_MINOR_VERSION=8
BURN_MICRO_VERSION=2
BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
AC_SUBST(BURN_MAJOR_VERSION)
@ -126,14 +118,15 @@ AC_SUBST(BURN_VERSION)
dnl Libtool versioning
LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
dnl
dnl This is the release version libburn-1.0.6
dnl ts B00409
dnl This is the release version libburn-0.8.2
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 = 67 - 63 = 4 . Linux library name = libburn.so.4.63.0
LT_CURRENT=67
LT_AGE=63
dnl SONAME = 51 - 47 = 4 . Linux library name = libburn.so.4.47.0
LT_CURRENT=51
LT_AGE=47
LT_REVISION=0
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
@ -191,11 +184,11 @@ 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="$STATVFS_DEF $CFLAGS"
CFLAGS="$CFLAGS $STATVFS_DEF"
dnl ts A91122
AC_ARG_ENABLE(track-src-odirect,
[ --enable-track-src-odirect Enable use of O_DIRECT with track input, default=no],
[ --enable-track-src-odirect Enable use of O_DIRECT with track input, default=no],
, enable_track_src_odirect=no)
if test x$enable_track_src_odirect = xyes; then
LIBBURN_O_DIRECT_DEF="-DLibburn_read_o_direcT"
@ -206,11 +199,11 @@ else
fi
dnl Avoid the need for libburn_libburn_la_CFLAGS in Makefile.am (ugly .o names)
dnl ### AC_SUBST(LIBBURN_O_DIRECT_DEF)
CFLAGS="$LIBBURN_O_DIRECT_DEF $CFLAGS"
CFLAGS="$CFLAGS $LIBBURN_O_DIRECT_DEF"
dnl ts A91116
AC_ARG_ENABLE(dvd-obs-64k,
[ --enable-dvd-obs-64k 64 KB default size for DVD/BD writing, default=no],
[ --enable-dvd-obs-64k 64 KB default size for DVD/BD writing, default=no],
, enable_dvd_obs_64k=no)
if test x$enable_dvd_obs_64k = xyes; then
LIBBURN_DVD_OBS_64K="-DLibburn_dvd_obs_default_64K"
@ -219,11 +212,11 @@ else
LIBBURN_DVD_OBS_64K=
echo "disabled write size default 64 KB on DVD and BD"
fi
CFLAGS="$LIBBURN_DVD_OBS_64K $CFLAGS"
CFLAGS="$CFLAGS $LIBBURN_DVD_OBS_64K"
dnl ts A91218
AC_ARG_ENABLE(libcdio,
[ --enable-libcdio Enable EXPERIMENTAL use of libcdio as system adapter, default=no],
[ --enable-libcdio Enable EXPERIMENTAL use of libcdio as system adapter, default=no],
, enable_libcdio=no)
if test x$enable_libcdio = xyes; then
dnl Check whether there is libcdio-devel and libcdio-runtime.
@ -242,45 +235,13 @@ then
fi
else
echo "enabled EXPERIMENTAL use of libcdio as system adapter"
CFLAGS="$LIBCDIO_DEF $CFLAGS"
CFLAGS="$CFLAGS $LIBCDIO_DEF"
LIBCDIO_REQUIRED=0.83
PKG_CHECK_MODULES(LIBCDIO, libcdio >= $LIBCDIO_REQUIRED)
fi
dnl ts B00704
# Library versioning normally serves a complex purpose.
# Since libburn obeys strict ABI backward compatibility, it needs only the
# simple feature to declare function names "global:" or "local:". Only the
# global ones are visible to applications at library load time.
AC_ARG_ENABLE(versioned-libs,
[ --enable-versioned-libs Enable strict symbol encapsulation , default=yes],
, enable_versioned_libs=yes)
if test x$enable_versioned_libs = xyes; then
vers_libs_test=no
LIBBURN_ASSERT_VERS_LIBS
if test x$vers_libs_test = xno
then
echo "disabled strict symbol encapsulation (test failed)"
else
echo "enabled strict symbol encapsulation"
fi
else
echo "disabled strict symbol encapsulation"
fi
AC_ARG_ENABLE(ldconfig-at-install,
[ --enable-ldconfig-at-install On GNU/Linux run ldconfig, default=yes],
, ldconfig_at_install=yes)
if test x$ldconfig_at_install = xyes; then
dummy=dummy
else
LIBBURNIA_LDCONFIG_CMD="echo 'NOTE: ldconfig is disabled. If needed, configure manually for:'"
echo "disabled run of ldconfig during installation on GNU/Linux"
fi
AC_SUBST(LIBBURNIA_LDCONFIG_CMD)
dnl Add compiler-specific flags
@ -290,15 +251,15 @@ AC_ARG_ENABLE(debug,
, enable_debug=yes)
if test x$enable_debug != xyes; then
if test x$GCC = xyes; then
CFLAGS="-O3 $CFLAGS"
CFLAGS="-fexpensive-optimizations $CFLAGS"
CFLAGS="$CFLAGS -O3"
CFLAGS="$CFLAGS -fexpensive-optimizations"
fi
CFLAGS="-DNDEBUG $CFLAGS"
CFLAGS="$CFLAGS -DNDEBUG"
else
if test x$GCC = xyes; then
CFLAGS="-g -pedantic -Wall $CFLAGS"
CFLAGS="$CFLAGS -g -pedantic -Wall"
fi
CFLAGS="-DDEBUG $CFLAGS"
CFLAGS="$CFLAGS -DDEBUG"
fi
dnl Determine target directory for libburn-*.pc

View File

@ -8,13 +8,14 @@
Libburnia is an open-source project for reading, mastering and writing
optical discs. This page is about its capability to handle optical media.
For now this means CD-R, CD-RW, DVD-RAM, DVD+RW, DVD+R, DVD+R/DL, DVD-RW,
DVD-R, DVD-R/DL, BD-R, BD-RE.
DVD-R, BD-R, BD-RE.
Our scope is currently Linux 2.4 and 2.6, or FreeBSD, or Solaris . For ports
to other systems we would need : login on a development machine resp.
an OS ithat is installable on an AMD 64-bit PC, advise from a system person
about the equivalent of Linux sg or FreeBSD CAM, volunteers for testing of
realistic use cases.
Not supported yet are DVD-R/DL. Testers wanted.
Our scope is currently Linux 2.4 and 2.6, or FreeBSD . For 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.
libburn is the library by which preformatted data get onto optical media.
Its code is independent of cdrecord. Its DVD capabilities are learned from

View File

@ -154,6 +154,13 @@ QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = YES
# If the DETAILS_AT_TOP tag is set to YES then Doxygen
# will output the detailed description near the top, like JavaDoc.
# If set to NO, the detailed description appears after the member
# documentation.
DETAILS_AT_TOP = YES
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
# member inherits the documentation from any documented member that it
# re-implements.

View File

@ -143,7 +143,7 @@ static void add_worker(int w_type, struct burn_drive *d,
pthread_attr_t attr;
#endif
a = calloc(1, sizeof(struct w_list));
a = malloc(sizeof(struct w_list));
a->w_type = w_type;
a->drive = d;
a->u = *(union w_list_data *)data;
@ -355,7 +355,7 @@ void burn_disc_erase(struct burn_drive *drive, int fast)
/* a ssert(!find_worker(drive)); */
if((drive == NULL)) {
libdax_msgs_submit(libdax_messenger, -1,
libdax_msgs_submit(libdax_messenger, drive->global_index,
0x00020104,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
"NULL pointer caught in burn_disc_erase", 0, 0);
@ -383,9 +383,7 @@ void burn_disc_erase(struct burn_drive *drive, int fast)
/* ts A70909 : the willingness to burn any BURN_DISC_FULL media is
inappropriate. One would rather need a -force option
Note: keep this in sync with mmc_read_disc_info() */
/* ts B10321 : Allowed role 5 to be blanked */
if ((drive->drive_role == 1 &&
drive->current_profile != 0x0a &&
if ((drive->current_profile != 0x0a &&
drive->current_profile != 0x13 &&
drive->current_profile != 0x14 &&
drive->status != BURN_DISC_FULL)
@ -394,7 +392,7 @@ void burn_disc_erase(struct burn_drive *drive, int fast)
drive->status != BURN_DISC_APPENDABLE &&
drive->status != BURN_DISC_BLANK)
||
(drive->drive_role != 1 && drive->drive_role != 5)
(drive->drive_role != 1)
) {
libdax_msgs_submit(libdax_messenger, drive->global_index,
0x00020130,
@ -519,6 +517,42 @@ void burn_disc_format(struct burn_drive *drive, off_t size, int flag)
return;
}
if ((flag & 6) != 6 || (flag & 128)) {
if ((flag & 64) && !(drive->current_feat23h_byte4 & 2)) {
if (drive->current_feat23h_byte4 & 1) {
libdax_msgs_submit(libdax_messenger,
drive->global_index, 0x00020165,
LIBDAX_MSGS_SEV_WARNING,
LIBDAX_MSGS_PRIO_HIGH,
"Drive does not support fast formatting",
0, 0);
flag &= ~64;
} else {
no_non_default_bd_re:;
libdax_msgs_submit(libdax_messenger,
drive->global_index, 0x00020167,
LIBDAX_MSGS_SEV_SORRY,
LIBDAX_MSGS_PRIO_HIGH,
"Drive does not support non-default formatting",
0, 0);
drive->cancel = 1;
return;
}
}
if ((!(flag & 64)) && !(drive->current_feat23h_byte4 & 1)){
if (drive->current_feat23h_byte4 & 2) {
libdax_msgs_submit(libdax_messenger,
drive->global_index, 0x00020166,
LIBDAX_MSGS_SEV_WARNING,
LIBDAX_MSGS_PRIO_HIGH,
"Drive does not support full formatting",
0, 0);
flag |= 64;
} else
goto no_non_default_bd_re;
}
}
}
if (!ok) {
@ -610,13 +644,8 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
d->cancel = 1;
/* ts A70203 : people have been warned in API specs */
if (opts->write_type == BURN_WRITE_NONE) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x0002017c,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
"No valid write type selected", 0, 0);
if (opts->write_type == BURN_WRITE_NONE)
return;
}
if (d->drive_role == 0) {
libdax_msgs_submit(libdax_messenger, d->global_index,
@ -625,14 +654,6 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
"Drive is a virtual placeholder (null-drive)", 0, 0);
return;
}
if (d->drive_role == 4) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020181,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
"Pseudo-drive is a read-only file. Cannot write.",
0, 0);
return;
}
/* ts A61007 : obsolete Assert in spc_select_write_params() */
if (d->drive_role == 1 && d->mdata->valid <= 0) {

View File

@ -12,6 +12,9 @@
#include <sys/types.h>
#include <sys/stat.h>
/* #include <m alloc.h> ts A61013 : not in GNU/Linux man 3 malloc */
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
@ -24,7 +27,6 @@
#include <ctype.h>
#include <pthread.h>
#include <errno.h>
#include <fcntl.h>
#include "libburn.h"
#include "init.h"
#include "drive.h"
@ -60,10 +62,6 @@ static int drivetop = -1;
/* ts A80410 : in init.c */
extern int burn_support_untested_profiles;
/* ts B10312 : in init.c */
extern int burn_drive_role_4_allowed;
/* ts A61021 : the unspecific part of sg.c:enumerate_common()
*/
int burn_setup_drive(struct burn_drive *d, char *fname)
@ -78,7 +76,6 @@ int burn_setup_drive(struct burn_drive *d, char *fname)
d->status = BURN_DISC_UNREADY;
d->do_stream_recording = 0;
d->stream_recording_start= 0;
d->role_5_nwa = 0;
return 1;
}
@ -313,9 +310,8 @@ int burn_drive_inquire_media(struct burn_drive *d)
int burn_drive_grab(struct burn_drive *d, int le)
{
int errcode;
/* ts A61125 - B10314 */
int ret, sose, stat_ret = -1;
struct stat stbuf;
/* ts A61125 - A61202 */
int ret, sose;
if (!d->released) {
burn_print(1, "can't grab - already grabbed\n");
@ -323,24 +319,9 @@ int burn_drive_grab(struct burn_drive *d, int le)
}
if(d->drive_role != 1) {
d->released = 0;
d->current_profile = 0xffff;
if (d->devname[0])
stat_ret = stat(d->devname, &stbuf);
if(d->drive_role == 2 || d->drive_role == 3) {
d->status = BURN_DISC_BLANK;
} else if(d->drive_role == 4) {
if (d->media_read_capacity > 0)
d->status = BURN_DISC_FULL;
else
d->status = BURN_DISC_EMPTY;
} else if(d->drive_role == 5) {
if (stat_ret != -1 && S_ISREG(stbuf.st_mode) &&
stbuf.st_size > 0) {
d->status = BURN_DISC_APPENDABLE;
d->role_5_nwa = stbuf.st_size / 2048 +
!!(stbuf.st_size % 2048);
} else
d->status = BURN_DISC_BLANK;
d->current_profile = 0xffff;
} else {
d->status = BURN_DISC_EMPTY;
d->current_profile = 0;
@ -637,29 +618,13 @@ void burn_wait_all(void)
void burn_disc_erase_sync(struct burn_drive *d, int fast)
{
int ret;
/* ts A60924 : libburn/message.c gets obsoleted
burn_message_clear_queue();
*/
burn_print(1, "erasing drive %s %s\n", d->idata->vendor,
d->idata->product);
if (d->drive_role == 5) { /* Random access write-only drive */
ret = truncate(d->devname, (off_t) 0);
if (ret == -1) {
libdax_msgs_submit(libdax_messenger, -1,
0x00020182,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
"Cannot truncate disk file for pseudo blanking",
0, 0);
return;
}
d->role_5_nwa = 0;
d->cancel = 0;
d->status = BURN_DISC_BLANK;
d->busy = BURN_DRIVE_IDLE;
d->progress.sector = 0x10000;
return;
}
d->cancel = 0;
#ifdef Libburn_reset_progress_asynC
@ -907,11 +872,6 @@ void burn_drive_cancel(struct burn_drive *d)
/* ts B00225 : these mutexes are unnecessary because "= 1" is atomar.
pthread_mutex_lock(&d->access_lock);
*/
if (!d->cancel) {
libdax_msgs_submit(libdax_messenger, -1, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
"burn_drive_cancel() was called", 0, 0);
}
d->cancel = 1;
/*
pthread_mutex_unlock(&d->access_lock);
@ -1337,7 +1297,7 @@ int burn_drive_add_whitelist(char *device_address)
if(enumeration_whitelist_top+1 >= BURN_DRIVE_WHITELIST_LEN)
return 0;
enumeration_whitelist_top++;
new_item = calloc(1, strlen(device_address) + 1);
new_item = malloc(strlen(device_address) + 1);
if (new_item == NULL)
return -1;
strcpy(new_item, device_address);
@ -1397,109 +1357,40 @@ int burn_drive__fd_from_special_adr(char *adr)
return fd;
}
/* @param flag bit0= accept read-only files and return 2 in this case
bit1= accept write-only files and return 3 in this case
*/
static int burn_drive__is_rdwr(char *fname, int *stat_ret,
struct stat *stbuf_ret,
off_t *read_size_ret, int flag)
{
int fd, is_rdwr = 1, ret, getfl_ret, st_ret, mask;
struct stat stbuf;
off_t read_size = 0;
memset(&stbuf, 0, sizeof(stbuf));
fd = burn_drive__fd_from_special_adr(fname);
if (fd >= 0)
st_ret = fstat(fd, &stbuf);
else
st_ret = stat(fname, &stbuf);
if (st_ret != -1) {
is_rdwr = burn_os_is_2k_seekrw(fname, 0);
if (S_ISREG(stbuf.st_mode))
read_size = stbuf.st_size;
else if (is_rdwr) {
ret = burn_os_stdio_capacity(fname, &read_size);
if (ret <= 0)
read_size = (off_t) 0x7ffffff0 * (off_t) 2048;
}
}
if (is_rdwr && fd >= 0) {
getfl_ret = fcntl(fd, F_GETFL);
/*
fprintf(stderr, "LIBBURN_DEBUG: burn_drive__is_rdwr: getfl_ret = %lX , O_RDWR = %lX , & = %lX , O_RDONLY = %lX\n", (unsigned long) getfl_ret, (unsigned long) O_RDWR, (unsigned long) (getfl_ret & O_RDWR), (unsigned long) O_RDONLY);
*/
mask = O_RDWR | O_WRONLY | O_RDONLY;
if (getfl_ret == -1 || (getfl_ret & mask) != O_RDWR)
is_rdwr = 0;
if ((flag & 1) && getfl_ret != -1 &&
(getfl_ret & mask) == O_RDONLY)
is_rdwr = 2;
if ((flag & 2) && getfl_ret != -1 &&
(getfl_ret & mask) == O_WRONLY)
is_rdwr = 3;
}
if (stat_ret != NULL)
*stat_ret = st_ret;
if (stbuf_ret != NULL)
memcpy(stbuf_ret, &stbuf, sizeof(stbuf));
if (read_size_ret != NULL)
*read_size_ret = read_size;
return is_rdwr;
}
static int burn_role_by_access(char *fname, int flag)
{
/* We normally need _LARGEFILE64_SOURCE defined by the build system.
Nevertheless the system might use large address integers by default.
*/
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
#endif
int fd;
fd = open(fname, O_RDWR | O_LARGEFILE);
if (fd != -1) {
close(fd);
return 2;
}
fd = open(fname, O_RDONLY | O_LARGEFILE);
if (fd != -1) {
close(fd);
return 4;
}
fd = open(fname, O_WRONLY | O_LARGEFILE);
if (fd != -1) {
close(fd);
return 5;
}
if (flag & 1)
return 0;
return 2;
}
/* ts A70903 : Implements adquiration of pseudo drives */
int burn_drive_grab_dummy(struct burn_drive_info *drive_infos[], char *fname)
{
int ret = -1, role = 0, fd;
int is_rdwr = 0, stat_ret = -1;
int ret = -1, fd = -1, role = 0;
int is_block_dev = 0;
/* divided by 512 it needs to fit into a signed long integer */
off_t size = ((off_t) (512 * 1024 * 1024 - 1) * (off_t) 2048);
off_t read_size = -1;
struct burn_drive *d= NULL, *regd_d;
struct stat stbuf;
static int allow_role_3 = 1;
if (fname[0] != 0) {
memset(&stbuf, 0, sizeof(stbuf));
fd = burn_drive__fd_from_special_adr(fname);
is_rdwr = burn_drive__is_rdwr(fname, &stat_ret, &stbuf,
&read_size, 1 | 2);
if (stat_ret == -1 || is_rdwr) {
if (fd >= 0)
ret = fstat(fd, &stbuf);
else
ret = stat(fname, &stbuf);
if (ret != -1) {
is_block_dev = burn_os_is_2k_seekrw(fname, 0);
if (S_ISREG(stbuf.st_mode))
read_size = stbuf.st_size;
else if (is_block_dev) {
ret = burn_os_stdio_capacity(fname,
&read_size);
if (ret <= 0)
read_size = (off_t) 0x7ffffff0 *
(off_t) 2048;
}
}
if (ret == -1 || is_block_dev || S_ISREG(stbuf.st_mode)) {
ret = burn_os_stdio_capacity(fname, &size);
if (ret == -1) {
libdax_msgs_submit(libdax_messenger, -1,
@ -1516,22 +1407,18 @@ int burn_drive_grab_dummy(struct burn_drive_info *drive_infos[], char *fname)
errno, 0);
return 0;
}
if (fname[0] != 0) {
if (is_rdwr == 2 &&
(burn_drive_role_4_allowed & 1))
role = 4;
else if (is_rdwr == 3 &&
(burn_drive_role_4_allowed & 1))
role = 5;
else
role = 2;
if (stat_ret != -1 && role == 2 && fd == -1 &&
(burn_drive_role_4_allowed & 3) == 3)
role = burn_role_by_access(fname,
!!(burn_drive_role_4_allowed & 4));
} else
if (fname[0] != 0)
role = 2;
else
role = 0;
} else {
if(S_ISDIR(stbuf.st_mode) || !allow_role_3) {
libdax_msgs_submit(libdax_messenger, -1,
0x00020149,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
"Unsuitable filetype for pseudo-drive", 0, 0);
return 0;
}
role = 3;
}
}
@ -1552,39 +1439,22 @@ int burn_drive_grab_dummy(struct burn_drive_info *drive_infos[], char *fname)
}
free((char *) d); /* all sub pointers have been copied to *regd_d */
d = regd_d;
if (d->drive_role >= 2 && d->drive_role <= 5) {
if (d->drive_role == 4) {
if (read_size > 0)
d->status = BURN_DISC_FULL;
else
d->status = BURN_DISC_EMPTY;
d->block_types[BURN_WRITE_TAO] = 0;
d->block_types[BURN_WRITE_SAO] = 0;
} else {
if (d->drive_role == 5 && stat_ret != -1 &&
S_ISREG(stbuf.st_mode) && stbuf.st_size > 0 &&
(burn_drive_role_4_allowed & 8)) {
d->status = BURN_DISC_APPENDABLE;
d->block_types[BURN_WRITE_SAO] = 0;
d->role_5_nwa = stbuf.st_size / 2048 +
!!(stbuf.st_size % 2048);
} else {
d->status = BURN_DISC_BLANK;
d->block_types[BURN_WRITE_SAO] =
BURN_BLOCK_SAO;
d->role_5_nwa = 0;
}
d->block_types[BURN_WRITE_TAO] = BURN_BLOCK_MODE1;
}
if (d->drive_role == 2 || d->drive_role == 3) {
d->status = BURN_DISC_BLANK;
d->current_profile = 0xffff; /* MMC for non-compliant drive */
strcpy(d->current_profile_text,"stdio file");
d->current_is_cd_profile = 0;
d->current_is_supported_profile = 1;
d->block_types[BURN_WRITE_TAO] = BURN_BLOCK_MODE1;
d->block_types[BURN_WRITE_SAO] = BURN_BLOCK_SAO;
if (read_size >= 0)
/* despite its name : last valid address, not size */
d->media_read_capacity =
read_size / 2048 - !(read_size % 2048);
burn_drive_set_media_capacity_remaining(d, size);
/* >>> ? open file for a test ? (>>> beware of "-" = stdin) */;
} else
d->current_profile = 0; /* Drives return this if empty */
@ -1603,14 +1473,6 @@ int burn_drive_grab_dummy(struct burn_drive_info *drive_infos[], char *fname)
strcpy((*drive_infos)[0].vendor,"YOYODYNE");
strcpy((*drive_infos)[0].product,"BLACKHOLE");
strcpy((*drive_infos)[0].revision,"FX02");
} else if (d->drive_role == 4) {
strcpy((*drive_infos)[0].vendor,"YOYODYNE");
strcpy((*drive_infos)[0].product,"WARP DRIVE");
strcpy((*drive_infos)[0].revision,"FX03");
} else if (d->drive_role == 5) {
strcpy((*drive_infos)[0].vendor,"YOYODYNE");
strcpy((*drive_infos)[0].product,"WARP DRIVE");
strcpy((*drive_infos)[0].revision,"FX04");
} else {
strcpy((*drive_infos)[0].vendor,"FERENGI");
strcpy((*drive_infos)[0].product,"VAPORWARE");
@ -2242,11 +2104,6 @@ int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
return -1;
}
*lba = *nwa = 0;
if (d->drive_role == 5 && trackno == 0 &&
d->status == BURN_DISC_APPENDABLE) {
*lba = *nwa = d->role_5_nwa;
return 1;
}
if (d->drive_role != 1)
return 0;
if (o != NULL)
@ -2364,7 +2221,7 @@ int burn_speed_descriptor_new(struct burn_speed_descriptor **s,
{
struct burn_speed_descriptor *o;
(*s) = o = calloc(1, sizeof(struct burn_speed_descriptor));
(*s) = o = malloc(sizeof(struct burn_speed_descriptor));
if (o == NULL)
return -1;
o->source = 0;
@ -2535,7 +2392,7 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
if(s == BURN_DISC_UNGRABBED)
return -1;
*caps = o = (struct burn_multi_caps *)
calloc(1, sizeof(struct burn_multi_caps));
malloc(sizeof(struct burn_multi_caps));
if(*caps == NULL)
return -1;
/* Default says nothing is available */
@ -2549,7 +2406,7 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
o->current_is_cd_profile = d->current_is_cd_profile;
o->might_simulate = 0;
if (d->drive_role == 0 || d->drive_role == 4)
if (d->drive_role == 0)
return 0;
if (d->drive_role == 2) {
/* stdio file drive : random access read-write */
@ -2557,39 +2414,12 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
size = d->media_capacity_remaining;
burn_os_stdio_capacity(d->devname, &size);
burn_drive_set_media_capacity_remaining(d, size);
/* >>> This looks wrong ! */
/* >>> should add file size */
o->start_range_high = size;
o->start_alignment = 2048; /* imposting a drive, not a file */
o->might_do_sao = 4;
o->might_do_tao = 2;
o->advised_write_mode = BURN_WRITE_TAO;
o->might_simulate = 1;
} else if (d->drive_role == 5) {
/* stdio file drive : random access write-only */
o->start_adr = 1;
size = d->media_capacity_remaining;
burn_os_stdio_capacity(d->devname, &size);
burn_drive_set_media_capacity_remaining(d, size);
/* >>> start_range_low = file size rounded to 2048 */;
/* >>> This looks wrong ! */
/* >>> should add file size */
o->start_range_high = size;
o->start_alignment = 2048; /* imposting a drive, not a file */
if (s == BURN_DISC_APPENDABLE) {
if (wt == BURN_WRITE_SAO || wt == BURN_WRITE_RAW)
return 0;
o->might_do_sao = 0;
} else
o->might_do_sao = 4;
o->might_do_tao = 2;
o->advised_write_mode = BURN_WRITE_TAO;
o->might_simulate = 1;
} else if (d->drive_role != 1) {
/* stdio file drive : sequential access write-only */
o->might_do_sao = 4;
@ -2816,58 +2646,26 @@ int burn_drive_equals_adr(struct burn_drive *d1, char *adr2_in, int role2)
char adr1[BURN_DRIVE_ADR_LEN], *adr2 = adr2_in;
char conv_adr1[BURN_DRIVE_ADR_LEN], conv_adr2[BURN_DRIVE_ADR_LEN];
char *npt1, *dpt1, *npt2, *dpt2;
int role1, stat_ret1, stat_ret2, conv_ret2, exact_role_matters = 0, fd;
int ret;
int role1, stat_ret1, stat_ret2, conv_ret2;
role1 = burn_drive_get_drive_role(d1);
burn_drive_d_get_adr(d1, adr1);
stat_ret1 = stat(adr1, &stbuf1);
/* If one of the candidate paths depicts an open file descriptor then
its read-write capability decides about its role and the difference
between roles 2 and 3 does matter.
*/
fd = burn_drive__fd_from_special_adr(d1->devname);
if (fd != -1)
exact_role_matters = 1;
if (strncmp(adr2, "stdio:", 6) == 0) {
adr2+= 6;
if (adr2[0] == 0) {
role2 = 0;
} else {
fd = burn_drive__fd_from_special_adr(adr2);
if (fd != -1)
exact_role_matters = 1;
ret = burn_drive__is_rdwr(adr2, NULL, NULL, NULL,
1 | 2);
if (ret == 2 && (burn_drive_role_4_allowed & 1))
role2 = 4;
else if (ret == 3 && (burn_drive_role_4_allowed & 1))
role2 = 5;
else if (ret > 0)
role2 = 2;
else
role2 = 3;
if (fd == -1 &&
role2 == 2 && (burn_drive_role_4_allowed & 3) == 3)
role2 = burn_role_by_access(adr2,
!!(burn_drive_role_4_allowed & 4));
}
role2 = (!!adr2[0]) * 2;
}
if (strlen(adr2) >= BURN_DRIVE_ADR_LEN)
return -1;
stat_ret2 = stat(adr2, &stbuf2);
conv_ret2 = burn_drive_convert_fs_adr(adr2, conv_adr2);
if (!exact_role_matters) {
/* roles >= 2 have the same name space and object
interpretation */
if (role1 >= 2)
role1 = 2;
if (role2 >= 2)
role2 = 2;
}
/* roles 2 and 3 have the same name space and object interpretation */
if (role1 == 3)
role1 = 2;
if (role2 == 3)
role2 = 2;
if (strcmp(adr1, adr2) == 0 && role1 == role2)
return(1); /* equal role and address */
@ -2885,8 +2683,6 @@ int burn_drive_equals_adr(struct burn_drive *d1, char *adr2_in, int role2)
else if (role1 != 1 && role2 != 1) {
/* pseudo-drive meets file object */
if (role1 != role2)
return 0;
if (stat_ret1 == -1 || stat_ret2 == -1) {
if (stat_ret1 != -1 || stat_ret2 != -1)
return 0; /* one adress existing, one not */
@ -3043,18 +2839,3 @@ int burn_disc_get_cd_info(struct burn_drive *d, char disc_type[80],
*valid = d->disc_info_valid;
return 1;
}
/* ts B00924 : API */
int burn_disc_get_bd_spare_info(struct burn_drive *d,
int *alloc_blocks, int *free_blocks, int flag)
{
int ret;
if (burn_drive_get_drive_role(d) != 1)
return 0;
*alloc_blocks = *free_blocks = 0;
ret = mmc_get_bd_spare_info(d, alloc_blocks, free_blocks, 0);
return ret;
}

View File

@ -129,7 +129,7 @@ struct burn_source *burn_file_source_new(const char *path, const char *subpath)
return NULL;
}
}
fs = calloc(1, sizeof(struct burn_source_file));
fs = malloc(sizeof(struct burn_source_file));
/* ts A70825 */
if (fs == NULL) {
@ -175,7 +175,7 @@ struct burn_source *burn_fd_source_new(int datafd, int subfd, off_t size)
if (datafd == -1)
return NULL;
fs = calloc(1, sizeof(struct burn_source_file));
fs = malloc(sizeof(struct burn_source_file));
if (fs == NULL) /* ts A70825 */
return NULL;
fs->datafd = datafd;
@ -211,10 +211,9 @@ struct burn_source *burn_fd_source_new(int datafd, int subfd, off_t size)
static int fifo_sleep(int flag)
{
static unsigned long sleeptime = 50000; /* 50 ms */
static struct timespec sleeptime = { 0, 50000000}; /* 50 ms */
usleep(sleeptime);
return 0;
return nanosleep(&sleeptime, NULL);
}
@ -482,11 +481,10 @@ int burn_fifo_source_shoveller(struct burn_source *source, int flag)
int burn_fifo_cancel(struct burn_source *source)
{
int ret;
struct burn_source_fifo *fs = source->data;
ret = burn_source_cancel(fs->inp);
return ret;
burn_source_cancel(fs->inp);
return(1);
}
/*
@ -510,7 +508,7 @@ struct burn_source *burn_fifo_source_new(struct burn_source *inp,
"Desired fifo buffer too small", 0, 0);
return NULL;
}
fs = calloc(1, sizeof(struct burn_source_fifo));
fs = malloc(sizeof(struct burn_source_fifo));
if (fs == NULL)
return NULL;
fs->is_started = 0;
@ -749,162 +747,3 @@ int burn_fifo_fill(struct burn_source *source, int bufsize, int flag)
1 | ((flag & 1) << 1));
}
/* ----------------------------- Offset source ----------------------------- */
/* ts B00922 */
static void offst_free(struct burn_source *source);
static struct burn_source_offst *offst_auth(struct burn_source *source)
{
if (source->free_data != offst_free) {
libdax_msgs_submit(libdax_messenger, -1, 0x0002017a,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
"Expected offset source object as parameter",
0, 0);
return NULL;
}
return (struct burn_source_offst *) source->data;
}
static off_t offst_get_size(struct burn_source *source)
{
struct burn_source_offst *fs;
if ((fs = offst_auth(source)) == NULL)
return (off_t) 0;
return fs->size;
}
static int offst_set_size(struct burn_source *source, off_t size)
{
struct burn_source_offst *fs;
if ((fs = offst_auth(source)) == NULL)
return 0;
fs->size = size;
return 1;
}
static void offst_free(struct burn_source *source)
{
struct burn_source_offst *fs;
if ((fs = offst_auth(source)) == NULL)
return;
if (fs->prev != NULL)
offst_auth(fs->prev)->next = fs->next;
if (fs->next != NULL)
offst_auth(fs->next)->prev = fs->prev;
if (fs->inp != NULL)
burn_source_free(fs->inp); /* i.e. decrement refcount */
free(source->data);
}
static int offst_read(struct burn_source *source, unsigned char *buffer,
int size)
{
int ret, to_read, todo;
struct burn_source_offst *fs;
if ((fs = offst_auth(source)) == NULL)
return -1;
/* Eventually skip bytes up to start position */;
if (!fs->running) {
if (fs->prev != NULL)
fs->pos = offst_auth(fs->prev)->pos;
fs->running= 1;
}
if(fs->pos < fs->start) {
todo = fs->start - fs->pos;
while (todo > 0) {
to_read = todo;
if (to_read > size)
to_read = size;
ret = burn_source_read(fs->inp, buffer, to_read);
if (ret <= 0)
return ret;
todo -= ret;
fs->pos += ret;
}
}
/* Produce EOF if source size is exhausted.
burn_source delivers no incomplete sector buffers.
*/
if (fs->pos + size > fs->start + fs->size)
return 0;
/* Read payload */
ret = burn_source_read(fs->inp, buffer, size);
if (ret > 0)
fs->pos += ret;
return ret;
}
static int offst_cancel(struct burn_source *source)
{
int ret;
struct burn_source_offst *fs;
if ((fs = offst_auth(source)) == NULL)
return -1;
ret = burn_source_cancel(fs->inp);
return ret;
}
struct burn_source *burn_offst_source_new(
struct burn_source *inp, struct burn_source *prev,
off_t start, off_t size, int flag)
{
struct burn_source *src;
struct burn_source_offst *fs, *prev_fs = NULL;
if (prev != NULL)
if ((prev_fs = offst_auth(prev)) == NULL)
return NULL; /* Not type burn_source_offst */
fs = calloc(1, sizeof(struct burn_source_offst));
if (fs == NULL)
return NULL;
src = burn_source_new();
if (src == NULL) {
free((char *) fs);
return NULL;
}
src->read = NULL;
src->read_sub = NULL;
src->get_size = offst_get_size;
src->set_size = offst_set_size;
src->free_data = offst_free;
src->data = fs;
src->version= 1;
src->read_xt = offst_read;
src->cancel= offst_cancel;
fs->inp = inp;
fs->prev = prev;
fs->next = NULL;
if (prev != NULL) {
if (prev_fs->next != NULL) {
offst_auth(prev_fs->next)->prev = src;
fs->next = prev_fs->next;
}
prev_fs->next = src;
if (prev_fs->start + prev_fs->size > start) {
libdax_msgs_submit(libdax_messenger, -1, 0x00020179,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
"Offset source start address is before end of previous source",
0, 0);
return NULL;
}
}
fs->start = start;
fs->size = size;
fs->running = 0;
fs->pos = 0;
inp->refcount++; /* make sure inp lives longer than src */
return src;
}

View File

@ -74,22 +74,4 @@ struct burn_source_fifo {
int burn_fifo_source_shoveller(struct burn_source *source, int flag);
/* ts B00922 */
struct burn_source_offst {
/* See burn_offst_source_new() */
struct burn_source *inp;
struct burn_source *prev;
off_t start;
off_t size;
/* To help offst_free() */
struct burn_source *next;
/* The current reading position */
int running;
off_t pos;
};
#endif /* LIBBURN__FILE_H */

View File

@ -105,14 +105,6 @@ int burn_support_untested_profiles = 0;
*/
int burn_sg_log_scsi = 0;
/* ts B10312 :
Whether to map random-access readonly files to drive role 4.
Else it is role 2 overwriteable drive
*/
int burn_drive_role_4_allowed = 0;
/* ts A60925 : ticket 74 */
/** Create the messenger object for libburn. */
int burn_msgs_initialize(void)
@ -573,10 +565,3 @@ void burn_set_scsi_logging(int flag)
{
burn_sg_log_scsi = flag & 7;
}
/* ts B10312 API */
void burn_allow_drive_role_4(int allowed)
{
burn_drive_role_4_allowed = (allowed & 0xf);
}

View File

@ -1,15 +1,12 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2011 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
This is the official API definition of libburn.
*/
/* Important: If you add a public API function then add its name to file
libburn/libburn.ver
*/
#ifndef LIBBURN_H
@ -828,7 +825,7 @@ void burn_preset_device_open(int exclusive, int blocking, int abort_on_busy);
/* ts A70223 */
/** Allows the use of media types which are implemented in libburn but not yet
tested. The list of those untested profiles is subject to change.
- Currently no media types are under test reservation -
Currently it contains: 0x15 "DVD-R/DL sequential recording",
If you really test such media, then please report the outcome on
libburn-hackers@pykix.org
If ever then this call should be done soon after burn_initialize() before
@ -1237,29 +1234,12 @@ char *burn_guess_cd_manufacturer(int m_li, int s_li, int f_li,
bit5= Disc is nominally erasable (Erasable bit)
This will be set with overwriteable media which
libburn normally considers to be unerasable blank.
@return 1 success, <= 0 an error occured
@since 0.7.2
*/
int burn_disc_get_cd_info(struct burn_drive *d, char disc_type[80],
unsigned int *disc_id, char bar_code[9], int *app_code,
int *valid);
/* ts B00924 */
/** Read the current usage of the eventual BD Spare Area. This area gets
reserved on BD media during formatting. During writing it is used to
host replacements of blocks which failed the checkread immediately after
writing.
This call applies only to recordable BD media. I.e. profiles 0x41 to 0x43.
@param d The drive to query.
@param alloc_blocks Returns the number of blocks reserved as Spare Area
@param free_blocks Returns the number of yet unused blocks in that area
@param flag Bitfield for control purposes (unused yet, submit 0)
@return 1 = reply prarameters are valid,
<=0 = reply is invalid (e.g. because no BD profile)
@since 0.8.8
*/
int burn_disc_get_bd_spare_info(struct burn_drive *d,
int *alloc_blocks, int *free_blocks, int flag);
/* ts A61110 */
/** Read start lba and Next Writeable Address of a track from media.
@ -1313,25 +1293,20 @@ off_t burn_disc_available_space(struct burn_drive *d,
/** Tells the MMC Profile identifier of the loaded media. The drive must be
grabbed in order to get a non-zero result.
libburn currently writes only to profiles
0x09 "CD-R"
0x0a "CD-RW"
0x11 "DVD-R sequential recording"
0x12 "DVD-RAM"
0x13 "DVD-RW restricted overwrite"
0x14 "DVD-RW sequential recording",
0x15 "DVD-R/DL sequential recording",
0x1a "DVD+RW"
0x1b "DVD+R",
0x09 "CD-R", 0x0a "CD-RW",
0x11 "DVD-R sequential recording", 0x12 "DVD-RAM",
0x13 "DVD-RW restricted overwrite", 0x14 "DVD-RW sequential recording",
0x1a "DVD+RW", 0x1b "DVD+R",
0x2b "DVD+R/DL",
0x41 "BD-R sequential recording",
0x43 "BD-RE",
0x41 "BD-R sequential recording", 0x43 "BD-RE",
0xffff "stdio file"
Note: 0xffff is not a MMC profile but a libburn invention.
If enabled by burn_allow_untested_profiles() it also writes to profiles
0x15 "DVD-R/DL sequential recording",
Read-only are the profiles
0x08 "CD-ROM",
0x10 "DVD-ROM",
0x08 "CD-ROM", 0x10 "DVD-ROM",
0x40 "BD-ROM",
Read-only for now is this BD-R profile (testers wanted)
For now read-only is BD-R profile (testers wanted)
0x42 "BD-R random recording"
@param d The drive where the media is inserted.
@param pno Profile Number. See also mmc5r03c.pdf, table 89
@ -1448,8 +1423,6 @@ void burn_read_opts_free(struct burn_read_opts *opts);
cancellable, as control of the operation is passed wholly to the drive and
there is no way to interrupt it safely.
@param drive The drive with which to erase a disc.
Only drive roles 1 (MMC) and 5 (stdio random write-only)
support erasing.
@param fast Nonzero to do a fast erase, where only the disc's headers are
erased; zero to erase the entire disc.
With DVD-RW, fast blanking yields media capable only of DAO.
@ -1909,41 +1882,6 @@ int burn_os_free_buffer(void *buffer, size_t amount, int flag);
struct burn_source *burn_fd_source_new(int datafd, int subfd, off_t size);
/* ts B00922 */
/** Creates an offset source which shall provide a byte interval of a stream
to its consumer. It is supposed to be chain-linked with other offset
sources which serve neighboring consumers. The chronological sequence
of consumers and the sequence of offset sources must match. The intervals
of the sources must not overlap.
A chain of these burn_source objects may be used to feed multiple tracks
from one single stream of input bytes.
Each of the offset sources will skip the bytes up to its start address and
provide the prescribed number of bytes to the track. Skipping takes into
respect the bytes which have been processed by eventual predecessors in the
chain.
Important: It is not allowed to free an offset source before its successor
has ended its work. Best is to keep them all until all tracks
are done.
@param inp The burn_source object from which to read stream data.
E.g. created by burn_file_source_new().
@param prev The eventual offset source object which shall read data from
inp before the new offset source will begin its own work.
This must either be a result of burn_offst_source_new() or
it must be NULL.
@param start The byte address where to start reading bytes for the
consumer. inp bytes may get skipped to reach this address.
@param size The number of bytes to be delivered to the consumer.
@param flag Bitfield for control purposes (unused yet, submit 0).
@return Pointer to a burn_source object, later to be freed by
burn_source_free(). NULL indicates failure.
@since 0.8.8
*/
struct burn_source *burn_offst_source_new(
struct burn_source *inp, struct burn_source *prev,
off_t start, off_t size, int flag);
/* ts A70930 */
/** Creates a fifo which acts as proxy for an already existing data source.
The fifo provides a ring buffer which shall smoothen the data stream
@ -2253,10 +2191,6 @@ void burn_write_opts_set_mediacatalog(struct burn_write_opts *opts, unsigned cha
/* ts A61106 */
/** Sets the multi flag which eventually marks the emerging session as not
being the last one and thus creating a BURN_DISC_APPENDABLE media.
Note: DVD-R[W] in write mode BURN_WRITE_SAO are not capable of this.
DVD-R DL are not capable of this at all.
libburn will refuse to write if burn_write_opts_set_multi() is
enabled under such conditions.
@param opts The option object to be manipulated
@param multi 1=media will be appendable, 0=media will be closed (default)
@since 0.2.6
@ -2692,9 +2626,9 @@ void burn_version(int *major, int *minor, int *micro);
}
*/
#define burn_header_version_major 1
#define burn_header_version_minor 0
#define burn_header_version_micro 6
#define burn_header_version_major 0
#define burn_header_version_minor 8
#define burn_header_version_micro 2
/** Note:
Above version numbers are also recorded in configure.ac because libtool
wants them as parameters at build time.
@ -2748,8 +2682,8 @@ These two advises are mutually exclusive.
/** Obtain the id string of the SCSI transport interface.
This interface may be a system specific adapter module of libburn or
an adapter to a supporting library like libcdio.
@param flag Bitfield for control puposes, submit 0 for now
@return A pointer to the id string. Do not alter the string content.
@flag Bitfield for control puposes, submit 0 for now
@return A pointer to the id string. Do not alter the string content.
@since 0.7.6
*/
char *burn_scsi_transport_id(int flag);
@ -2782,7 +2716,7 @@ int burn_msgs_set_severities(char *queue_severity,
"DEBUG", "ALL".
To call with minimum_severity "NEVER" will discard the
whole queue.
@param error_code Will become a unique error code as listed in
@param error_code Will become a unique error code as liste in
libburn/libdax_msgs.h
@param msg_text Must provide at least BURN_MSGS_MESSAGE_LEN bytes.
@param os_errno Will become the eventual errno related to the message
@ -2877,7 +2811,7 @@ typedef int (*burn_abort_handler_t)(void *handle, int signum, int flag);
But during burn_disc_write() onto real CD or DVD, FreeBSD 8.0 pauses the
other threads until the signal handler returns.
The new actions try to avoid this deadlock. It is advised to use action 3
at least during burn_disc_write(), burn_disc_erase(), burn_disc_format():
at least during burn_disc_write(), burn_disc_rease(), burn_disc_format():
burn_set_signal_handling(text, NULL, 0x30);
and to call burn_is_aborting(0) when the drive is BURN_DRIVE_IDLE.
If burn_is_aborting(0) returns 1, then call burn_abort() and exit(1).
@ -2998,20 +2932,15 @@ int burn_get_read_capacity(struct burn_drive *d, int *capacity, int flag);
bit0= - reserved -
bit1= do not submit error message if read error
bit2= on error do not try to read a second time
with single block steps.
@since 0.5.2
bit3= return -2 on permission denied error rather than
issueing a warning message.
@since 1.0.6
with single block steps. @since 0.5.2
@return 1=sucessful , <=0 an error occured
with bit3: -2= permission denied error
@since 0.4.0
*/
int burn_read_data(struct burn_drive *d, off_t byte_address,
char data[], off_t data_size, off_t *data_count, int flag);
/* ts A70904 */
/* A70904 */
/** Inquire whether the drive object is a real MMC drive or a pseudo-drive
created by a stdio: address.
@param d The drive to inquire
@ -3019,47 +2948,11 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
1= real MMC drive
2= stdio-drive, random access, read-write
3= stdio-drive, sequential, write-only
4= stdio-drive, random access, read-only
(only if enabled by burn_allow_drive_role_4())
@since 0.4.0
*/
int burn_drive_get_drive_role(struct burn_drive *d);
/* ts B10312 */
/** Allow drive role 4 "random access read-only"
and drive role 5 "random access write-only".
By default a random access file assumes drive role 2 "read-write"
regardless whether it is actually readable or writeable.
If enabled, random-access file objects which recognizably allow no
writing will be classified as role 4 and those which allow no reading
will get role 5.
Candidates are drive addresses of the form stdio:/dev/fd/# , where # is
the integer number of an open file descriptor. If this descriptor was
opened read-only resp. write-only, then it gets role 4 resp. role 5.
Other paths may get tested by an attempt to open them for read-write
(role 2) resp. read-only (role 4) resp. write-only (role 5). See bit1.
@param allowed Bitfield for control purposes:
bit0= Enable roles 4 and 5 for drives which get
aquired after this call
bit1= with bit0:
Test whether the file can be opened for
read-write resp. read-only resp. write-only.
Classify as roles 2 resp. 4 resp. 5.
bit2= with bit0 and bit1:
Classify files which cannot be opened at all
as role 0 : useless dummy.
Else classify as role 2.
bit3= Classify non-empty role 5 drives as
BURN_DISC_APPENDABLE with Next Writeable Address
after the end of the file. It is nevertheless
possible to change this address by call
burn_write_opts_set_start_byte().
@since 1.0.6
*/
void burn_allow_drive_role_4(int allowed);
/* ts A70923 */
/** Find out whether a given address string would lead to the given drive
object. This should be done in advance for track source addresses
@ -3087,110 +2980,6 @@ void burn_allow_drive_role_4(int allowed);
int burn_drive_equals_adr(struct burn_drive *d1, char *adr2, int drive_role2);
/*
Audio track data extraction facility.
*/
/* Maximum size for address paths and fmt_info strings */
#define LIBDAX_AUDIOXTR_STRLEN 4096
/** Extractor object encapsulating intermediate states of extraction.
The clients of libdax_audioxtr shall only allocate pointers to this
struct and get a storage object via libdax_audioxtr_new().
Appropriate initial value for the pointer is NULL.
*/
struct libdax_audioxtr;
/** Open an audio file, check wether suitable, create extractor object.
@param xtr Opaque handle to extractor. Gets attached extractor object.
@param path Address of the audio file to extract. "-" is stdin (but might
be not suitable for all futurely supported formats).
@param flag Bitfield for control purposes (unused yet, submit 0)
@return >0 success
0 unsuitable format
-1 severe error
-2 path not found
@since 0.2.4
*/
int libdax_audioxtr_new(struct libdax_audioxtr **xtr, char *path, int flag);
/** Obtain identification parameters of opened audio source.
@param xtr Opaque handle to extractor
@param fmt Gets pointed to the audio file format id text: ".wav" , ".au"
@param fmt_info Gets pointed to a format info text telling parameters
@param num_channels e.g. 1=mono, 2=stereo, etc
@param sample_rate e.g. 11025, 44100
@param bits_per_sample e.g. 8= 8 bits per sample, 16= 16 bits ...
@param msb_first Byte order of samples: 0=Intel 1=Motorola
@param flag Bitfield for control purposes (unused yet, submit 0)
@return >0 success, <=0 failure
@since 0.2.4
*/
int libdax_audioxtr_get_id(struct libdax_audioxtr *xtr,
char **fmt, char **fmt_info,
int *num_channels, int *sample_rate,
int *bits_per_sample, int *msb_first, int flag);
/** Obtain a prediction about the extracted size based on internal information
of the formatted file.
@param xtr Opaque handle to extractor
@param size Gets filled with the predicted size
@param flag Bitfield for control purposes (unused yet, submit 0)
@return 1 prediction was possible , 0 no prediction could be made
@since 0.2.4
*/
int libdax_audioxtr_get_size(struct libdax_audioxtr *o, off_t *size, int flag);
/** Obtain next buffer full of extracted data in desired format (only raw audio
for now).
@param xtr Opaque handle to extractor
@param buffer Gets filled with extracted data
@param buffer_size Maximum number of bytes to be filled into buffer
@param flag Bitfield for control purposes
bit0= do not stop at predicted end of data
@return >0 number of valid buffer bytes,
0 End of file
-1 operating system reports error
-2 usage error by application
@since 0.2.4
*/
int libdax_audioxtr_read(struct libdax_audioxtr *xtr,
char buffer[], int buffer_size, int flag);
/** Try to obtain a file descriptor which will deliver extracted data
to normal calls of read(2). This may fail because the format is
unsuitable for that, but ".wav" is ok. If this call succeeds the xtr
object will have forgotten its file descriptor and libdax_audioxtr_read()
will return a usage error. One may use *fd after libdax_audioxtr_destroy()
and will have to close it via close(2) when done with it.
@param xtr Opaque handle to extractor
@param fd Eventually returns the file descriptor number
@param flag Bitfield for control purposes
bit0= do not dup(2) and close(2) but hand out original fd
@return 1 success, 0 cannot hand out fd , -1 severe error
@since 0.2.4
*/
int libdax_audioxtr_detach_fd(struct libdax_audioxtr *o, int *fd, int flag);
/** Clean up after extraction and destroy extractor object.
@param xtr Opaque handle to extractor, *xtr is allowed to be NULL,
*xtr is set to NULL by this function
@param flag Bitfield for control purposes (unused yet, submit 0)
@return 1 = destroyed object, 0 = was already destroyed
@since 0.2.4
*/
int libdax_audioxtr_destroy(struct libdax_audioxtr **xtr, int flag);
#ifndef DOXYGEN
BURN_END_DECLS

View File

@ -1,168 +0,0 @@
LIBBURN4 {
global:
burn_abort;
burn_abort_pacifier;
burn_allow_drive_role_4;
burn_allow_untested_profiles;
burn_disc_add_session;
burn_disc_available_space;
burn_disc_create;
burn_disc_erasable;
burn_disc_erase;
burn_disc_format;
burn_disc_free;
burn_disc_free_multi_caps;
burn_disc_get_bd_spare_info;
burn_disc_get_cd_info;
burn_disc_get_format_descr;
burn_disc_get_formats;
burn_disc_get_media_id;
burn_disc_get_msc1;
burn_disc_get_multi_caps;
burn_disc_get_profile;
burn_disc_get_sectors;
burn_disc_get_sessions;
burn_disc_get_status;
burn_disc_pretend_blank;
burn_disc_pretend_full;
burn_disc_read;
burn_disc_read_atip;
burn_disc_remove_session;
burn_disc_track_lba_nwa;
burn_disc_write;
burn_drive_add_whitelist;
burn_drive_cancel;
burn_drive_clear_whitelist;
burn_drive_convert_fs_adr;
burn_drive_convert_scsi_adr;
burn_drive_d_get_adr;
burn_drive_equals_adr;
burn_drive_free_speedlist;
burn_drive_get_adr;
burn_drive_get_all_profiles;
burn_drive_get_best_speed;
burn_drive_get_disc;
burn_drive_get_drive_role;
burn_drive_get_min_write_speed;
burn_drive_get_read_speed;
burn_drive_get_speedlist;
burn_drive_get_start_end_lba;
burn_drive_get_status;
burn_drive_get_write_speed;
burn_drive_grab;
burn_drive_info_forget;
burn_drive_info_free;
burn_drive_is_enumerable_adr;
burn_drive_leave_locked;
burn_drive_obtain_scsi_adr;
burn_drive_probe_cd_write_modes;
burn_drive_release;
burn_drive_scan;
burn_drive_scan_and_grab;
burn_drive_set_buffer_waiting;
burn_drive_set_speed;
burn_drive_set_stream_recording;
burn_drive_snooze;
burn_drive_wrote_well;
burn_fd_source_new;
burn_fifo_fill;
burn_fifo_get_statistics;
burn_fifo_inquire_status;
burn_fifo_next_interval;
burn_fifo_peek_data;
burn_fifo_source_new;
burn_file_source_new;
burn_finish;
burn_get_read_capacity;
burn_guess_cd_manufacturer;
burn_guess_manufacturer;
burn_initialize;
burn_is_aborting;
burn_lba_to_msf;
burn_msf_to_lba;
burn_msf_to_sectors;
burn_msgs_obtain;
burn_msgs_set_severities;
burn_msgs_submit;
burn_obtain_profile_name;
burn_offst_source_new;
burn_os_alloc_buffer;
burn_os_free_buffer;
burn_os_open_track_src;
burn_precheck_write;
burn_preset_device_open;
burn_random_access_write;
burn_read_data;
burn_read_opts_free;
burn_read_opts_new;
burn_read_opts_read_subcodes_audio;
burn_read_opts_read_subcodes_data;
burn_read_opts_report_recovered_errors;
burn_read_opts_set_c2errors;
burn_read_opts_set_hardware_error_recovery;
burn_read_opts_set_hardware_error_retries;
burn_read_opts_set_raw;
burn_read_opts_transfer_damaged_blocks;
burn_scsi_transport_id;
burn_sectors_to_msf;
burn_session_add_track;
burn_session_create;
burn_session_free;
burn_session_get_hidefirst;
burn_session_get_leadout_entry;
burn_session_get_sectors;
burn_session_get_tracks;
burn_session_hide_first_track;
burn_session_remove_track;
burn_set_messenger;
burn_set_scsi_logging;
burn_set_signal_handling;
burn_set_verbosity;
burn_sev_to_text;
burn_source_free;
burn_structure_print_disc;
burn_structure_print_session;
burn_structure_print_track;
burn_text_to_sev;
burn_track_clear_isrc;
burn_track_create;
burn_track_define_data;
burn_track_free;
burn_track_get_counters;
burn_track_get_entry;
burn_track_get_mode;
burn_track_get_sectors;
burn_track_set_byte_swap;
burn_track_set_cdxa_conv;
burn_track_set_default_size;
burn_track_set_isrc;
burn_track_set_size;
burn_track_set_source;
burn_version;
burn_write_opts_auto_write_type;
burn_write_opts_free;
burn_write_opts_get_drive;
burn_write_opts_new;
burn_write_opts_set_dvd_obs;
burn_write_opts_set_fillup;
burn_write_opts_set_force;
burn_write_opts_set_format;
burn_write_opts_set_has_mediacatalog;
burn_write_opts_set_mediacatalog;
burn_write_opts_set_multi;
burn_write_opts_set_perform_opc;
burn_write_opts_set_simulate;
burn_write_opts_set_start_byte;
burn_write_opts_set_stdio_fsync;
burn_write_opts_set_stream_recording;
burn_write_opts_set_toc_entries;
burn_write_opts_set_underrun_proof;
burn_write_opts_set_write_type;
libdax_audioxtr_destroy;
libdax_audioxtr_detach_fd;
libdax_audioxtr_get_id;
libdax_audioxtr_get_size;
libdax_audioxtr_new;
libdax_audioxtr_read;
local: *;
};

View File

@ -25,8 +25,7 @@ extern struct libdax_msgs *libdax_messenger;
/* Only this single source module is entitled to do this */
#define LIBDAX_AUDIOXTR_H_INTERNAL 1
/* All clients of the extraction facility must do this or include libburn.h */
#define LIBDAX_AUDIOXTR_H_PUBLIC 1
/* All clients of the extraction facility must do this */
#include "libdax_audioxtr.h"
@ -35,7 +34,7 @@ int libdax_audioxtr_new(struct libdax_audioxtr **xtr, char *path, int flag)
int ret= -1;
struct libdax_audioxtr *o;
o= *xtr= (struct libdax_audioxtr *) calloc(1, sizeof(struct libdax_audioxtr));
o= *xtr= (struct libdax_audioxtr *) malloc(sizeof(struct libdax_audioxtr));
if(o==NULL)
return(-1);
strncpy(o->path,path,LIBDAX_AUDIOXTR_STRLEN-1);

View File

@ -7,13 +7,6 @@
#ifndef LIBDAX_AUDIOXTR_H_INCLUDED
#define LIBDAX_AUDIOXTR_H_INCLUDED 1
/* Normally this public API is defined in <libburn/libburn.h>
Macro LIBDAX_AUDIOXTR_H_PUBLIC enables the definition for programs
which only include this file.
*/
#ifdef LIBDAX_AUDIOXTR_H_PUBLIC
/* Public Macros */
/* Maximum size for address paths and fmt_info strings */
@ -117,16 +110,15 @@ int libdax_audioxtr_detach_fd(struct libdax_audioxtr *o, int *fd, int flag);
*/
int libdax_audioxtr_destroy(struct libdax_audioxtr **xtr, int flag);
#endif /* LIBDAX_AUDIOXTR_H_PUBLIC */
#ifdef LIBDAX_AUDIOXTR________________
#ifdef LIDBAX_AUDIOXTR________________
-- place documentation text here ---
#endif /* LIBDAX_AUDIOXTR_________________ */
#endif /* LIDBAX_AUDIOXTR_________________ */

View File

@ -37,7 +37,7 @@ static int libdax_msgs_item_new(struct libdax_msgs_item **item,
struct timezone tz;
(*item)= o=
(struct libdax_msgs_item *) calloc(1, sizeof(struct libdax_msgs_item));
(struct libdax_msgs_item *) malloc(sizeof(struct libdax_msgs_item));
if(o==NULL)
return(-1);
o->timestamp= 0.0;
@ -140,7 +140,7 @@ int libdax_msgs_new(struct libdax_msgs **m, int flag)
{
struct libdax_msgs *o;
(*m)= o= (struct libdax_msgs *) calloc(1, sizeof(struct libdax_msgs));
(*m)= o= (struct libdax_msgs *) malloc(sizeof(struct libdax_msgs));
if(o==NULL)
return(-1);
o->refcount= 1;
@ -370,7 +370,7 @@ int libdax_msgs_submit(struct libdax_msgs *m, int origin, int error_code,
item->severity= severity;
item->priority= priority;
if(msg_text!=NULL) {
item->msg_text= calloc(1, strlen(msg_text)+1);
item->msg_text= malloc(strlen(msg_text)+1);
if(item->msg_text==NULL)
goto failed;
strcpy(item->msg_text,msg_text);

View File

@ -395,7 +395,7 @@ int libdax_msgs_item_get_rank(struct libdax_msgs_item *item,
int *severity, int *priority, int flag);
#ifdef LIBDAX_MSGS_________________
#ifdef LIDBAX_MSGS_________________
/* Registered Error Codes */
@ -519,7 +519,7 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
0x0002014d (SORRY,HIGH) = Asynchromous SCSI error
0x0002014f (SORRY,HIGH) = Timeout with asynchromous SCSI command
0x00020150 (DEBUG,LOW) = Reporting asynchronous waiting time
0x00020151 (FAILURE,HIGH) = Read attempt on write-only drive
0x00020151 (FATAL,HIGH) = Read attempt on write-only drive
0x00020152 (FATAL,HIGH) = Cannot start fifo thread
0x00020153 (SORRY,HIGH) = Read error on fifo input
0x00020154 (NOTE,HIGH) = Forwarded input error ends output
@ -558,17 +558,7 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
0x00020176 (NOTE,HIGH) = Stream recording disabled because of small OS buffer
0x00020177 (ABORT,HIGH) = Urged drive worker threads to do emergency halt
0x00020178 (DEBUG,HIGH) = Write thread ended
0x00020179 (FAILURE,HIGH) = Offset source start address is before end of previous source
0x0002017a (FAILURE,HIGH) = Expected offset source object as parameter
0x0002017b (WARNING,HIGH) = Sequential BD-R media likely to soon fail writing
0x0002017c (FAILURE,HIGH) = No valid write type selected
0x0002017d (FATAL,HIGH) = Invalid file descriptor with stdio pseudo-drive
0x0002017e (FAILURE,HIGH) = Failed to close track, session, or disc
0x0002017f (FAILURE,HIGH) = Failed to synchronize drive cache
0x00020180 (FAILURE,HIGH) = Premature end of input encountered
0x00020181 (FAILURE,HIGH) = Pseudo-drive is a read-only file. Cannot write.
0x00020182 (FAILURE,HIGH) = Cannot truncate disk file for pseudo blanking
0x00020183 (WARNING,HIGH) = Failed to open device (a pseudo-drive) for reading
libdax_audioxtr:
0x00020200 (SORRY,HIGH) = Cannot open audio source file
@ -689,7 +679,7 @@ Range "libisoburn" : 0x00060000 to 0x00006ffff
------------------------------------------------------------------------------
#endif /* LIBDAX_MSGS_________________ */
#endif /* LIDBAX_MSGS_________________ */

View File

@ -347,10 +347,9 @@ int mmc_reserve_track(struct burn_drive *d, off_t size)
memcpy(c.opcode, MMC_RESERVE_TRACK, sizeof(MMC_RESERVE_TRACK));
*/
c.retry = 1;
lba = size / 2048;
if (size % 2048)
lba++;
/* Round to 32 KiB and divide by 2048
(by nice binary rounding trick learned from dvd+rw-tools) */
lba = ((size + (off_t) 0x7fff) >> 11) & ~0xf;
mmc_int_to_four_char(c.opcode+5, lba);
sprintf(msg, "reserving track of %d blocks", lba);
@ -522,8 +521,6 @@ void mmc_close_session(struct burn_write_opts *o)
void mmc_close(struct burn_drive *d, int session, int track)
{
struct command c;
char msg[256];
int key, asc, ascq;
if (mmc_function_spy(d, "mmc_close") <= 0)
return;
@ -547,16 +544,6 @@ void mmc_close(struct burn_drive *d, int session, int track)
/* ts A70918 : Immed : wait for drive to complete command */
if (c.error) {
sprintf(msg, "Failed to close %s (%d)",
session > 1 ? "disc" : session > 0 ? "session" : "track",
((session & 3) << 1) | !!track);
sprintf(msg + strlen(msg), ". SCSI error : ");
scsi_error_msg(d, c.sense, 14, msg + strlen(msg),
&key, &asc, &ascq);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x0002017e,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
msg, 0, 0);
d->cancel = 1;
return;
}
@ -826,7 +813,7 @@ int mmc_write(struct burn_drive *d, int start, struct buffer *buf)
{
int cancelled;
struct command c;
int len, key, asc, ascq;
int len;
#ifdef Libburn_log_in_and_out_streaM
/* <<< ts A61031 */
@ -905,20 +892,33 @@ int mmc_write(struct burn_drive *d, int start, struct buffer *buf)
d->pbf_altered = 1;
/* ts A61112 : react on eventual error condition */
spc_decode_sense(c.sense, 0, &key, &asc, &ascq);
if (c.error && key != 0) {
if (c.error && c.sense[2]!=0) {
/* >>> make this scsi_notify_error() when liberated */
char msg[256];
int key, asc, ascq;
if (c.sense[2]!=0) {
sprintf(msg, "SCSI error on write(%d,%d): ", start, len);
scsi_error_msg(d, c.sense, 14, msg + strlen(msg),
#ifdef NIX
char msg[160];
sprintf(msg,
"SCSI error on write(%d,%d): key=%X asc=%2.2Xh ascq=%2.2Xh",
start, len,
c.sense[2],c.sense[12],c.sense[13]);
#else /* NIX */
char msg[256];
int key, asc, ascq;
sprintf(msg, "SCSI error on write(%d,%d): ",
start, len);
scsi_error_msg(d, c.sense, 14, msg + strlen(msg),
&key, &asc, &ascq);
libdax_msgs_submit(libdax_messenger, d->global_index,
#endif /* !NIX */
libdax_msgs_submit(libdax_messenger, d->global_index,
0x0002011d,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
msg, 0, 0);
}
d->cancel = 1;
return BE_CANCELLED;
}
@ -1165,7 +1165,7 @@ int mmc_fake_toc(struct burn_drive *d)
if (d->disc == NULL)
return -1;
d->toc_entries = d->last_track_no + d->complete_sessions;
d->toc_entry = calloc(d->toc_entries, sizeof(struct burn_toc_entry));
d->toc_entry = malloc(d->toc_entries * sizeof(struct burn_toc_entry));
if (d->toc_entry == NULL)
return -1;
memset(d->toc_entry, 0,d->toc_entries * sizeof(struct burn_toc_entry));
@ -1757,6 +1757,12 @@ static int mmc_read_disc_info_al(struct burn_drive *d, int *alloc_len)
d->erasable = 0; /* never erasable */
}
/* ts A80207 : DVD - R DL can normally be read but not be written */
if(d->current_profile == 0x15 && !burn_support_untested_profiles) {
disc_status = 2; /* always full and finalized */
d->erasable = 0; /* never erasable */
}
#ifdef Libburn_support_bd_r_readonlY
/* <<< For now: declaring BD-R read-only
*/
@ -2328,8 +2334,7 @@ int mmc_set_streaming(struct burn_drive *d,
d->issue_command(d, &c);
if (c.error) {
spc_decode_sense(c.sense, 0, &key, &asc, &ascq);
if (key != 0 && !d->silent_on_scsi_error) {
if (c.sense[2]!=0 && !d->silent_on_scsi_error) {
sprintf(msg,
"SCSI error on set_streaming(%d): ", w_speed);
scsi_error_msg(d, c.sense, 14, msg + strlen(msg),
@ -2409,7 +2414,7 @@ static int mmc_get_configuration_al(struct burn_drive *d, int *alloc_len)
{
struct buffer buf;
int len, cp, descr_len = 0, feature_code, prf_number, only_current = 1;
int old_alloc_len, only_current_profile = 0, key, asc, ascq;
int old_alloc_len, only_current_profile = 0;
unsigned char *descr, *prf, *up_to, *prf_end;
struct command c;
int phys_if_std = 0;
@ -2444,7 +2449,6 @@ static int mmc_get_configuration_al(struct burn_drive *d, int *alloc_len)
#ifdef Libisofs_simulate_old_mmc1_drivE
c.error = 1;
c.sense[0] = 0x70; /* Fixed format sense data */
c.sense[2] = 0x5;
c.sense[12] = 0x20;
c.sense[13] = 0x0;
@ -2452,8 +2456,8 @@ static int mmc_get_configuration_al(struct burn_drive *d, int *alloc_len)
if (c.error) {
/* ts A90603 : MMC-1 drive do not know 46h GET CONFIGURATION */
spc_decode_sense(c.sense, 0, &key, &asc, &ascq);
if (key == 0x5 && asc == 0x20 && ascq == 0x0) {
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 */
@ -2524,7 +2528,8 @@ static int mmc_get_configuration_al(struct burn_drive *d, int *alloc_len)
#ifdef Libburn_support_dvd_r_seQ
if (cp == 0x11 || cp == 0x14) /* DVD-R, DVD-RW */
d->current_is_supported_profile = 1;
if (cp == 0x15) /* DVD-R/DL */
if (cp == 0x15) /* DVD-R/DL . */
/* Writeable only if burn_support_untested_profiles */
d->current_is_supported_profile = 1;
#endif
#ifdef Libburn_support_dvd_plus_R
@ -2911,8 +2916,6 @@ int mmc_read_format_capacities(struct burn_drive *d, int top_wanted)
void mmc_sync_cache(struct burn_drive *d)
{
struct command c;
char msg[256];
int key, asc, ascq;
if (mmc_function_spy(d, "mmc_sync_cache") <= 0)
return;
@ -2948,14 +2951,6 @@ void mmc_sync_cache(struct burn_drive *d)
/* ts A70918 */
if (c.error) {
sprintf(msg, "Failed to synchronize drive cache");
sprintf(msg + strlen(msg), ". SCSI error : ");
scsi_error_msg(d, c.sense, 14, msg + strlen(msg),
&key, &asc, &ascq);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x0002017f,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
msg, 0, 0);
d->cancel = 1;
return;
}
@ -3114,23 +3109,12 @@ selected_not_suitable:;
c.page->data[9 + i] =
( d->format_descriptors[index].tdp >>
(16 - 8 * i)) & 0xff;
if (format_type == 0x30 || format_type == 0x31) {
format_sub_type = 0;
if (flag & 64) {
if (d->current_feat23h_byte4 & 2)
/* Quick certification */
format_sub_type = 3;
} else {
if (d->current_feat23h_byte4 & 1)
/* Full certification */
format_sub_type = 2;
}
} else if (format_type == 0x32 ||
(format_type == 0x00 && d->current_profile == 0x41)) {
if (flag & (1 << 16))
format_sub_type = 0; /* SRM + POW */
if (format_type == 0x30 || format_type == 0x31 ||
format_type == 0x32) {
if (flag & 64)
format_sub_type = 3; /* Quick certification */
else
format_sub_type = 1; /* SRM (- POW) */
format_sub_type = 2; /* Full certification */
}
if (d->current_profile == 0x12 && format_type !=0x01 &&
(flag & 64)) {
@ -3624,11 +3608,24 @@ unsuitable_media:;
d->issue_command(d, &c);
if (c.error && !tolerate_failure) {
spc_decode_sense(c.sense, 0, &key, &asc, &ascq);
if (key != 0) {
if (c.sense[2]!=0) {
#ifdef NIX
sprintf(msg,
"SCSI error on format_unit(%s): key=%X asc=%2.2Xh ascq=%2.2Xh",
descr,
c.sense[2],c.sense[12],c.sense[13]);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020122,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
msg, 0, 0);
#else /* NIX */
sprintf(msg, "SCSI error on format_unit(%s): ", descr);
scsi_error_msg(d, c.sense, 14, msg + strlen(msg),
&key, &asc, &ascq);
#endif /* !NIX */
}
return 0;
} else if ((!c.error) && (format_type == 0x13 || format_type == 0x15))
@ -3698,7 +3695,6 @@ static int mmc_get_write_performance_al(struct burn_drive *d,
#ifdef Libisofs_simulate_old_mmc1_drivE
c.error = 1;
c.sense[0] = 0x70; /* Fixed format sense data */
c.sense[2] = 0x5;
c.sense[12] = 0x20;
c.sense[13] = 0x0;
@ -3910,11 +3906,6 @@ int mmc_compose_mode_page_5(struct burn_drive *d,
pd[4] = spc_block_type(o->block_type);
/*
fprintf(stderr, "libburn_EXPERIMENTAL: block_type = %d, pd[4]= %u\n",
o->block_type, (unsigned int) pd[4]);
*/
/* ts A61104 */
if(!(o->control&4)) /* audio (MMC-1 table 61) */
if(o->write_type == BURN_WRITE_TAO)
@ -3935,13 +3926,11 @@ fprintf(stderr, "libburn_EXPERIMENTAL: block_type = %d, pd[4]= %u\n",
int mmc_read_10(struct burn_drive *d, int start,int amount, struct buffer *buf)
{
struct command c;
char msg[256];
int key, asc, ascq;
mmc_start_if_needed(d, 0);
if (mmc_function_spy(d, "mmc_read_10") <= 0)
return -1;
;
if (amount > BUFFER_SIZE / 2048)
return -1;
@ -3957,9 +3946,24 @@ int mmc_read_10(struct burn_drive *d, int start,int amount, struct buffer *buf)
c.dir = FROM_DRIVE;
d->issue_command(d, &c);
if (c.error) {
#ifdef NIX
char msg[160];
sprintf(msg,
"SCSI error on read_10(%d,%d): key=%X asc=%2.2Xh ascq=%2.2Xh",
start, amount,
c.sense[2],c.sense[12],c.sense[13]);
#else /* NIX */
char msg[256];
int key, asc, ascq;
sprintf(msg, "SCSI error on read_10(%d,%d): ", start, amount);
scsi_error_msg(d, c.sense, 14, msg + strlen(msg),
&key, &asc, &ascq);
#endif /* !NIX */
if(!d->silent_on_scsi_error)
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020144,
@ -4166,7 +4170,7 @@ static int mmc_set_product_id(char *reply,
/* ts A90903 */
/* MMC backend of API call burn_disc_get_media_id()
/* MMC backend of API call burn_get_media_product_id()
See also doc/mediainfo.txt
@param flag Bitfield for control purposes
bit0= do not escape " _/" (not suitable for
@ -4353,33 +4357,6 @@ ex:;
}
/* ts B00924
MMC-5, 6.23.3.3.4 Format Code 0Ah: Spare Area Information
*/
int mmc_get_bd_spare_info(struct burn_drive *d,
int *alloc_blocks, int *free_blocks, int flag)
{
int ret, reply_len, prf;
char *reply = NULL;
prf = d->current_profile;
if (!(prf == 0x41 || prf == 0x43 || prf == 0x42))
return 0; /* Not a BD loaded */
ret = mmc_read_disc_structure(d, 1, 0, 0x0a, 12, &reply,
&reply_len, 0);
if (ret <= 0)
goto ex;
*alloc_blocks = mmc_four_char_to_int((unsigned char *) reply + 8);
*free_blocks = mmc_four_char_to_int((unsigned char *) reply + 4);
ret = 1;
ex:;
if (reply != NULL)
free(reply);
return ret;
}
/* ts A61021 : the mmc specific part of sg.c:enumerate_common()
*/
int mmc_setup_drive(struct burn_drive *d)

View File

@ -106,8 +106,5 @@ int mmc_function_spy(struct burn_drive *d, char * text);
/* ts A91118 */
int mmc_start_if_needed(struct burn_drive *d, int flag);
/* ts B00924 */
int mmc_get_bd_spare_info(struct burn_drive *d,
int *alloc_blocks, int *free_blocks, int flag);
#endif /*__MMC*/

View File

@ -24,7 +24,7 @@ struct burn_source *burn_null_source_new(void)
{
struct burn_source *src;
src = calloc(1, sizeof(struct burn_source));
src = malloc(sizeof(struct burn_source));
src->refcount = 1;
src->read = null_read;
src->read_sub = NULL;

View File

@ -27,7 +27,7 @@ struct burn_write_opts *burn_write_opts_new(struct burn_drive *drive)
{
struct burn_write_opts *opts;
opts = calloc(1, sizeof(struct burn_write_opts));
opts = malloc(sizeof(struct burn_write_opts));
if (opts == NULL) {
libdax_msgs_submit(libdax_messenger, -1, 0x00020111,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
@ -68,7 +68,7 @@ struct burn_read_opts *burn_read_opts_new(struct burn_drive *drive)
{
struct burn_read_opts *opts;
opts = calloc(1, sizeof(struct burn_read_opts));
opts = malloc(sizeof(struct burn_read_opts));
opts->drive = drive;
opts->refcount = 1;
opts->raw = 0;
@ -125,7 +125,7 @@ void burn_write_opts_set_toc_entries(struct burn_write_opts *opts, int count,
struct burn_toc_entry *toc_entries)
{
opts->toc_entries = count;
opts->toc_entry = calloc(count, sizeof(struct burn_toc_entry));
opts->toc_entry = malloc(count * sizeof(struct burn_toc_entry));
memcpy(opts->toc_entry, &toc_entries,
sizeof(struct burn_toc_entry) * count);
}

View File

@ -29,37 +29,12 @@
/* The number of above list items */
#define BURN_OS_SIGNAL_COUNT 16
/** The list of all signals which shall surely not be caught.
It depends on the particular signal whether it can be ignored or whether
it will lead to sudden death of the process.
Some signals are not POSIX,
but nevertheless ought to be ignored if they are defined.
*/
#ifdef SIGWINCH
#define BURN_OS_SIG_WINCH ,SIGWINCH
#define BURN_OS_SIG_WINCH_CNT 1
#else
#define BURN_OS_SIG_WINCH
#define BURN_OS_SIG_WINCH_CNT 0
#endif
#ifdef SIGURG
#define BURN_OS_SIG_URG ,SIGURG
#define BURN_OS_SIG_URG_CNT 1
#else
#define BURN_OS_SIG_URG
#define BURN_OS_SIG_URG_CNT 0
#endif
/** The combined list of all signals which shall not be caught.
*/
/** To list all signals which shall surely not be caught */
#define BURN_OS_NON_SIGNAL_MACRO_LIST \
SIGKILL, SIGCHLD, SIGSTOP BURN_OS_SIG_WINCH BURN_OS_SIG_URG
SIGKILL, SIGCHLD, SIGSTOP
/* The number of above list items */
#define BURN_OS_NON_SIGNAL_COUNT \
( 3 + BURN_OS_SIG_WINCH_CNT + BURN_OS_SIG_URG_CNT )
#define BURN_OS_NON_SIGNAL_COUNT 3
/* The maximum size for a (SCSI) i/o transaction */

View File

@ -4,8 +4,7 @@
by os.h in case of compilation for
FreeBSD with CAM
Copyright (C) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>,
provided under GPLv2+
Copyright (C) 2006 Thomas Schmitt <scdbackup@gmx.net>, provided under GPLv2+
*/
/** List of all signals which shall be caught by signal handlers and trigger
@ -42,11 +41,7 @@ SIGKILL, SIGCHLD, SIGSTOP, SIGURG, SIGWINCH
/* The maximum size for a (SCSI) i/o transaction */
/* Important : MUST be at least 32768 ! */
/* Older BSD info says that 32 kB is maximum. But 64 kB seems to work well
on 8-STABLE. It is by default only used with BD in streaming mode.
So older systems should still be quite safe with this buffer max size.
*/
#define BURN_OS_TRANSPORT_BUFFER_SIZE 65536
#define BURN_OS_TRANSPORT_BUFFER_SIZE 32768
/** To hold all state information of BSD device enumeration

View File

@ -29,49 +29,26 @@
/* The number of above list items */
#define BURN_OS_SIGNAL_COUNT 16
/** The list of all signals which shall surely not be caught.
It depends on the particular signal whether it can be ignored or whether
it will lead to sudden death of the process.
Some signals are not POSIX,
but nevertheless ought to be ignored if they are defined.
*/
#ifdef SIGWINCH
#define BURN_OS_SIG_WINCH ,SIGWINCH
#define BURN_OS_SIG_WINCH_CNT 1
#else
#define BURN_OS_SIG_WINCH
#define BURN_OS_SIG_WINCH_CNT 0
#endif
#ifdef SIGURG
#define BURN_OS_SIG_URG ,SIGURG
#define BURN_OS_SIG_URG_CNT 1
#else
#define BURN_OS_SIG_URG
#define BURN_OS_SIG_URG_CNT 0
#endif
/** The combined list of all signals which shall not be caught.
*/
/** To list all signals which shall surely not be caught */
#define BURN_OS_NON_SIGNAL_MACRO_LIST \
SIGKILL, SIGCHLD, SIGSTOP BURN_OS_SIG_WINCH BURN_OS_SIG_URG
SIGKILL, SIGCHLD, SIGSTOP
/* The number of above list items */
#define BURN_OS_NON_SIGNAL_COUNT \
( 3 + BURN_OS_SIG_WINCH_CNT + BURN_OS_SIG_URG_CNT )
#define BURN_OS_NON_SIGNAL_COUNT 3
/* The maximum size for a (SCSI) i/o transaction */
/* Important : MUST be at least 32768 ! */
/* My Blu-ray burner LG GGW-H20 writes junk if stream recording is combined
with buffer size 32 kB. So stream recording is allowed only with size 64k.
Older BSD info says that 32 kB is maximum. But 64 kB seems to work well
on 8-STABLE. It is by default only used with BD in streaming mode.
So older systems should still be quite safe with this buffer max size.
This makes it worth to have a special case for GNU/Linux buffer size here.
*/
/* Important : MUST be at least 32768 ! */
#ifdef __linux
#define BURN_OS_TRANSPORT_BUFFER_SIZE 65536
#else
/* (It might be risky to use 64k. FreeBSD is said to can only 32k.) */
#define BURN_OS_TRANSPORT_BUFFER_SIZE 32768
#endif
/* To hold the position of the most recently delivered address from

View File

@ -41,6 +41,8 @@ SIGKILL, SIGCHLD, SIGSTOP, SIGURG, SIGWINCH
/* Important : MUST be at least 32768 ! */
/* My Blu-ray burner LG GGW-H20 writes junk if stream recording is combined
with buffer size 32 kB. So stream recording is allowed only with size 64k.
>>> ??? is 64 kB ok for Solaris uscsi ?
*/
#define BURN_OS_TRANSPORT_BUFFER_SIZE 65536

View File

@ -9,6 +9,9 @@
#include "../config.h"
#endif
/* #include <m alloc.h> ts A61013 : not in GNU/Linux man 3 malloc */
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
@ -373,7 +376,7 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
} else if (d->drive_role == 3) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020151,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
"Read attempt on write-only drive", 0, 0);
return 0;
}
@ -423,35 +426,22 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
d->stdio_fd = fd =
open(d->devname, O_RDONLY | O_LARGEFILE);
if (fd == -1) {
if (errno == EACCES && (flag & 2)) {
if (!(flag & 8))
libdax_msgs_submit(libdax_messenger,
d->global_index, 0x00020183,
LIBDAX_MSGS_SEV_WARNING,
LIBDAX_MSGS_PRIO_HIGH,
"Failed to open device (a pseudo-drive) for reading",
errno, 0);
} else if (errno!= ENOENT || !(flag & 2))
if (errno != ENOENT || !(flag & 2))
libdax_msgs_submit(libdax_messenger,
d->global_index, 0x00020005,
d->global_index,
0x00020005,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
"Failed to open device (a pseudo-drive) for reading",
errno, 0);
ret = 0;
if (errno == EACCES && (flag & 8))
ret= -2;
goto ex;
ret = 0; goto ex;
}
if (lseek(fd, byte_address, SEEK_SET) == -1) {
if (!(flag & 2)) {
sprintf(msg, "Cannot address start byte %.f",
(double) byte_address);
if (!(flag & 2))
libdax_msgs_submit(libdax_messenger,
d->global_index,
0x00020147,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
msg, errno, 0);
}
"Cannot address start byte", errno, 0);
ret = 0; goto ex;
}
}

View File

@ -1,7 +1,7 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2011 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -179,22 +179,10 @@ static void get_bytes(struct burn_track *track, int count, unsigned char *data)
if (!shortage)
goto ex;
/* ts A61031 - B10103 */
/* ts A61031 */
if (shortage >= count)
track->track_data_done = 1;
if (track->end_on_premature_eoi && shortage >= count &&
!track->open_ended) {
char msg[80];
/* Memorize that premature end of input happened */
sprintf(msg,
"Premature end of input encountered. Missing: %d bytes",
shortage);
libdax_msgs_submit(libdax_messenger, -1, 0x00020180,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
msg, 0,0);
track->end_on_premature_eoi = 2;
}
if (track->open_ended || track->end_on_premature_eoi)
if (track->open_ended)
goto ex;
/* If we're still short, and there's a "next" pointer, we pull from that.
@ -700,7 +688,7 @@ int sector_data(struct burn_write_opts *o, struct burn_track *t, int psub)
return 0;
/* ts A61031 */
if ((t->open_ended || t->end_on_premature_eoi) && t->track_data_done) {
if (t->open_ended && t->track_data_done) {
unget_sector(o, t->mode);
return 2;
}

View File

@ -169,10 +169,9 @@ static int sg_init_enumerator(burn_drive_enumerator_t *idx)
idx->ccb.ccb_h.func_code = XPT_DEV_MATCH;
idx->bufsize = sizeof(struct dev_match_result) * 100;
idx->ccb.cdm.match_buf_len = idx->bufsize;
idx->ccb.cdm.matches = (struct dev_match_result *)
calloc(1, idx->bufsize);
idx->ccb.cdm.matches = (struct dev_match_result *)malloc(idx->bufsize);
if (idx->ccb.cdm.matches == NULL) {
warnx("cannot allocate memory for matches");
warnx("can't malloc memory for matches");
close(idx->fd);
return -1;
}

View File

@ -160,15 +160,15 @@ static int sg_init_enumerator(burn_drive_enumerator_t *idx_)
struct burn_drive_enumeration_state *idx;
int bufsize;
idx = calloc(1, sizeof(*idx));
idx = malloc(sizeof(*idx));
if (idx == NULL) {
warnx("cannot allocate memory for enumerator");
warnx("can't malloc memory for enumerator");
return -1;
}
idx->skip_device = 0;
if ((idx->fd = open(XPT_DEVICE, O_RDWR)) == -1) {
warn("could not open %s", XPT_DEVICE);
warn("couldn't open %s", XPT_DEVICE);
free(idx);
idx = NULL;
return -1;
@ -183,9 +183,9 @@ static int sg_init_enumerator(burn_drive_enumerator_t *idx_)
idx->ccb.ccb_h.func_code = XPT_DEV_MATCH;
bufsize = sizeof(struct dev_match_result) * 100;
idx->ccb.cdm.match_buf_len = bufsize;
idx->ccb.cdm.matches = (struct dev_match_result *) calloc(1, bufsize);
idx->ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize);
if (idx->ccb.cdm.matches == NULL) {
warnx("cannot allocate memory for matches");
warnx("can't malloc memory for matches");
close(idx->fd);
free(idx);
return -1;
@ -487,9 +487,9 @@ static void enumerate_common(char *fname, int bus_no, int host_no,
out.close_session = mmc_close_session;
out.close_track_session = mmc_close;
out.read_buffer_capacity = mmc_read_buffer_capacity;
out.idata = calloc(1, sizeof(struct burn_scsi_inquiry_data));
out.idata = malloc(sizeof(struct burn_scsi_inquiry_data));
out.idata->valid = 0;
out.mdata = calloc(1, sizeof(struct scsi_mode_data));
out.mdata = malloc(sizeof(struct scsi_mode_data));
out.mdata->valid = 0;
if (out.idata == NULL || out.mdata == NULL) {
libdax_msgs_submit(libdax_messenger, -1, 0x00020108,
@ -759,15 +759,13 @@ int sg_release(struct burn_drive *d)
int sg_issue_command(struct burn_drive *d, struct command *c)
{
int done = 0, err, sense_len = 0, ret, ignore_error, no_retry = 0, i;
int cam_pass_err_recover = 0, key, asc, ascq, timeout_ms;
int done = 0, err, sense_len = 0, ret, ignore_error, no_retry = 0;
int cam_pass_err_recover = 0;
union ccb *ccb;
char buf[161];
static FILE *fp = NULL;
time_t start_time;
snprintf(buf, sizeof (buf),
"sg_issue_command d->cam=%p d->released=%d",
snprintf(buf, sizeof (buf), "sg_issue_command d->cam=%p d->released=%d",
(void*)d->cam, d->released);
mmc_function_spy(NULL, buf);
@ -856,9 +854,7 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
ccb->csio.dxfer_len = 0;
}
start_time = time(NULL);
timeout_ms = 200000;
for (i = 0; !done; i++) {
do {
memset(c->sense, 0, sizeof(c->sense));
err = cam_send_ccb(d->cam, ccb);
@ -871,9 +867,8 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
if (sense_len > sizeof(c->sense))
sense_len = sizeof(c->sense);
memcpy(c->sense, &ccb->csio.sense_data, sense_len);
spc_decode_sense(c->sense, sense_len,
&key, &asc, &ascq);
if (sense_len >= 14 && cam_pass_err_recover && key)
if (sense_len >= 14 && cam_pass_err_recover &&
(c->sense[2] & 0x0f))
ignore_error = 1;
}
@ -891,7 +886,6 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
fprintf(stderr, "libburn_EXPERIMENTAL: Emulating [2,3A,00] MEDIUM NOT PRESENT\n");
#endif
c->sense[0] = 0x70; /*Fixed format sense data*/
c->sense[2] = 0x02;
c->sense[12] = 0x3A;
c->sense[13] = 0x00;
@ -907,7 +901,6 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
fprintf(stderr, "libburn_EXPERIMENTAL: Emulating [2,04,00] LOGICAL UNIT NOT READY,CAUSE NOT REPORTABLE\n");
#endif
c->sense[0] = 0x70; /*Fixed format sense data*/
c->sense[2] = 0x02;
c->sense[12] = 0x04;
c->sense[13] = 0x00;
@ -921,7 +914,6 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
fprintf(stderr, "libburn_EXPERIMENTAL: Emulating [5,24,00] INVALID FIELD IN CDB\n");
#endif
c->sense[0] = 0x70; /*Fixed format sense data*/
c->sense[2] = 0x05;
c->sense[12] = 0x24;
c->sense[13] = 0x00;
@ -952,26 +944,44 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
fprintf(stderr, "libburn_EXPERIMENTAL: CAM_STATUS= %d .Emulating [2,04,00] LOGICAL UNIT NOT READY,CAUSE NOT REPORTABLE\n", (ccb->ccb_h.status & CAM_STATUS_MASK));
#endif
c->sense[0] = 0x70; /*Fixed format sense data*/
c->sense[2] = 0x02;
c->sense[12] = 0x04;
c->sense[13] = 0x00;
no_retry = 1;
}
/* >>> Need own duration time measurement.
Then remove bit1 from flag.
*/
done = scsi_eval_cmd_outcome(d, c, fp, c->sense,
sense_len, 0, start_time,
timeout_ms, i,
2 | !!ignore_error);
if (no_retry || ignore_error || !c->retry) {
c->error = 1;
{ret = 1; goto ex;}
}
switch (scsi_error(d, c->sense, 0)) {
case RETRY:
done = 0;
if (burn_sg_log_scsi & 3) {
/* >>> Need own duration time
measurement. Then remove bit1 */
scsi_log_err(c, fp, c->sense, 0,
(c->error != 0) | 2);
scsi_log_cmd(c,fp,0);
}
break;
case FAIL:
done = 1;
c->error = 1;
break;
}
} else {
done = 1;
}
} while (!done);
ret = 1;
ex:;
if (c->error)
scsi_notify_error(d, c, c->sense, 18, 0);
if (burn_sg_log_scsi & 3)
/* >>> Need own duration time measurement. Then remove bit1 */
scsi_log_err(c, fp, c->sense, 0, (c->error != 0) | 2);
cam_freeccb(ccb);
return ret;
}
@ -986,10 +996,6 @@ int burn_os_is_2k_seekrw(char *path, int flag)
struct stat stbuf;
char *spt;
int i, e;
#ifdef Libburn_DIOCGMEDIASIZE_ISBLK
int fd;
off_t add_size;
#endif
if (stat(path, &stbuf) == -1)
return 0;
@ -997,22 +1003,6 @@ int burn_os_is_2k_seekrw(char *path, int flag)
return 1;
if (!S_ISCHR(stbuf.st_mode))
return 0;
#ifdef Libburn_DIOCGMEDIASIZE_ISBLK
/* If it throws no error with DIOCGMEDIASIZE then it is a
'block device'
*/
fd = open(path, O_RDONLY);
if (fd == -1)
return 0;
ret = ioctl(fd, DIOCGMEDIASIZE, &add_size);
close(fd);
return 1;
#else /* Libburn_DIOCGMEDIASIZE_ISBLK */
spt = strrchr(path, '/');
if (spt == NULL)
spt = path;
@ -1035,9 +1025,6 @@ int burn_os_is_2k_seekrw(char *path, int flag)
if (strncmp(spt, "fla", e) == 0) /* Flash drive */
return 1;
return 0;
#endif /* ! Libburn_DIOCGMEDIASIZE_ISBLK */
}

View File

@ -429,11 +429,8 @@ int sg_dispose_drive(struct burn_drive *d, int flag)
int sg_give_next_adr(burn_drive_enumerator_t *idx,
char adr[], int adr_size, int initialize)
{
int ret, recursion_count = 0;
int ret, recursion_count = 0, l;
char path[4096];
#ifdef Libburn_is_on_solariS
int l;
#endif
ret = sg_give_next_adr_raw(idx, adr, adr_size, initialize);
if (ret <= 0)
@ -463,12 +460,9 @@ int sg_give_next_adr(burn_drive_enumerator_t *idx,
int scsi_enumerate_drives(void)
{
burn_drive_enumerator_t idx;
int initialize = 1, ret, i_bus_no = -1, recursion_count = 0;
int initialize = 1, ret, i_bus_no = -1, recursion_count = 0, l;
int i_host_no = -1, i_channel_no = -1, i_target_no = -1, i_lun_no = -1;
char buf[4096], target[4096];
#ifdef Libburn_is_on_solariS
int l;
#endif
while(1) {
ret = sg_give_next_adr_raw(&idx, buf, sizeof(buf), initialize);
@ -597,8 +591,7 @@ int sg_release(struct burn_drive *d)
*/
int sg_issue_command(struct burn_drive *d, struct command *c)
{
int sense_valid = 0, i, timeout_ms, no_retry = 0;
int key = 0, asc = 0, ascq = 0, done = 0;
int sense_valid = 0, i, usleep_time, timeout_ms, no_retry = 0;
time_t start_time;
driver_return_code_t i_status;
unsigned int dxfer_len;
@ -643,18 +636,15 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
/* retry-loop */
start_time = time(NULL);
timeout_ms = 200000;
for(i = 0; !done; i++) {
for(i = 0; ; i++) {
i_status = mmc_run_cmd(p_cdio, timeout_ms, &cdb, e_direction,
dxfer_len, c->page->data);
sense_valid = mmc_last_cmd_sense(p_cdio, &sense_pt);
if (sense_valid >= 18) {
if (sense_valid >= 18)
memcpy(c->sense, sense_pt,
sense_valid >= sizeof(c->sense) ?
sizeof(c->sense) : sense_valid );
spc_decode_sense(c->sense, 0, &key, &asc, &ascq);
} else
key = asc = ascq = 0;
if (sense_pt != NULL)
free(sense_pt);
@ -676,25 +666,62 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
}
*/
if ((!sense_valid) || (key == 0 && asc == 0 && ascq == 0)) {
if ((!sense_valid) ||
((c->sense[2] & 0x0f) == 0 && c->sense[12] == 0 &&
c->sense[13] == 0)) {
memset(c->sense, 0, sizeof(c->sense));
if (i_status != 0) { /* set dummy sense */
/*LOGICAL UNIT NOT READY,
CAUSE NOT REPORTABLE*/
c->sense[0] = 0x70; /*Fixed format sense data*/
c->sense[2] = 0x02;
c->sense[12] = 0x04;
no_retry = 1;
}
}
if (i_status != 0 || (key || asc || ascq)) {
done = scsi_eval_cmd_outcome(d, c, fp, c->sense, 18,
0, start_time, timeout_ms, i, 2);
} else
done = 1;
c->sense[2] &= 15;
if (i_status != 0 ||
(c->sense[2] || c->sense[12] || c->sense[13])) {
if (no_retry || !c->retry) {
c->error = 1;
goto ex;
}
switch (scsi_error(d, c->sense, 18)) {
case RETRY:
if (burn_sg_log_scsi & 3) {
/* >>> Need own duration time
measurement. Then remove bit1 */
scsi_log_err(c, fp, c->sense, 0,
(c->error != 0) | 2);
scsi_log_cmd(c,fp,0);
}
break;
case FAIL:
c->error = 1;
goto ex;
}
/*
Calming down retries and breaking up endless cycle
*/
usleep_time = Libburn_sg_libcdio_retry_usleeP +
i * Libburn_sg_libcdio_retry_incR;
if (time(NULL) + usleep_time / 1000000 - start_time >
timeout_ms / 1000 + 1) {
c->error = 1;
goto ex;
}
usleep(usleep_time);
} else
break; /* retry-loop */
} /* end of retry-loop */
ex:;
if (c->error)
scsi_notify_error(d, c, c->sense, 18, 0);
if (burn_sg_log_scsi & 3)
/* >>> Need own duration time measurement. Then remove bit1 */
scsi_log_err(c, fp, c->sense, 0, (c->error != 0) | 2);
return 1;
}

View File

@ -731,6 +731,10 @@ failed:;
}
#define Libburn_drive_new_deaL 1
#ifdef Libburn_drive_new_deaL
/* ts A80731 */
static int is_ata_drive(char *fname)
{
@ -896,12 +900,23 @@ static int is_scsi_drive(char *fname, int *bus_no, int *host_no,
return 1;
}
#endif /* Libburn_drive_new_deaL */
/** Speciality of GNU/Linux: detect non-SCSI ATAPI (EIDE) which will from
then on used used via generic SCSI as is done with (emulated) SCSI drives */
static void ata_enumerate(void)
{
#ifdef Libburn_drive_new_deaL
int ret;
#else
struct hd_driveid tm;
int fd;
#endif
int i;
char fname[10];
@ -923,11 +938,57 @@ static void ata_enumerate(void)
fprintf(stderr, "not in whitelist\n");
continue;
}
#ifdef Libburn_drive_new_deaL
ret = is_ata_drive(fname);
if (ret < 0)
break;
if (ret == 0)
continue;
#else /* Libburn_drive_new_deaL */
fd = sg_open_drive_fd(fname, 1);
if (fd == -1) {
if (linux_ata_enumerate_verbous)
fprintf(stderr,"open failed, errno=%d '%s'\n",
errno, strerror(errno));
continue;
}
/* found a drive */
ioctl(fd, HDIO_GET_IDENTITY, &tm);
/* not atapi */
if (!(tm.config & 0x8000) || (tm.config & 0x4000)) {
if (linux_ata_enumerate_verbous)
fprintf(stderr, "not marked as ATAPI\n");
sg_close_drive_fd(fname, -1, &fd, 0);
continue;
}
/* if SG_IO fails on an atapi device, we should stop trying to
use hd* devices */
if (sgio_test(fd) == -1) {
if (linux_ata_enumerate_verbous)
fprintf(stderr,
"FATAL: sgio_test() failed: errno=%d '%s'\n",
errno, strerror(errno));
sg_close_drive_fd(fname, -1, &fd, 0);
return;
}
if (sg_close_drive_fd(fname, -1, &fd, 1) <= 0) {
if (linux_ata_enumerate_verbous)
fprintf(stderr,
"cannot close properly, errno=%d '%s'\n",
errno, strerror(errno));
continue;
}
#endif /* Libburn_drive_new_deaL */
if (linux_ata_enumerate_verbous)
fprintf(stderr, "accepting as drive without SCSI address\n");
enumerate_common(fname, -1, -1, -1, -1, -1);
@ -938,6 +999,15 @@ static void ata_enumerate(void)
/** Detects (probably emulated) SCSI drives */
static void sg_enumerate(void)
{
#ifdef Libburn_drive_new_deaL
#else
struct sg_scsi_id sid;
int fd, sibling_fds[BURN_OS_SG_MAX_SIBLINGS], sibling_count= 0;
char sibling_fnames[BURN_OS_SG_MAX_SIBLINGS][BURN_OS_SG_MAX_NAMELEN];
int sid_ret = 0;
#endif
int i, ret;
int bus_no= -1, host_no= -1, channel_no= -1, target_no= -1, lun_no= -1;
char fname[17];
@ -967,6 +1037,9 @@ static void sg_enumerate(void)
continue;
}
#ifdef Libburn_drive_new_deaL
ret = is_scsi_drive(fname, &bus_no, &host_no, &channel_no,
&target_no, &lun_no);
if (ret < 0)
@ -979,10 +1052,132 @@ static void sg_enumerate(void)
enumerate_common(fname, bus_no, host_no, channel_no,
target_no, lun_no);
#else /* Libburn_drive_new_deaL */
/* ts A60927 */
fd = sg_open_drive_fd(fname, 1);
if (fd == -1) {
if (linux_sg_enumerate_debug)
fprintf(stderr, "open failed, errno=%d '%s'\n",
errno, strerror(errno));
continue;
}
/* found a drive */
sid_ret = ioctl(fd, SG_GET_SCSI_ID, &sid);
if (sid_ret == -1) {
sid.scsi_id = -1; /* mark SCSI address as invalid */
if(linux_sg_enumerate_debug)
fprintf(stderr,
"ioctl(SG_GET_SCSI_ID) failed, errno=%d '%s' , ",
errno, strerror(errno));
if (sgio_test(fd) == -1) {
if (linux_sg_enumerate_debug)
fprintf(stderr,
"FATAL: sgio_test() failed: errno=%d '%s'",
errno, strerror(errno));
sg_close_drive_fd(fname, -1, &fd, 0);
continue;
}
#ifdef CDROM_DRIVE_STATUS
/* ts A61211 : not widening old acceptance range */
if (strcmp(linux_sg_device_family,"/dev/sg%d") != 0) {
/* http://developer.osdl.org/dev/robustmutexes/
src/fusyn.hg/Documentation/ioctl/cdrom.txt */
sid_ret = ioctl(fd, CDROM_DRIVE_STATUS, 0);
if(linux_sg_enumerate_debug)
fprintf(stderr,
"ioctl(CDROM_DRIVE_STATUS) = %d , ",
sid_ret);
if (sid_ret != -1 && sid_ret != CDS_NO_INFO)
sid.scsi_type = TYPE_ROM;
else
sid_ret = -1;
}
#endif /* CDROM_DRIVE_STATUS */
}
#ifdef SCSI_IOCTL_GET_BUS_NUMBER
/* Hearsay A61005 */
if (ioctl(fd, SCSI_IOCTL_GET_BUS_NUMBER, &bus_no) == -1)
bus_no = -1;
#endif
if (sg_close_drive_fd(fname, -1, &fd,
sid.scsi_type == TYPE_ROM ) <= 0) {
if (linux_sg_enumerate_debug)
fprintf(stderr,
"cannot close properly, errno=%d '%s'\n",
errno, strerror(errno));
continue;
}
if ( (sid_ret == -1 || sid.scsi_type != TYPE_ROM)
&& !linux_sg_accept_any_type) {
if (linux_sg_enumerate_debug)
fprintf(stderr, "sid.scsi_type = %d (!= TYPE_ROM)\n",
sid.scsi_type);
continue;
}
if (sid_ret == -1 || sid.scsi_id < 0) {
/* ts A61211 : employ a more general ioctl */
ret = sg_obtain_scsi_adr(fname, &bus_no, &host_no,
&channel_no, &target_no, &lun_no);
if (ret>0) {
sid.host_no = host_no;
sid.channel = channel_no;
sid.scsi_id = target_no;
sid.lun = lun_no;
} else {
if (linux_sg_enumerate_debug)
fprintf(stderr,
"sg_obtain_scsi_adr() failed\n");
continue;
}
}
/* ts A60927 : trying to do locking with growisofs */
if(burn_sg_open_o_excl>1) {
ret = sg_open_scsi_siblings(
fname, -1, sibling_fds, sibling_fnames,
&sibling_count,
sid.host_no, sid.channel,
sid.scsi_id, sid.lun);
if (ret<=0) {
if (linux_sg_enumerate_debug)
fprintf(stderr, "cannot lock siblings\n");
sg_handle_busy_device(fname, 0);
continue;
}
/* the final occupation will be done in sg_grab() */
sg_release_siblings(sibling_fds, sibling_fnames,
&sibling_count);
}
#ifdef SCSI_IOCTL_GET_BUS_NUMBER
if(bus_no == -1)
bus_no = 1000 * (sid.host_no + 1) + sid.channel;
#else
bus_no = sid.host_no;
#endif
if (linux_sg_enumerate_debug)
fprintf(stderr, "accepting as SCSI %d,%d,%d,%d bus=%d\n",
sid.host_no, sid.channel, sid.scsi_id, sid.lun,
bus_no);
enumerate_common(fname, bus_no, sid.host_no, sid.channel,
sid.scsi_id, sid.lun);
#endif /* Libburn_drive_new_deaL */
}
}
#ifdef Libburn_drive_new_deaL
/* ts A80805 : eventually produce the other official name of a device file */
static int fname_other_name(char *fname, char other_name[80], int flag)
@ -1182,6 +1377,8 @@ static int add_proc_info_drives(int flag)
return 1 + count;
}
#endif /* Libburn_drive_new_deaL */
/* ts A61115 */
/* ----------------------------------------------------------------------- */
@ -1408,18 +1605,27 @@ return_1_pre_proc:;
/* ts A61115: replacing call to sg-implementation internals from drive.c */
int scsi_enumerate_drives(void)
{
int ret;
#ifdef Libburn_drive_new_deaL
int ret;
#endif
#ifdef Libburn_drive_new_deaL
/* Direct examination of eventually single whitelisted name */
ret = single_enumerate(0);
if (ret < 0)
return -1;
if (ret > 0)
return 1;
#endif /* Libburn_drive_new_deaL */
sg_enumerate();
ata_enumerate();
#ifdef Libburn_drive_new_deaL
add_proc_info_drives(0);
#endif /* Libburn_drive_new_deaL */
return 1;
}
@ -1567,6 +1773,36 @@ int sg_release(struct burn_drive *d)
}
#ifdef NIX
/* <<< now in spc.c as scsi_log_err */
/** logs outcome of a sg command. flag&1 causes an error message */
static int sg_log_err(struct command *c, FILE *fp,
sg_io_hdr_t *s,
int flag)
{
if(fp != NULL && (fp == stderr || (burn_sg_log_scsi & 1))) {
if(flag & 1) {
fprintf(fp,
"+++ key=%X asc=%2.2Xh ascq=%2.2Xh (%6d ms)\n",
s->sbp[2], s->sbp[12], s->sbp[13],s->duration);
} else {
scsi_show_cmd_reply(c, fp, 0);
fprintf(fp,"%6d ms\n", s->duration);
}
if (burn_sg_log_scsi & 4)
fflush(fp);
}
if (fp == stderr || !(burn_sg_log_scsi & 2))
return 1;
sg_log_err(c, stderr, s, flag);
return 1;
}
#endif /* NIX */
/** 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.
@ -1576,14 +1812,13 @@ int sg_release(struct burn_drive *d)
*/
int sg_issue_command(struct burn_drive *d, struct command *c)
{
int done = 0, no_c_page = 0, i;
int done = 0, no_c_page = 0, usleep_time, i;
int err;
time_t start_time;
sg_io_hdr_t s;
/* ts A61030 */
static FILE *fp= NULL;
/* <<< ts A60821
debug: for tracing calls which might use open drive fds */
char buf[161];
@ -1686,12 +1921,51 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
c->error = 1;
return -1;
}
done = scsi_eval_cmd_outcome(d, c, fp, s.sbp, s.sb_len_wr,
s.duration, start_time, s.timeout, i, 0);
if (s.sb_len_wr) {
if (!c->retry) {
c->error = 1;
/* A61106: rather than : return 1 */
goto ex;
}
switch (scsi_error(d, s.sbp, s.sb_len_wr)) {
case RETRY:
done = 0;
if (burn_sg_log_scsi & 3) {
scsi_log_err(c, fp, s.sbp, s.duration,
c->error != 0);
scsi_log_cmd(c,fp,0);
}
break;
case FAIL:
done = 1;
c->error = 1;
break;
}
/* ts A90921 :
Calming down retries and breaking up endless cycle
*/
usleep_time = Libburn_sg_linux_retry_usleeP +
i * Libburn_sg_linux_retry_incR;
if (time(NULL) + usleep_time / 1000000 - start_time >
s.timeout / 1000 + 1) {
c->error = 1;
goto ex;
}
usleep(usleep_time);
} else {
done = 1;
}
}
if (s.host_status != Libburn_sg_host_oK ||
(s.driver_status != Libburn_sg_driver_oK && !c->error)) {
/* ts A61106 */
ex:;
if (c->error) {
scsi_notify_error(d, c, s.sbp, s.sb_len_wr, 0);
} else if (s.host_status != Libburn_sg_host_oK ||
s.driver_status != Libburn_sg_driver_oK) {
char msg[161];
sprintf(msg,
@ -1706,6 +1980,9 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
msg, 0, 0);
}
if (burn_sg_log_scsi & 3)
/* <<< sg_log_err(c, fp, &s, c->error != 0); */
scsi_log_err(c, fp, s.sbp, s.duration, c->error != 0);
return 1;
}

View File

@ -565,7 +565,7 @@ int sg_release(struct burn_drive *d)
*/
int sg_issue_command(struct burn_drive *d, struct command *c)
{
int i, timeout_ms, ret, key, asc, ascq, done = 0;
int i, usleep_time, timeout_ms, no_retry = 0, ret;
time_t start_time;
struct uscsi_cmd cgc;
char msg[80];
@ -616,7 +616,7 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
/* retry-loop */
start_time = time(NULL);
timeout_ms = 200000;
for(i = 0; !done; i++) {
for(i = 0; ; i++) {
ret = ioctl(d->fd, USCSICMD, &cgc);
@ -639,21 +639,51 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
return -1;
}
c->sense[2] &= 15;
/* >>> Should replace "18" by realistic sense length.
What's about following older remark ?
*/
/* >>> valid sense: cgc.uscsi_rqlen - cgc.uscsi_rqresid */;
spc_decode_sense(c->sense, 0, &key, &asc, &ascq);
if (key || asc || ascq) {
done = scsi_eval_cmd_outcome(d, c, fp, c->sense, 18, 0,
start_time, timeout_ms, i, 2);
if (c->sense[2] || c->sense[12] || c->sense[13]) {
if (no_retry || !c->retry) {
c->error = 1;
goto ex;
}
switch (scsi_error(d, c->sense, 18)) {
case RETRY:
if (burn_sg_log_scsi & 3) {
/* >>> Need own duration time
measurement. Then remove bit1 */
scsi_log_err(c, fp, c->sense, 0,
(c->error != 0) | 2);
scsi_log_cmd(c,fp,0);
}
break;
case FAIL:
c->error = 1;
goto ex;
}
/*
Calming down retries and breaking up endless cycle
*/
usleep_time = Libburn_sg_solaris_retry_usleeP +
i * Libburn_sg_solaris_retry_incR;
if (time(NULL) + usleep_time / 1000000 - start_time >
timeout_ms / 1000 + 1) {
c->error = 1;
goto ex;
}
usleep(usleep_time);
} else
done = 1;
break; /* retry-loop */
} /* end of retry-loop */
ex:;
if (c->error)
scsi_notify_error(d, c, c->sense, 18, 0);
if (burn_sg_log_scsi & 3)
/* >>> Need own duration time measurement. Then remove bit1 */
scsi_log_err(c, fp, c->sense, 0, (c->error != 0) | 2);
return 1;
}
@ -687,27 +717,6 @@ int sg_obtain_scsi_adr(char *path, int *bus_no, int *host_no, int *channel_no,
/** Tells wether a text is a persistent address as listed by the enumeration
functions.
*/
#ifndef NIX
int sg_is_enumerable_adr(char* path)
{
int ret;
int bus_no, target_no, lun_no;
struct stat stbuf;
if (strncmp("/dev/rdsk/", path, 10) != 0)
return 0;
ret = decode_btl_solaris(path + 10, &bus_no, &target_no, &lun_no, 0);
if (ret <= 0)
return 0;
if (stat(path, &stbuf) == -1)
return 0;
return 1;
}
#else /* ! NIX */
int sg_is_enumerable_adr(char* adr)
{
burn_drive_enumerator_t idx;
@ -727,8 +736,6 @@ int sg_is_enumerable_adr(char* adr)
sg_give_next_adr(&idx, buf, sizeof(buf), -1);
return (0);
}
#endif /* NIX */

View File

@ -63,15 +63,3 @@ int burn_source_cancel(struct burn_source *src)
return 1;
}
/* ts B00922 */
int burn_source_read(struct burn_source *src, unsigned char *buffer, int size)
{
int ret;
if (src->read != NULL)
ret = src->read(src, buffer, size);
else
ret = src->read_xt(src, buffer, size);
return ret;
}

View File

@ -7,6 +7,4 @@ struct burn_source *burn_source_new(void);
int burn_source_cancel(struct burn_source *src);
int burn_source_read(struct burn_source *src, unsigned char *buffer, int size);
#endif /*__SOURCE*/

View File

@ -75,30 +75,6 @@ int scsi_init_command(struct command *c, unsigned char *opcode, int oplen)
}
/* ts B00728 */
int spc_decode_sense(unsigned char *sense, int senselen,
int *key, int *asc, int *ascq)
{
*key = *asc = *ascq = 0;
if ((sense[0] & 0x7f) == 0x72 || (sense[0] & 0x7f) == 0x73) {
if (senselen <= 0 || senselen > 1)
*key = sense[1] & 0x0f;
if (senselen <= 0 || senselen > 2)
*asc = sense[2];
if (senselen <= 0 || senselen > 3)
*ascq = sense[3];
return 1;
}
if (senselen <= 0 || senselen > 2)
*key = sense[2] & 0x0f;
if (senselen <= 0 || senselen > 12)
*asc = sense[12];
if (senselen <= 0 || senselen > 13)
*ascq = sense[13];
return 1;
}
int spc_test_unit_ready_r(struct burn_drive *d, int *key, int *asc, int *ascq)
{
struct command c;
@ -107,23 +83,23 @@ int spc_test_unit_ready_r(struct burn_drive *d, int *key, int *asc, int *ascq)
return 0;
scsi_init_command(&c, SPC_TEST_UNIT_READY,sizeof(SPC_TEST_UNIT_READY));
/*
c.oplen = sizeof(SPC_TEST_UNIT_READY);
memcpy(c.opcode, SPC_TEST_UNIT_READY, sizeof(SPC_TEST_UNIT_READY));
c.page = NULL;
*/
c.retry = 0;
c.dir = NO_TRANSFER;
d->issue_command(d, &c);
if (c.error) {
/*
fprintf(stderr, "sense[0 - 2] = %2.2X %2.2X %2.2X",
c.sense[0], c.sense[1], c.sense[2]);
*/
spc_decode_sense(c.sense, 0, key, asc, ascq);
return (key == 0);
*key= c.sense[2];
*asc= c.sense[12];
*ascq= c.sense[13];
return (c.sense[2] & 0xF) == 0;
}
return 1;
}
int spc_test_unit_ready(struct burn_drive *d)
{
int key,asc,ascq;
@ -175,7 +151,6 @@ handle_error:;
/* ts A90213 */
sprintf(msg,
"Asynchronous SCSI error on %s: ", cmd_text);
sense[0] = 0x70; /* Fixed format sense data */
sense[2] = key;
sense[12] = asc;
sense[13] = ascq;
@ -274,7 +249,7 @@ void spc_inquiry(struct burn_drive *d)
memcpy(c.opcode, SPC_INQUIRY, sizeof(SPC_INQUIRY));
c.oplen = sizeof(SPC_INQUIRY);
*/
c.dxfer_len = (c.opcode[3] << 8) | c.opcode[4];
c.dxfer_len= (c.opcode[3] << 8) | c.opcode[4];
c.retry = 1;
c.page = &buf;
c.page->bytes = 0;
@ -828,7 +803,9 @@ void spc_probe_write_modes(struct burn_drive *d)
if (last_try)
break;
spc_decode_sense(c.sense, 0, &key, &asc, &ascq);
key = c.sense[2];
asc = c.sense[12];
ascq = c.sense[13];
if (key)
burn_print(7, "%d not supported\n", try_block_type);
else {
@ -981,7 +958,6 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
int senselen, char msg_data[161],
int *key, int *asc, int *ascq)
{
int ret;
char *msg;
static char key_def[16][40] = {
"(no specific error)",
@ -1005,9 +981,12 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
msg= msg_data;
*key= *asc= *ascq= -1;
ret = spc_decode_sense(sense, senselen, key, asc, ascq);
if (ret <= 0)
*key= *asc= *ascq= -1;
if (senselen<=0 || senselen>2)
*key = sense[2] & 0x0f;
if (senselen<=0 || senselen>12)
*asc = sense[12];
if (senselen<=0 || senselen>13)
*ascq = sense[13];
sprintf(msg, "[%X %2.2X %2.2X] ", *key, *asc, *ascq);
msg= msg + strlen(msg);
@ -1017,10 +996,8 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
switch (*asc) {
case 0x00:
if (*key > 0 || *ascq > 0)
break; /* Fall through to unknown error */
sprintf(msg, "(No error reported by SCSI transaction)");
return GO_ON;
return RETRY;
case 0x02:
sprintf(msg, "Not ready");
@ -1226,12 +1203,6 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
sprintf(msg, "Medium not present");
d->status = BURN_DISC_EMPTY;
return FAIL;
case 0x3E:
if (*ascq == 1)
sprintf(msg, "Logical unit failure");
else if (*ascq == 2)
sprintf(msg, "Timeout on logical unit");
return FAIL;
case 0x57:
if (*key != 3 || *ascq != 0)
break;
@ -1408,10 +1379,28 @@ int scsi_notify_error(struct burn_drive *d, struct command *c,
sprintf(msg, "SCSI error condition on command %2.2Xh %s: ",
c->opcode[0],
scsi_command_name((unsigned int) c->opcode[0], 0));
#ifdef NIX
if (key>=0)
sprintf(msg+strlen(msg), " key=%Xh", key);
if (asc>=0)
sprintf(msg+strlen(msg), " asc=%2.2Xh", asc);
if (ascq>=0)
sprintf(msg+strlen(msg), " ascq=%2.2Xh", ascq);
ret = libdax_msgs_submit(libdax_messenger, d->global_index, 0x0002010f,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH, msg,0,0);
if (ret < 0)
return ret;
ret = libdax_msgs_submit(libdax_messenger, d->global_index, 0x0002010f,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
scsi_msg,0,0);
#else
strcat(msg, scsi_msg);
ret = libdax_msgs_submit(libdax_messenger, d->global_index, 0x0002010f,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH, msg,0,0);
#endif /* NIX */
return ret;
}
@ -1504,31 +1493,19 @@ int scsi_log_cmd(struct command *c, void *fp_in, int flag)
bit1 do not print duration
*/
int scsi_log_err(struct command *c, void *fp_in, unsigned char sense[18],
int sense_len, int duration, int flag)
int duration, int flag)
{
char durtxt[20];
FILE *fp = fp_in;
int key, asc, ascq, i, l;
if (fp != NULL && (fp == stderr || (burn_sg_log_scsi & 1))) {
if (flag & 1) {
l = 18;
if ((sense[0] & 0x7f) == 0x72 ||
(sense[0] & 0x7f) == 0x73)
l = sense[7] + 7 + 1; /* SPC-5 4.5.2. */
if (l > sense_len)
l = sense_len;
fprintf(fp, "+++ sense data =");
for (i = 0 ; i < l; i++)
fprintf(fp, " %2.2X", sense[i]);
fprintf(fp, "\n");
if(fp != NULL && (fp == stderr || (burn_sg_log_scsi & 1))) {
if(flag & 1) {
durtxt[0] = 0;
if (!(flag & 2))
sprintf(durtxt, " (%6d ms)", duration);
spc_decode_sense(sense, 0, &key, &asc, &ascq);
sprintf(durtxt, " (%6d ms)\n",duration);
fprintf(fp, "+++ key=%X asc=%2.2Xh ascq=%2.2Xh%s\n",
(unsigned int) key, (unsigned int) asc,
(unsigned int) ascq, durtxt);
sense[2], sense[12], sense[13], durtxt);
} else {
scsi_show_cmd_reply(c, fp, 0);
if (!(flag & 2))
@ -1539,55 +1516,7 @@ int scsi_log_err(struct command *c, void *fp_in, unsigned char sense[18],
}
if (fp == stderr || !(burn_sg_log_scsi & 2))
return 1;
scsi_log_err(c, stderr, sense, sense_len, duration, flag);
scsi_log_err(c, stderr, sense, duration, flag);
return 1;
}
/* ts B00808 */
/*
@param flag bit0 = do not retry
bit1 = do not print duration
@return 0 = not yet done , 1 = done , -1 = error
*/
int scsi_eval_cmd_outcome(struct burn_drive *d, struct command *c, void *fp,
unsigned char *sense, int sense_len,
int duration, time_t start_time, int timeout_ms,
int loop_count, int flag)
{
enum response outcome;
int done = -1, usleep_time;
if (burn_sg_log_scsi & 3)
scsi_log_err(c, fp, sense, sense_len, duration,
(sense_len > 0) | (flag & 2));
if (sense_len <= 0)
return 1;
outcome = scsi_error(d, sense, sense_len);
if (outcome == RETRY && c->retry && !(flag & 1)) {
/* Calming down retries and breaking up endless cycle
*/
usleep_time = Libburn_scsi_retry_usleeP +
loop_count * Libburn_scsi_retry_incR;
if (time(NULL) + usleep_time / 1000000 - start_time >
timeout_ms / 1000 + 1) {
done = 1;
goto ex;
}
usleep(usleep_time);
if (burn_sg_log_scsi & 3)
scsi_log_cmd(c, fp, 0);
return 0;
} else if (outcome == RETRY) {
done = 1;
} else if (outcome == GO_ON) {
return 1;
} else if (outcome == FAIL) {
done = 1;
}
ex:;
c->error = 1;
scsi_notify_error(d, c, sense, sense_len, 0);
return done;
}

View File

@ -49,7 +49,7 @@ int burn_scsi_setup_drive(struct burn_drive *d, int bus_no, int host_no,
int channel_no, int target_no, int lun_no, int flag);
/* ts A61115 moved from sg-*.h */
enum response { RETRY, FAIL, GO_ON };
enum response { RETRY, FAIL };
enum response scsi_error(struct burn_drive *, unsigned char *, int);
/* ts A61122 */
@ -78,29 +78,7 @@ int scsi_log_cmd(struct command *c, void *fp, int flag);
/* ts A91221 (former sg_log_err ts A91108) */
/** Logs outcome of a sg command. */
int scsi_log_err(struct command *c, void *fp, unsigned char sense[18],
int sense_len, int duration, int flag);
/* ts B00728 */
int spc_decode_sense(unsigned char *sense, int senselen,
int *key, int *asc, int *ascq);
/* ts B00808 */
/** Evaluates outcome of a single SCSI command, eventually logs sense data,
and issues DEBUG error message in case the command is evaluated as done.
@param flag bit1 = do not print duration
@return 0 = not yet done , 1 = done , -1 = error
*/
int scsi_eval_cmd_outcome(struct burn_drive *d, struct command *c, void *fp_in,
unsigned char *sense, int sense_len,
int duration, time_t start_time, int timeout_ms,
int loop_count, int flag);
/* The waiting time before eventually retrying a failed SCSI command.
Before each retry wait Libburn_scsi_retry_incR longer than with
the previous one.
*/
#define Libburn_scsi_retry_usleeP 100000
#define Libburn_scsi_retry_incR 100000
int duration, int flag);
#endif /*__SPC*/

View File

@ -1,6 +1,6 @@
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2011 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -170,8 +170,6 @@ struct burn_track *burn_track_create(void)
/* ts A61031 */
t->open_ended = 0;
t->track_data_done = 0;
/* ts B10103 */
t->end_on_premature_eoi = 0;
t->postgap = 0;
t->pregap1 = 0;

View File

@ -1,6 +1,6 @@
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2011 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -55,14 +55,6 @@ struct burn_track
int open_ended;
/** End of open ended track flag : offset+payload+tail are delivered */
int track_data_done;
/* ts B10103 */
/** End track writing on premature End-of-input if source is of
defined length.
0= normal operation in case of eoi
1= be ready to end track writing on eoi
2= eoi was encountered with previously set value of 1
*/
int end_on_premature_eoi;
/** The audio/data mode for the entry. Derived from control and
possibly from reading the track's first sector. */

View File

@ -134,8 +134,6 @@ struct burn_drive
1=MMC drive ,
2=stdio random read-write
3=stdio sequential write-only
4=stdio random read-only
5=stdio random write-only
*/
int drive_role;
@ -287,9 +285,6 @@ struct burn_drive
0x7fffffff = unknown */
int media_read_capacity;
/* ts B10314 : Next Writeable Adress for drive_role == 5 */
int role_5_nwa;
int toc_temp;
struct burn_disc *disc; /* disc structure */
int block_types[4];

View File

@ -34,7 +34,7 @@ char *burn_strdup(char *s)
return NULL;
l = strlen(s) + 1;
ret = calloc(1, l);
ret = malloc(l);
memcpy(ret, s, l);
return ret;
@ -52,7 +52,7 @@ char *burn_strndup(char *s, int n)
return NULL;
l = strlen(s);
ret = calloc(1, l < n ? l : n);
ret = malloc(l < n ? l : n);
memcpy(ret, s, l < n - 1 ? l : n - 1);
ret[n - 1] = '\0';

View File

@ -1,7 +1,7 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2011 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -385,9 +385,9 @@ struct cue_sheet *burn_create_toc_entries(struct burn_write_opts *o,
runtime = nwa-150;
#endif
sheet = calloc(1, sizeof(struct cue_sheet));
sheet = malloc(sizeof(struct cue_sheet));
/* ts A61009 : react on failures of calloc(), add_cue_sheet()
/* ts A61009 : react on failures of malloc(), add_cue_sheet()
type_to_form() */
if (sheet == NULL) {
libdax_msgs_submit(libdax_messenger, -1, 0x00020111,
@ -1005,12 +1005,9 @@ int burn_precheck_write(struct burn_write_opts *o, struct burn_disc *disc,
reason_pt= reasons;
reasons[0] = 0;
if (d->drive_role == 0 || d->drive_role == 4) {
if (d->drive_role == 0)
sprintf(reasons,
"DRIVE: is a virtual placeholder (null-drive)");
else
sprintf(reasons, "DRIVE: read-only pseudo drive");
if (d->drive_role == 0) {
sprintf(reasons,
"DRIVE: is a virtual placeholder (null-drive)");
no_media = 1;
goto ex;
}
@ -1027,7 +1024,7 @@ int burn_precheck_write(struct burn_write_opts *o, struct burn_disc *disc,
reason_pt= reasons + strlen(reasons);
if (d->status == BURN_DISC_UNSUITABLE)
goto unsuitable_profile;
if (d->drive_role == 2 || d->drive_role == 5 ||
if (d->drive_role == 2 ||
d->current_profile == 0x1a || d->current_profile == 0x12 ||
d->current_profile == 0x43) {
/* DVD+RW , DVD-RAM , BD-RE, emulated drive on stdio file */
@ -1122,13 +1119,11 @@ int burn_disc_open_track_dvd_minus_r(struct burn_write_opts *o,
#endif
if (o->write_type == BURN_WRITE_SAO) { /* DAO */
/* Round track size up to write chunk size and reserve track */
size = ((off_t) burn_track_get_sectors(s->track[tnum]))
* (off_t) 2048;
/* Eventually round track size up to write chunk */
if (o->obs_pad && (size % o->obs))
if (size % o->obs)
size += (off_t) (o->obs - (size % o->obs));
ret = d->reserve_track(d, size);
if (ret <= 0) {
sprintf(msg, "Cannot reserve track of %.f bytes",
@ -1169,10 +1164,6 @@ int burn_disc_open_track_dvd_plus_r(struct burn_write_opts *o,
/* Round track size up to write chunk size and reserve track */
size = ((off_t) burn_track_get_sectors(s->track[tnum]))
* (off_t) 2048;
/* o->obs should be 32k or 64k already. But 32k alignment
was once performed in d->reserve_track() */
if (o->obs % 32768)
o->obs += 32768 - (o->obs % 32768);
if (size % o->obs)
size += (off_t) (o->obs - (size % o->obs));
ret = d->reserve_track(d, size);
@ -1901,8 +1892,6 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
msg, 0, 0);
burn_track_set_size(t, default_size);
}
/* Whether to fill-up last 32k buffer of track. */
o->obs_pad = (o->write_type != BURN_WRITE_SAO);
ret = burn_disc_setup_dvd_minus_r(o, disc);
if (ret <= 0) {
sprintf(msg,
@ -1913,6 +1902,8 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
msg, 0, 0);
goto early_failure;
}
/* ??? padding needed ??? cowardly doing it for now */
o->obs_pad = 1; /* fill-up track's last 32k buffer */
} else if (d->current_profile == 0x1b || d->current_profile == 0x2b ||
d->current_profile == 0x41) {
@ -2015,13 +2006,7 @@ ex:;
burn_drive_mark_unready(d);
burn_drive_inquire_media(d);
if (d->current_profile == 0x41 && d->complete_sessions >= 300) {
sprintf(msg, "Sequential BD-R media now contains %d sessions. It is likely to soon fail writing.", d->complete_sessions);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x0002017b, LIBDAX_MSGS_SEV_WARNING,
LIBDAX_MSGS_PRIO_ZERO, msg, 0, 0);
}
/* <<< d->busy = BURN_DRIVE_IDLE; */
return ret;
early_failure:;
return 0;
@ -2033,8 +2018,7 @@ int burn_stdio_open_write(struct burn_drive *d, off_t start_byte,
int sector_size, int flag)
{
/* We normally need _LARGEFILE64_SOURCE defined by the build system.
Nevertheless the system might use large address integers by default.
/* <<< We need _LARGEFILE64_SOURCE defined by the build system.
*/
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
@ -2043,26 +2027,14 @@ int burn_stdio_open_write(struct burn_drive *d, off_t start_byte,
int fd = -1;
int mode = O_RDWR | O_CREAT | O_LARGEFILE;
char msg[160];
off_t lseek_res;
if(d->drive_role == 4) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020181,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
"Pseudo-drive is a read-only file. Cannot write.",
0, 0);
return 0;
}
if (d->drive_role == 5 || d->drive_role == 3)
mode = O_WRONLY | O_CREAT | O_LARGEFILE;
if (d->devname[0] == 0) /* null drives should not come here */
return -1;
fd = burn_drive__fd_from_special_adr(d->devname);
if (fd >= 0)
fd = dup(fd); /* check validity and make closeable */
else
fd = open(d->devname, mode,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
fd = open(d->devname, mode, S_IRUSR | S_IWUSR);
if (fd == -1) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020005,
@ -2073,11 +2045,10 @@ int burn_stdio_open_write(struct burn_drive *d, off_t start_byte,
}
if (start_byte < 0)
start_byte = 0;
if (d->drive_role == 2 || d->drive_role == 5) {
lseek_res = lseek(fd, start_byte, SEEK_SET);
if (lseek_res == -1) {
if (d->drive_role == 2)
if (lseek(fd, start_byte, SEEK_SET)==-1) {
sprintf(msg, "Cannot address start byte %.f",
(double) start_byte);
(double) start_byte);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020147,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
@ -2086,7 +2057,6 @@ int burn_stdio_open_write(struct burn_drive *d, off_t start_byte,
d->cancel = 1;
fd = -1;
}
}
d->nwa = start_byte / sector_size;
return fd;
}
@ -2144,11 +2114,9 @@ int burn_stdio_mmc_write(struct burn_drive *d, int start, struct buffer *buf)
if (d->cancel)
return BE_CANCELLED;
if (d->stdio_fd < 0) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x0002017d,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
"Invalid file descriptor with stdio pseudo-drive",
0, 0);
/* >>> program error */;
d->cancel = 1;
return BE_CANCELLED;
}
@ -2196,11 +2164,9 @@ int burn_stdio_mmc_dummy_write(struct burn_drive *d, int start,
int burn_stdio_sync_cache(int fd, struct burn_drive *d, int flag)
{
if (fd < 0) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x0002017d,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
"Invalid file descriptor with stdio pseudo-drive",
0, 0);
/* >>> program error */;
d->cancel = 1;
return 0;
}
@ -2279,8 +2245,6 @@ int burn_stdio_write_track(struct burn_write_opts *o, struct burn_session *s,
burn_disc_init_track_status(o, s, tnum, sectors);
open_ended = burn_track_is_open_ended(t);
t->end_on_premature_eoi = (o->write_type == BURN_WRITE_TAO);
/* attach stdio emulators for mmc_*() functions */
if (o->simulate)
d->write = burn_stdio_mmc_dummy_write;
@ -2293,9 +2257,8 @@ int burn_stdio_write_track(struct burn_write_opts *o, struct burn_session *s,
/* transact a (CD sized) sector */
if (!sector_data(o, t, 0))
{ret= 0; goto ex;}
if (open_ended)
if (open_ended) {
d->progress.sectors = sectors = d->progress.sector;
if (open_ended || t->end_on_premature_eoi) {
if (burn_track_is_data_done(t))
break;
}
@ -2322,8 +2285,6 @@ int burn_stdio_write_track(struct burn_write_opts *o, struct burn_session *s,
ex:;
if (d->cancel)
burn_source_cancel(t->source);
if (t->end_on_premature_eoi == 2)
d->cancel = 1;
return ret;
}
@ -2352,9 +2313,6 @@ int burn_stdio_write_sync(struct burn_write_opts *o,
/* open target file */
if (d->stdio_fd >= 0)
close(d->stdio_fd);
if (d->drive_role == 5 && d->status == BURN_DISC_APPENDABLE &&
o->start_byte < 0)
o->start_byte = d->role_5_nwa * 2048;
d->stdio_fd = burn_stdio_open_write(d, o->start_byte, 2048, 0);
if (d->stdio_fd == -1)
{ret = 0; goto ex;}
@ -2437,14 +2395,6 @@ calloc() seems not to have the desired effect. valgrind warns:
d->rlba = -150;
d->toc_temp = 9;
if(d->drive_role == 4) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020181,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
"Pseudo-drive is a read-only file. Cannot write.",
0, 0);
goto fail_wo_sync;
}
/* ts A70904 */
if (d->drive_role != 1) {
ret = burn_stdio_write_sync(o, disc);
@ -2668,16 +2618,8 @@ int burn_random_access_write(struct burn_drive *d, off_t byte_address,
"Drive is a virtual placeholder (null-drive)", 0, 0);
return 0;
}
if(d->drive_role == 4) {
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020181,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
"Pseudo-drive is a read-only file. Cannot write.",
0, 0);
return 0;
}
if(d->drive_role == 2 || d->drive_role == 5)
if(d->drive_role == 2)
alignment = 2 * 1024;
if (d->current_profile == 0x12) /* DVD-RAM */
alignment = 2 * 1024;

View File

@ -25,19 +25,18 @@
#include "../libburn/libdax_msgs.h"
struct libdax_msgs *libdax_messenger= NULL;
/* The API for .wav extraction */
#define LIBDAX_AUDIOXTR_H_PUBLIC 1
#include "../libburn/libdax_audioxtr.h"
#else /* Dewav_without_libburN */
/* This build environment uses libdax_msgs and libdax_audioxtr via libburn */
/* This build environment uses libdax_msgs via libburn */
/* Thus the API header of libburn */
#include "../libburn/libburn.h"
#endif /* ! Dewav_without_libburN */
/* The API for .wav extraction */
#include "../libburn/libdax_audioxtr.h"
int main(int argc, char **argv)
{

View File

@ -20,37 +20,31 @@
Before you can do anything, you have to initialize libburn by
burn_initialize()
and provide some signal and abort handling, e.g. by the builtin handler, by
burn_set_signal_handling("libburner : ", NULL, 0x0)
as it is done in main() at the end of this file.
Then you aquire a drive in an appropriate way conforming to the API. The twoi
main approaches are shown here in application functions:
burn_set_signal_handling()
as it is done in main() at the end of this file. Then you aquire a
drive in an appropriate way conforming to the API. The two main
approaches are shown here in application functions:
libburner_aquire_by_adr() demonstrates usage as of cdrecord traditions
libburner_aquire_by_driveno() demonstrates a scan-and-choose approach
With that aquired drive you can blank a CD-RW or DVD-RW as shown in
With that aquired drive you can blank a CD-RW or DVD-RW
libburner_blank_disc()
or you can format a DVD-RW to profile "Restricted Overwrite" (needed once)
or an unused BD to default size with spare blocks
libburner_format()
With the aquired drive you can burn to CD, DVD, BD. See
With the aquired drive you can burn to CD, DVD, BD
libburner_payload()
These three functions switch temporarily to a non-fatal signal handler
while they are waiting for the drive to become idle again:
burn_set_signal_handling("libburner : ", NULL, 0x30)
After the waiting loop ended, they check for eventual abort events by
burn_is_aborting(0)
The 0x30 handler will eventually execute
burn_abort()
but not wait for the drive to become idle and not call exit().
This is needed because the worker threads might block as long as the signal
handler has not returned. The 0x0 handler would wait for them to finish.
Take this into respect when implementing own signal handlers.
When everything is done, main() releases the drive and shuts down libburn:
burn_drive_release();
burn_finish()
FreeBSD does not work well with the convenient synchronous signal handler. So
the waiting loops for blanking, formatting, and writing use the asynchronous
mode of the libburn signal handler. It will not shutdown the library and
abort the program, but rather tell the ongoing drive operation to stop as
soon as possible. After the loops and at the end of the program there is a
call to determine whether an abort happened:
burn_is_aborting()
Applications must use 64 bit off_t. E.g. by defining
#define _LARGEFILE_SOURCE
#define _FILE_OFFSET_BITS 64
@ -66,7 +60,7 @@
/* This program insists in the own headerfile. */
#include "../libburn/libburn.h"
/* libburn works on Linux systems with kernel 2.4 or 2.6, FreeBSD, Solaris */
/* libburn is intended for Linux systems with kernel 2.4 or 2.6 for now */
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
@ -339,7 +333,7 @@ int libburner_blank_disc(struct burn_drive *drive, int blank_fast)
if (burn_is_aborting(0) > 0)
return -1;
/* Back to synchronous handling */
burn_set_signal_handling("libburner : ", NULL, 0x0);
burn_set_signal_handling("libburner : ", NULL, 0);
printf("Done\n");
return 1;
}
@ -407,7 +401,7 @@ int libburner_format(struct burn_drive *drive)
}
if (burn_is_aborting(0) > 0)
return -1;
burn_set_signal_handling("libburner : ", NULL, 0x0);
burn_set_signal_handling("libburner : ", NULL, 0);
burn_disc_get_profile(drive_list[0].drive, &current_profile,
current_profile_name);
if (current_profile == 0x14 || current_profile == 0x13)
@ -763,7 +757,7 @@ int main(int argc, char **argv)
/* Activate the synchronous signal handler which eventually will try to
properly shutdown drive and library on aborting events. */
burn_set_signal_handling("libburner : ", NULL, 0x0);
burn_set_signal_handling("libburner : ", NULL, 0);
/** Note: driveno might change its value in this call */
ret = libburner_aquire_drive(drive_adr, &driveno);

View File

@ -1,134 +0,0 @@
/*
cc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS -g -o test/offst_source test/offst_source.c -lburn
*/
#include "../libburn/libburn.h"
/* Just everything from test/libburner.c */
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
static int create_original(struct burn_source **original, char *path, int flag)
{
printf("create_original: path='%s'\n", path);
*original = burn_file_source_new(path, NULL);
if (*original == NULL)
return 0;
return 1;
}
static int set_up_offst_sources(struct burn_source *original,
struct burn_source *offsetters[],
int count, int flag)
{
int i;
off_t start = 3, size = 10, gap = 7;
for (i = 0; i < count; i++) {
offsetters[i] = burn_offst_source_new(original,
i > 0 ? offsetters[i - 1] : NULL,
start, size, 0);
if (offsetters[i] == NULL)
return 0;
printf("set_up_offst_sources: idx=%d, start=%d\n",
i, (int) start);
start += size + gap;
}
return 1;
}
static int consume_source(struct burn_source *src, int flag)
{
int ret, count = 0;
unsigned char buf[1];
while (1) {
ret = src->read_xt(src, buf, 1);
if (ret < 0) {
printf("\n");
fprintf(stderr, "consume_source: count=%d, ret=%d\n",
count, ret);
return 0;
}
if (ret == 0)
break;
printf("%u ", buf[0]);
count++;
}
printf(" count=%d\n", count);
return 1;
}
static int consume_all_sources(struct burn_source *offsetters[],
int count, int flag)
{
int i, ret;
for (i = 0; i < count; i++) {
printf("consume_source: idx=%d\n", i);
ret = consume_source(offsetters[i], 0);
if (ret <= 0)
return ret;
}
return 1;
}
static int free_all_sources(struct burn_source *original,
struct burn_source *offsetters[],
int count, int flag)
{
int i;
for (i = 0; i < count; i++)
burn_source_free(offsetters[i]);
burn_source_free(original);
return 1;
}
int main(int argc, char **argv)
{
int ret;
char *path = "./COPYRIGHT";
struct burn_source *original = NULL, *offsetters[4];
if (argc > 1)
path = argv[1];
if (burn_initialize() == 0)
exit(1);
ret = create_original(&original, path, 0);
if (ret <= 0)
exit(2);
ret = set_up_offst_sources(original, offsetters, 4, 0);
if (ret <= 0)
exit(3);
ret = consume_all_sources(offsetters, 4, 0);
if (ret <= 0)
exit(4);
ret = free_all_sources(original, offsetters, 4, 0);
if (ret <= 0)
exit(5);
burn_finish();
exit(0);
}