Compare commits
5 Commits
ZeroEightZ
...
ZeroSevenS
Author | SHA1 | Date | |
---|---|---|---|
335b2b0ffc | |||
3505b761f4 | |||
cbb9125bd9 | |||
8385908bb3 | |||
e081477a8f |
@ -110,9 +110,9 @@ test_structest_CPPFLAGS = -Ilibburn
|
|||||||
test_structest_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
|
test_structest_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
|
||||||
test_structest_SOURCES = test/structest.c
|
test_structest_SOURCES = test/structest.c
|
||||||
|
|
||||||
## cdrskin construction site - ts A60816 - B00409
|
## cdrskin construction site - ts A60816 - B00122
|
||||||
cdrskin_cdrskin_CPPFLAGS = -Ilibburn
|
cdrskin_cdrskin_CPPFLAGS = -Ilibburn
|
||||||
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_8_0
|
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_7_6
|
||||||
|
|
||||||
# cdrskin_cdrskin_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
|
# cdrskin_cdrskin_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
|
||||||
# ts A80123, change proposed by Simon Huggins to cause dynamic libburn linking
|
# ts A80123, change proposed by Simon Huggins to cause dynamic libburn linking
|
||||||
|
26
README
26
README
@ -11,7 +11,7 @@ Still containing parts of Libburn. By Derek Foreman <derek@signalmarketing.com>
|
|||||||
and Ben Jansens <xor@orodu.net>
|
and Ben Jansens <xor@orodu.net>
|
||||||
Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
|
Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
|
||||||
|
|
||||||
http://files.libburnia-project.org/releases/libburn-0.8.0.pl00.tar.gz
|
http://files.libburnia-project.org/releases/libburn-0.7.6.pl00.tar.gz
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -19,10 +19,10 @@ Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
|
|||||||
|
|
||||||
From tarball
|
From tarball
|
||||||
|
|
||||||
Obtain libburn-0.8.0.pl00.tar.gz, take it to a directory of your choice and do:
|
Obtain libburn-0.7.6.pl00.tar.gz, take it to a directory of your choice and do:
|
||||||
|
|
||||||
tar xzf libburn-0.8.0.pl00.tar.gz
|
tar xzf libburn-0.7.6.pl00.tar.gz
|
||||||
cd libburn-0.8.0
|
cd libburn-0.7.6
|
||||||
./configure --prefix=/usr
|
./configure --prefix=/usr
|
||||||
make
|
make
|
||||||
|
|
||||||
@ -496,24 +496,6 @@ Project history as far as known to me:
|
|||||||
fixes bugs about the generic X/Open system adapter, and allows to use
|
fixes bugs about the generic X/Open system adapter, and allows to use
|
||||||
libcdio >= 0.83 as SCSI transport facility.
|
libcdio >= 0.83 as SCSI transport facility.
|
||||||
|
|
||||||
- 10 Feb 2010 libisofs-0.6.28 fixes a regression about bootable images which
|
|
||||||
was introduced by version 0.6.22 in August 2009.
|
|
||||||
|
|
||||||
- 23 Feb 2010 libisoburn-0.5.0 marks the transition of the xorriso standalone
|
|
||||||
version to an official GNU project. The name changed to "GNU xorriso" and its
|
|
||||||
license is now GPLv3+.
|
|
||||||
The licenses of libburnia libraries and applications are not affected by
|
|
||||||
this change.
|
|
||||||
|
|
||||||
- 10 Mar 2010 libburn-0.7.8 fixes bugs and improves the built-in abort handler
|
|
||||||
on FreeBSD.
|
|
||||||
|
|
||||||
- 30 Mar 2010 Release 0.5.2 of libisoburn provides xorriso documentation in
|
|
||||||
GNU Texinfo format with embedded extra data to derive a full man page.
|
|
||||||
|
|
||||||
- 09 Apr 2010 libburn-0.8.0 now works with ahci driver on FreeBSD 8-STABLE.
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
11
acinclude.m4
11
acinclude.m4
@ -1,14 +1,3 @@
|
|||||||
AC_DEFUN([LIBBURNIA_SET_FLAGS],
|
|
||||||
[
|
|
||||||
case $target_os in
|
|
||||||
freebsd*)
|
|
||||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
|
||||||
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
AC_DEFUN([TARGET_SHIZZLE],
|
AC_DEFUN([TARGET_SHIZZLE],
|
||||||
[
|
[
|
||||||
ARCH=""
|
ARCH=""
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
cdrskin. By Thomas Schmitt <scdbackup@gmx.net>
|
cdrskin. By Thomas Schmitt <scdbackup@gmx.net>
|
||||||
Integrated sub project of libburnia-project.org but also published via:
|
Integrated sub project of libburnia-project.org but also published via:
|
||||||
http://scdbackup.sourceforge.net/cdrskin_eng.html
|
http://scdbackup.sourceforge.net/cdrskin_eng.html
|
||||||
http://scdbackup.sourceforge.net/cdrskin-0.8.0.pl00.tar.gz
|
http://scdbackup.sourceforge.net/cdrskin-0.7.6.pl00.tar.gz
|
||||||
|
|
||||||
Copyright (C) 2006-2010 Thomas Schmitt, provided under GPL version 2 or later.
|
Copyright (C) 2006-2010 Thomas Schmitt, provided under GPL version 2 or later.
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
@ -25,10 +25,10 @@ By using this software you agree to the disclaimer at the end of this text
|
|||||||
|
|
||||||
Compilation, First Glimpse, Installation
|
Compilation, First Glimpse, Installation
|
||||||
|
|
||||||
Obtain cdrskin-0.8.0.pl00.tar.gz, take it to a directory of your choice and do:
|
Obtain cdrskin-0.7.6.pl00.tar.gz, take it to a directory of your choice and do:
|
||||||
|
|
||||||
tar xzf cdrskin-0.8.0.pl00.tar.gz
|
tar xzf cdrskin-0.7.6.pl00.tar.gz
|
||||||
cd cdrskin-0.8.0
|
cd cdrskin-0.7.6
|
||||||
|
|
||||||
Within that directory execute:
|
Within that directory execute:
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ Obtain some info about the drive
|
|||||||
cdrskin dev=0,1,0 -checkdrive
|
cdrskin dev=0,1,0 -checkdrive
|
||||||
|
|
||||||
Obtain some info about the drive and the inserted media
|
Obtain some info about the drive and the inserted media
|
||||||
cdrskin dev=0,1,0 -atip -v -minfo
|
cdrskin dev=0,1,0 -atip -v
|
||||||
|
|
||||||
Prepare CD-RW or DVD-RW for re-use, DVD-RAM or BD-RE for first use
|
Prepare CD-RW or DVD-RW for re-use, DVD-RAM or BD-RE for first use
|
||||||
cdrskin -v dev=/dev/sg1 blank=as_needed -eject
|
cdrskin -v dev=/dev/sg1 blank=as_needed -eject
|
||||||
@ -399,14 +399,13 @@ drive. See man page section FILES for a way to lift that ban.
|
|||||||
Special compilation variations
|
Special compilation variations
|
||||||
|
|
||||||
All following options of ./configure and cdrskin/compile_cdrskin.sh are
|
All following options of ./configure and cdrskin/compile_cdrskin.sh are
|
||||||
combinable. After runs of ./configure do as next:
|
combinable.
|
||||||
make clean ; make
|
|
||||||
|
|
||||||
In some situations Linux may deliver a better write performance to drives if
|
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
|
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
|
burn_os_open_track_src() and the input readers of cdrskin and libburn fifo
|
||||||
can be told to use this peculiar read mode by:
|
can be told to use this peculiar read mode by:
|
||||||
--enable-track-src-odirect
|
--enable-track-src-odirect
|
||||||
|
|
||||||
But often cdrskin option dvd_obs=64k will yield even better performance in
|
But often cdrskin option dvd_obs=64k will yield even better performance in
|
||||||
such a situation. 64k can be made default at compile time by
|
such a situation. 64k can be made default at compile time by
|
||||||
|
@ -38,7 +38,7 @@ original="./libburn_svn_release.tgz"
|
|||||||
# My changes are in $changes , mainly in $changes/cdrskin
|
# My changes are in $changes , mainly in $changes/cdrskin
|
||||||
changes="./libburn-release"
|
changes="./libburn-release"
|
||||||
|
|
||||||
skin_release="0.8.0"
|
skin_release="0.7.6"
|
||||||
patch_level=".pl00"
|
patch_level=".pl00"
|
||||||
skin_rev="$skin_release""$patch_level"
|
skin_rev="$skin_release""$patch_level"
|
||||||
|
|
@ -38,7 +38,7 @@ original="./libburn_svn.tgz"
|
|||||||
# My changes are in $changes , mainly in $changes/cdrskin
|
# My changes are in $changes , mainly in $changes/cdrskin
|
||||||
changes="./libburn-develop"
|
changes="./libburn-develop"
|
||||||
|
|
||||||
skin_release="0.8.1"
|
skin_release="0.7.7"
|
||||||
patch_level=""
|
patch_level=""
|
||||||
skin_rev="$skin_release""$patch_level"
|
skin_rev="$skin_release""$patch_level"
|
||||||
|
|
@ -203,11 +203,10 @@ int Cdrfifo_close(struct CdrfifO *o, int flag)
|
|||||||
if(o->dest_fd!=-1)
|
if(o->dest_fd!=-1)
|
||||||
close(o->dest_fd);
|
close(o->dest_fd);
|
||||||
o->dest_fd= -1;
|
o->dest_fd= -1;
|
||||||
for(i=0; i<o->follow_up_fd_counter; i++) {
|
for(i=0; i<o->follow_up_fd_counter; i++)
|
||||||
if(o->follow_up_fds[i][1]!=-1)
|
if(o->follow_up_fds[i][1]!=-1)
|
||||||
close(o->follow_up_fds[i][1]);
|
close(o->follow_up_fds[i][1]);
|
||||||
o->follow_up_fds[i][1]= -1;
|
o->follow_up_fds[i][1]= -1;
|
||||||
}
|
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
.\" First parameter, NAME, should be all caps
|
.\" First parameter, NAME, should be all caps
|
||||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||||
.\" other parameters are allowed: see man(7), man(1)
|
.\" other parameters are allowed: see man(7), man(1)
|
||||||
.TH CDRSKIN 1 "Feb 29, 2010"
|
.TH CDRSKIN 1 "Jan 19, 2010"
|
||||||
.\" Please adjust this date whenever revising the manpage.
|
.\" Please adjust this date whenever revising the manpage.
|
||||||
.\"
|
.\"
|
||||||
.\" Some roff macros, for reference:
|
.\" Some roff macros, for reference:
|
||||||
@ -82,7 +82,7 @@ A \fBtrack\fP stores a stream of bytes.
|
|||||||
.br
|
.br
|
||||||
Each track is initiated by one track source address argument, which may either
|
Each track is initiated by one track source address argument, which may either
|
||||||
be "-" for standard input or the address of a readable file. If no write mode
|
be "-" for standard input or the address of a readable file. If no write mode
|
||||||
is given explicitly then one will be chosen which matches the peculiarities
|
is given explicitely then one will be chosen which matches the peculiarities
|
||||||
of track sources and the state of the output media.
|
of track sources and the state of the output media.
|
||||||
.PP
|
.PP
|
||||||
More than one track can be burned by a single run of cdrskin.
|
More than one track can be burned by a single run of cdrskin.
|
||||||
@ -93,13 +93,13 @@ Some media types can be kept appendable so that further tracks can
|
|||||||
be written to them in subsequent runs of cdrskin (see option -multi).
|
be written to them in subsequent runs of cdrskin (see option -multi).
|
||||||
Info about the addresses of burned tracks is kept in a table of
|
Info about the addresses of burned tracks is kept in a table of
|
||||||
content (TOC) on media and can be retrieved via cdrskin option -toc.
|
content (TOC) on media and can be retrieved via cdrskin option -toc.
|
||||||
This information is also used by the operating systems' CD-ROM read drivers.
|
These informations are also used by the operating systems' CD-ROM read drivers.
|
||||||
.PP
|
.PP
|
||||||
In general there are two types of tracks: data and audio. They differ in
|
In general there are two types of tracks: data and audio. They differ in
|
||||||
sector size, throughput and readability via the systems' CD-ROM drivers
|
sector size, throughput and readability via the systems' CD-ROM drivers
|
||||||
resp. by music CD players. With DVD and BD there is only type data.
|
resp. by music CD players. With DVD and BD there is only type data.
|
||||||
.br
|
.br
|
||||||
If not explicitly option -audio is given, then any track is burned as type
|
If not explicitely option -audio is given, then any track is burned as type
|
||||||
data, unless the track source is a file with suffix ".wav" or ".au" and has a
|
data, unless the track source is a file with suffix ".wav" or ".au" and has a
|
||||||
header part which identifies it as MS-WAVE resp. SUN Audio with suitable
|
header part which identifies it as MS-WAVE resp. SUN Audio with suitable
|
||||||
parameters. Such files are burned as audio tracks by default.
|
parameters. Such files are burned as audio tracks by default.
|
||||||
@ -138,7 +138,7 @@ try to choose a write mode which matches the defined recording job,
|
|||||||
the capabilities of the drive and the state of the present media.
|
the capabilities of the drive and the state of the present media.
|
||||||
.br
|
.br
|
||||||
So the mentioning of write modes in the following paragraphs and in the
|
So the mentioning of write modes in the following paragraphs and in the
|
||||||
examples is not so much a demand that the user shall choose one explicitly,
|
examples is not so much a demand that the user shall choose one explicitely,
|
||||||
but rather an illustration of what to expect with particular media types.
|
but rather an illustration of what to expect with particular media types.
|
||||||
.SS
|
.SS
|
||||||
.B Recordable CD Media:
|
.B Recordable CD Media:
|
||||||
@ -181,20 +181,20 @@ With DVD-R[W] two write modes may be available:
|
|||||||
Mode DAO has many restrictions. It does not work with
|
Mode DAO has many restrictions. It does not work with
|
||||||
appendable media, allows no -multi and only a single track. The size of the
|
appendable media, allows no -multi and only a single track. The size of the
|
||||||
track needs to be known in advance. So either its source has to be a disk file
|
track needs to be known in advance. So either its source has to be a disk file
|
||||||
of recognizable size or the size has to be announced explicitly by options
|
of recognizable size or the size has to be announced explicitely by options
|
||||||
.B tsize=
|
.B tsize=
|
||||||
or
|
or
|
||||||
.B tao_to_sao_tsize= .
|
.B tao_to_sao_tsize= .
|
||||||
.br
|
.br
|
||||||
DAO is the only mode for media which do not offer feature 21h Incremental
|
DAO is the only mode for media which do not offer feature 21h Incremental
|
||||||
Streaming. DAO may also be selected explicitly by option
|
Streaming. DAO may also be selected explicitely by option
|
||||||
.B -sao .
|
.B -sao .
|
||||||
Program growisofs uses DAO on sequential DVD-R[W] media for maximum
|
Program growisofs uses DAO on sequential DVD-R[W] media for maximum
|
||||||
DVD-ROM/-Video compatibility.
|
DVD-ROM/-Video compatibility.
|
||||||
.br
|
.br
|
||||||
The other mode, Incremental Streaming, is the default write mode if
|
The other mode, Incremental Streaming, is the default write mode if
|
||||||
it is available and if the restrictions of DAO would prevent the job.
|
it is available and if the restrictions of DAO would prevent the job.
|
||||||
Incremental Streaming may be selected explicitly by option
|
Incremental Streaming may be selected explicitely by option
|
||||||
.B -tao
|
.B -tao
|
||||||
as it resembles much CD TAO by allowing track sources of
|
as it resembles much CD TAO by allowing track sources of
|
||||||
unpredicted length and to keep media appendable by option
|
unpredicted length and to keep media appendable by option
|
||||||
@ -225,7 +225,7 @@ Currently types DVD+RW, DVD-RW, DVD-RAM and BD-RE can be overwritten via
|
|||||||
cdrskin.
|
cdrskin.
|
||||||
.br
|
.br
|
||||||
Option -audio is not allowed. Only one track is allowed.
|
Option -audio is not allowed. Only one track is allowed.
|
||||||
Option -multi cannot mark a recognizable end of overwriteable media.
|
Option -multi cannot mark a recognizeable end of overwriteable media.
|
||||||
Therefore -multi is banned unless ISO-9660 images shall be expandable by help
|
Therefore -multi is banned unless ISO-9660 images shall be expandable by help
|
||||||
of option
|
of option
|
||||||
.B --grow_overwriteable_iso .
|
.B --grow_overwriteable_iso .
|
||||||
@ -350,7 +350,7 @@ print "Mounted Media:" and media type text.
|
|||||||
Announces that the subsequent tracks are to be burned as audio.
|
Announces that the subsequent tracks are to be burned as audio.
|
||||||
The source is supposed to be uncompressed headerless PCM, 44100 Hz, 16 bit,
|
The source is supposed to be uncompressed headerless PCM, 44100 Hz, 16 bit,
|
||||||
stereo. For little-endian byte order (which is usual on PCs) use option
|
stereo. For little-endian byte order (which is usual on PCs) use option
|
||||||
-swab. Unless marked explicitly by option -data, input files with suffix
|
-swab. Unless marked explicitely by option -data, input files with suffix
|
||||||
".wav" are examined wether they have a header in MS-WAVE format confirming
|
".wav" are examined wether they have a header in MS-WAVE format confirming
|
||||||
those parameters and eventually raw audio data get extracted and burned as
|
those parameters and eventually raw audio data get extracted and burned as
|
||||||
audio track. Same is done for suffix ".au" and SUN Audio.
|
audio track. Same is done for suffix ".au" and SUN Audio.
|
||||||
@ -527,7 +527,7 @@ of Bus,Target,Lun addresses.
|
|||||||
Set "driveropts=noburnfree" to disable the drive's eventual protection
|
Set "driveropts=noburnfree" to disable the drive's eventual protection
|
||||||
mechanism against temporary lack of source data (i.e. buffer underrun).
|
mechanism against temporary lack of source data (i.e. buffer underrun).
|
||||||
A drive that announces no such capabilities will not get them enabled anyway,
|
A drive that announces no such capabilities will not get them enabled anyway,
|
||||||
even if attempted explicitly via "driveropts=burnfree".
|
even if attempted explicitely via "driveropts=burnfree".
|
||||||
.TP
|
.TP
|
||||||
.BI \-dummy
|
.BI \-dummy
|
||||||
Try to perform the drive operations without actually affecting the inserted
|
Try to perform the drive operations without actually affecting the inserted
|
||||||
@ -597,7 +597,7 @@ will be used under the assumption that it is a single session filesystem.
|
|||||||
.br
|
.br
|
||||||
If not, then the burn run will be aborted.
|
If not, then the burn run will be aborted.
|
||||||
.br
|
.br
|
||||||
The range of -isosize is exactly one track. Further tracks may be preceded
|
The range of -isosize is exactly one track. Further tracks may be preceeded
|
||||||
by further -isosize options, though. At least 15 blocks of padding will be
|
by further -isosize options, though. At least 15 blocks of padding will be
|
||||||
added to each -isosize track. But be advised to rather use padsize=300k.
|
added to each -isosize track. But be advised to rather use padsize=300k.
|
||||||
.br
|
.br
|
||||||
@ -705,7 +705,7 @@ No -multi is allowed with DVD-R[W] -sao.
|
|||||||
only imposes restrictions without providing known advantages.
|
only imposes restrictions without providing known advantages.
|
||||||
.br
|
.br
|
||||||
-sao can only be used for tracks of fixely predicted size. This implies that
|
-sao can only be used for tracks of fixely predicted size. This implies that
|
||||||
track arguments which depict stdin or named pipes need to be preceded by
|
track arguments which depict stdin or named pipes need to be preceeded by
|
||||||
option tsize= or by option tao_to_sao_tsize=.
|
option tsize= or by option tao_to_sao_tsize=.
|
||||||
.br
|
.br
|
||||||
-sao cannot be used on appendable media.
|
-sao cannot be used on appendable media.
|
||||||
@ -822,7 +822,7 @@ Alphabetical list of options which are genuine to cdrskin and intended for
|
|||||||
normal use:
|
normal use:
|
||||||
.TP
|
.TP
|
||||||
.BI \--adjust_speed_to_drive
|
.BI \--adjust_speed_to_drive
|
||||||
Curb explicitly given speed= values to the maximum which is announced by the
|
Curb explicitely given speed= values to the maximum which is announced by the
|
||||||
drive for the loaded media. By default, such an adjustment is only made with
|
drive for the loaded media. By default, such an adjustment is only made with
|
||||||
pseudo-speeds 0 and -1 whereas speed settings > 0 are sent unchanged to the
|
pseudo-speeds 0 and -1 whereas speed settings > 0 are sent unchanged to the
|
||||||
drive which will then choose an appropriate speed on its own.
|
drive which will then choose an appropriate speed on its own.
|
||||||
@ -916,7 +916,7 @@ to cdrskin, then cdrskin will delegate the job to said command.
|
|||||||
The natural commands to be given are cdrecord or wodim but one may well submit
|
The natural commands to be given are cdrecord or wodim but one may well submit
|
||||||
the address of an own program.
|
the address of an own program.
|
||||||
.br
|
.br
|
||||||
The fallback program will get all arguments of cdrskin which do not match
|
The fallback programm will get all arguments of cdrskin which do not match
|
||||||
the shell patterns --?* or *_*=* . This eventually suppresses path names of
|
the shell patterns --?* or *_*=* . This eventually suppresses path names of
|
||||||
track sources which happen to match those patterns. The options from the
|
track sources which happen to match those patterns. The options from the
|
||||||
startup files are not handed to the fallback program.
|
startup files are not handed to the fallback program.
|
||||||
@ -962,12 +962,12 @@ source is a ISO-9660 filesystem image.
|
|||||||
With overwriteable media and no option blank=fast|all present it expands an
|
With overwriteable media and no option blank=fast|all present it expands an
|
||||||
eventual ISO-9660 filesystem on media. It is assumed that this image's inner
|
eventual ISO-9660 filesystem on media. It is assumed that this image's inner
|
||||||
size description points to the end of the valuable data.
|
size description points to the end of the valuable data.
|
||||||
Overwriteable media with a recognizable ISO-9660 size will be regarded as
|
Overwriteable media with a recognizeable ISO-9660 size will be regarded as
|
||||||
appendable rather than as blank. I.e. options -msinfo and -toc will work.
|
appendable rather than as blank. I.e. options -msinfo and -toc will work.
|
||||||
-toc will always show a single session with its size increasing with
|
-toc will always show a single session with its size increasing with
|
||||||
every added mkisofs image.
|
every added mkisofs image.
|
||||||
.br
|
.br
|
||||||
If not overridden by option write_start_address=, the track with the new image
|
If not overriden by option write_start_address=, the track with the new image
|
||||||
will be placed behind the end of the old one. One may use option
|
will be placed behind the end of the old one. One may use option
|
||||||
assert_write_lba= to make sure that media state and mkisofs job do match.
|
assert_write_lba= to make sure that media state and mkisofs job do match.
|
||||||
.br
|
.br
|
||||||
@ -1062,7 +1062,7 @@ the available capacity. So for most realistic results one may set up
|
|||||||
the full burn session and add --tell_media_space. But if one has to expect
|
the full burn session and add --tell_media_space. But if one has to expect
|
||||||
a cdrskin version prior to 0.3.3 no track source should be given in order
|
a cdrskin version prior to 0.3.3 no track source should be given in order
|
||||||
not to start an involuntary burn session.
|
not to start an involuntary burn session.
|
||||||
In this case set at least -sao or -tao explicitly.
|
In this case set at least -sao or -tao explicitely.
|
||||||
.br
|
.br
|
||||||
The result gets printed to standard output. It is 0 or empty if no writing
|
The result gets printed to standard output. It is 0 or empty if no writing
|
||||||
is possible with the given options.
|
is possible with the given options.
|
||||||
@ -1130,7 +1130,7 @@ Wether this leads to senseful behavior depends on operating system and kernel.
|
|||||||
Linux specific: Select a SCSI device file family to be scanned for by
|
Linux specific: Select a SCSI device file family to be scanned for by
|
||||||
options --devices and -scanbus.
|
options --devices and -scanbus.
|
||||||
Normally this is /dev/sgN on kernel versions < 2.6 and /dev/srN
|
Normally this is /dev/sgN on kernel versions < 2.6 and /dev/srN
|
||||||
on kernels >= 2.6 . This option allows to explicitly override that default
|
on kernels >= 2.6 . This option allows to explicitely override that default
|
||||||
in order to meet other programs at a common device file for each drive.
|
in order to meet other programs at a common device file for each drive.
|
||||||
On kernel 2.4 families sr and scd will find no drives.
|
On kernel 2.4 families sr and scd will find no drives.
|
||||||
.br
|
.br
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
cdrskin.c , Copyright 2006-2010 Thomas Schmitt <scdbackup@gmx.net>
|
cdrskin.c , Copyright 2006-2010 Thomas Schmitt <scdbackup@gmx.net>
|
||||||
Provided under GPL version 2 or later.
|
Provided under GPL version 2 or later. See future commitment below.
|
||||||
|
|
||||||
A cdrecord compatible command line interface for libburn.
|
A cdrecord compatible command line interface for libburn.
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ or
|
|||||||
|
|
||||||
/** The official program version */
|
/** The official program version */
|
||||||
#ifndef Cdrskin_prog_versioN
|
#ifndef Cdrskin_prog_versioN
|
||||||
#define Cdrskin_prog_versioN "0.8.0"
|
#define Cdrskin_prog_versioN "0.7.6"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** The official libburn interface revision to use.
|
/** The official libburn interface revision to use.
|
||||||
@ -98,10 +98,10 @@ or
|
|||||||
#define Cdrskin_libburn_majoR 0
|
#define Cdrskin_libburn_majoR 0
|
||||||
#endif
|
#endif
|
||||||
#ifndef Cdrskin_libburn_minoR
|
#ifndef Cdrskin_libburn_minoR
|
||||||
#define Cdrskin_libburn_minoR 8
|
#define Cdrskin_libburn_minoR 7
|
||||||
#endif
|
#endif
|
||||||
#ifndef Cdrskin_libburn_micrO
|
#ifndef Cdrskin_libburn_micrO
|
||||||
#define Cdrskin_libburn_micrO 0
|
#define Cdrskin_libburn_micrO 6
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -135,47 +135,43 @@ or
|
|||||||
#endif /* Cdrskin_libburn_cvs_A60220_tS */
|
#endif /* Cdrskin_libburn_cvs_A60220_tS */
|
||||||
|
|
||||||
|
|
||||||
#ifdef Cdrskin_libburn_0_8_0
|
#ifdef Cdrskin_libburn_0_7_6
|
||||||
#define Cdrskin_libburn_versioN "0.8.0"
|
#define Cdrskin_libburn_versioN "0.7.6"
|
||||||
#define Cdrskin_libburn_from_pykix_svN 1
|
#define Cdrskin_libburn_from_pykix_svN 1
|
||||||
#endif /* Cdrskin_libburn_0_8_0 */
|
#endif /* Cdrskin_libburn_0_7_6 */
|
||||||
|
|
||||||
#ifdef Cdrskin_libburn_0_8_1
|
#ifdef Cdrskin_libburn_0_7_7
|
||||||
#define Cdrskin_libburn_versioN "0.8.1"
|
#define Cdrskin_libburn_versioN "0.7.7"
|
||||||
#define Cdrskin_libburn_from_pykix_svN 1
|
#define Cdrskin_libburn_from_pykix_svN 1
|
||||||
|
|
||||||
/* Place novelty switch macros here.
|
/* Place novelty switch macros here.
|
||||||
Move them down to Cdrskin_libburn_from_pykix_svN on version leap
|
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_0_7_7 */
|
||||||
#endif /* Cdrskin_libburn_0_8_1 */
|
|
||||||
|
|
||||||
#ifndef Cdrskin_libburn_versioN
|
#ifndef Cdrskin_libburn_versioN
|
||||||
#define Cdrskin_libburn_0_8_0
|
#define Cdrskin_libburn_0_7_6
|
||||||
#define Cdrskin_libburn_versioN "0.8.0"
|
#define Cdrskin_libburn_versioN "0.7.6"
|
||||||
#define Cdrskin_libburn_from_pykix_svN 1
|
#define Cdrskin_libburn_from_pykix_svN 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Cdrskin_libburn_0_8_0
|
#ifdef Cdrskin_libburn_0_7_6
|
||||||
#undef Cdrskin_libburn_majoR
|
#undef Cdrskin_libburn_majoR
|
||||||
#undef Cdrskin_libburn_minoR
|
#undef Cdrskin_libburn_minoR
|
||||||
#undef Cdrskin_libburn_micrO
|
#undef Cdrskin_libburn_micrO
|
||||||
#define Cdrskin_libburn_majoR 0
|
#define Cdrskin_libburn_majoR 0
|
||||||
#define Cdrskin_libburn_minoR 8
|
#define Cdrskin_libburn_minoR 7
|
||||||
#define Cdrskin_libburn_micrO 0
|
#define Cdrskin_libburn_micrO 6
|
||||||
#endif
|
#endif
|
||||||
#ifdef Cdrskin_libburn_0_8_1
|
#ifdef Cdrskin_libburn_0_7_7
|
||||||
#undef Cdrskin_libburn_majoR
|
#undef Cdrskin_libburn_majoR
|
||||||
#undef Cdrskin_libburn_minoR
|
#undef Cdrskin_libburn_minoR
|
||||||
#undef Cdrskin_libburn_micrO
|
#undef Cdrskin_libburn_micrO
|
||||||
#define Cdrskin_libburn_majoR 0
|
#define Cdrskin_libburn_majoR 0
|
||||||
#define Cdrskin_libburn_minoR 8
|
#define Cdrskin_libburn_minoR 7
|
||||||
#define Cdrskin_libburn_micrO 1
|
#define Cdrskin_libburn_micrO 7
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -372,34 +368,7 @@ or
|
|||||||
#define Cleanup_app_handler_T burn_abort_handler_t
|
#define Cleanup_app_handler_T burn_abort_handler_t
|
||||||
#else
|
#else
|
||||||
#include "cleanup.h"
|
#include "cleanup.h"
|
||||||
#ifdef Cdrskin_use_libburn_cleanuP
|
|
||||||
#undef Cdrskin_use_libburn_cleanuP
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
# define Cdrskin_use_libburn_cleanuP 1
|
|
||||||
*/
|
|
||||||
/* May not use libburn cleanup with cdrskin fifo */
|
|
||||||
#ifndef Cdrskin_use_libburn_fifO
|
|
||||||
#ifdef Cdrskin_use_libburn_cleanuP
|
|
||||||
#undef Cdrskin_use_libburn_cleanuP
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef Cdrskin_use_libburn_cleanuP
|
|
||||||
#define Cleanup_handler_funC NULL
|
|
||||||
#define Cleanup_handler_handlE "cdrskin: "
|
|
||||||
#define Cleanup_handler_flaG 48
|
|
||||||
#else
|
|
||||||
#define Cleanup_handler_funC (Cleanup_app_handler_T) Cdrskin_abort_handler
|
|
||||||
#define Cleanup_handler_handlE skin
|
|
||||||
#define Cleanup_handler_flaG 4
|
|
||||||
#endif /* ! Cdrskin_use_libburn_cleanuP */
|
|
||||||
|
|
||||||
/* 0= no abort going on, -1= Cdrskin_abort_handler was called
|
|
||||||
*/
|
|
||||||
static int Cdrskin_abort_leveL= 0;
|
|
||||||
|
|
||||||
|
|
||||||
/** The size of a string buffer for pathnames and similar texts */
|
/** The size of a string buffer for pathnames and similar texts */
|
||||||
@ -1827,6 +1796,7 @@ int Cdrtrack_add_to_session(struct CdrtracK *track, int trackno,
|
|||||||
|
|
||||||
Cdrskin_get_fifo_par(track->boss, &fifo_enabled, &fifo_size, &fifo_start_at,
|
Cdrskin_get_fifo_par(track->boss, &fifo_enabled, &fifo_size, &fifo_start_at,
|
||||||
0);
|
0);
|
||||||
|
fd_src= src;
|
||||||
|
|
||||||
if(track->track_type == BURN_AUDIO)
|
if(track->track_type == BURN_AUDIO)
|
||||||
chunksize= 2352;
|
chunksize= 2352;
|
||||||
@ -1836,7 +1806,6 @@ int Cdrtrack_add_to_session(struct CdrtracK *track, int trackno,
|
|||||||
chunksize= 2048;
|
chunksize= 2048;
|
||||||
chunks= fifo_size / chunksize;
|
chunks= fifo_size / chunksize;
|
||||||
if(chunks > 1 && fifo_enabled) {
|
if(chunks > 1 && fifo_enabled) {
|
||||||
fd_src= src;
|
|
||||||
src= burn_fifo_source_new(fd_src, chunksize, chunks,
|
src= burn_fifo_source_new(fd_src, chunksize, chunks,
|
||||||
(chunksize * chunks >= 128 * 1024));
|
(chunksize * chunks >= 128 * 1024));
|
||||||
if((flag & 1) || src == NULL)
|
if((flag & 1) || src == NULL)
|
||||||
@ -3646,7 +3615,6 @@ int Cdrskin_new(struct CdrskiN **skin, struct CdrpreskiN *preskin, int flag)
|
|||||||
o->write_type= BURN_WRITE_SAO;
|
o->write_type= BURN_WRITE_SAO;
|
||||||
o->block_type= BURN_BLOCK_SAO;
|
o->block_type= BURN_BLOCK_SAO;
|
||||||
o->multi= 0;
|
o->multi= 0;
|
||||||
o->cdxa_conversion= 0;
|
|
||||||
o->modesty_on_drive= 0;
|
o->modesty_on_drive= 0;
|
||||||
o->min_buffer_percent= 65;
|
o->min_buffer_percent= 65;
|
||||||
o->max_buffer_percent= 95;
|
o->max_buffer_percent= 95;
|
||||||
@ -4118,8 +4086,7 @@ ex:;
|
|||||||
#ifdef Cdrskin_grab_abort_brokeN
|
#ifdef Cdrskin_grab_abort_brokeN
|
||||||
if(restore_handler) {
|
if(restore_handler) {
|
||||||
int Cdrskin_abort_handler(struct CdrskiN *, int, int);
|
int Cdrskin_abort_handler(struct CdrskiN *, int, int);
|
||||||
Cleanup_set_handlers(Cleanup_handler_handlE, Cleanup_handler_funC,
|
Cleanup_set_handlers(skin,(Cleanup_app_handler_T) Cdrskin_abort_handler,4);
|
||||||
Cleanup_handler_flaG);
|
|
||||||
}
|
}
|
||||||
#endif /* Cdrskin_grab_abort_brokeN */
|
#endif /* Cdrskin_grab_abort_brokeN */
|
||||||
|
|
||||||
@ -4152,42 +4119,17 @@ int Cdrskin_release_drive(struct CdrskiN *skin, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Cdrskin__is_aborting(int flag)
|
|
||||||
{
|
|
||||||
if(Cdrskin_abort_leveL)
|
|
||||||
return(-1);
|
|
||||||
return(burn_is_aborting(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int Cdrskin_abort(struct CdrskiN *skin, int flag)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
Cdrskin_abort_leveL= 1;
|
|
||||||
ret= burn_abort(skin->abort_max_wait, burn_abort_pacifier, "cdrskin: ");
|
|
||||||
if(ret<=0) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"\ncdrskin: ABORT : Cannot cancel burn session and release drive.\n");
|
|
||||||
return(0);
|
|
||||||
} else {
|
|
||||||
fprintf(stderr,
|
|
||||||
"cdrskin: ABORT : Drive is released and library is shut down now.\n");
|
|
||||||
}
|
|
||||||
fprintf(stderr,
|
|
||||||
"cdrskin: ABORT : Program done. Even if you do not see a shell prompt.\n");
|
|
||||||
fprintf(stderr,"\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** Clean up resources in abort situations. To be called by Cleanup subsystem
|
/** Clean up resources in abort situations. To be called by Cleanup subsystem
|
||||||
but hardly ever by the application. The program must exit afterwards.
|
but hardly ever by the application. The program must exit afterwards.
|
||||||
*/
|
*/
|
||||||
int Cdrskin_abort_handler(struct CdrskiN *skin, int signum, int flag)
|
int Cdrskin_abort_handler(struct CdrskiN *skin, int signum, int flag)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifndef Cdrskin_libburn_has_burn_aborT
|
#ifdef Cdrskin_libburn_has_burn_aborT
|
||||||
|
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
int wait_grain= 100000,first_status= 1;
|
int wait_grain= 100000,first_status= 1;
|
||||||
double start_time,last_time,current_time;
|
double start_time,last_time,current_time;
|
||||||
@ -4239,15 +4181,14 @@ int Cdrskin_abort_handler(struct CdrskiN *skin, int signum, int flag)
|
|||||||
fprintf(stderr,"cdrskin: ABORT : Usually it is done with 4x speed after about a MINUTE\n");
|
fprintf(stderr,"cdrskin: ABORT : Usually it is done with 4x speed after about a MINUTE\n");
|
||||||
fprintf(stderr,"cdrskin: URGE : But wait at least the normal burning time before any kill -9\n");
|
fprintf(stderr,"cdrskin: URGE : But wait at least the normal burning time before any kill -9\n");
|
||||||
}
|
}
|
||||||
if(skin->verbosity>=Cdrskin_verbose_debuG)
|
|
||||||
ClN(fprintf(stderr,"cdrskin_debug: ABORT : Calling burn_abort()\n"));
|
|
||||||
|
|
||||||
Cdrskin_abort_leveL= -1;
|
ret= burn_abort(skin->abort_max_wait, burn_abort_pacifier, "cdrskin: ");
|
||||||
if (!(flag & 1))
|
if(ret<=0) {
|
||||||
burn_abort(-1, burn_abort_pacifier, "cdrskin: ");
|
fprintf(stderr,
|
||||||
fprintf(stderr,
|
"\ncdrskin: ABORT : Cannot cancel burn session and release drive.\n");
|
||||||
"cdrskin: ABORT : Urged drive worker threads to do emergency halt.\n");
|
return(0);
|
||||||
return -2;
|
}
|
||||||
|
fprintf(stderr,"\n");
|
||||||
|
|
||||||
#else /* Cdrskin_libburn_has_burn_aborT */
|
#else /* Cdrskin_libburn_has_burn_aborT */
|
||||||
|
|
||||||
@ -5276,8 +5217,8 @@ int Cdrskin_minfo(struct CdrskiN *skin, int flag)
|
|||||||
/* If last two blocks not readable then assume TAO and subtract 2
|
/* If last two blocks not readable then assume TAO and subtract 2
|
||||||
from lra and size.
|
from lra and size.
|
||||||
*/;
|
*/;
|
||||||
ret= burn_read_data(drive, (off_t) (lra - 1) * (off_t) 2048, buf,
|
ret= burn_read_data(drive, (off_t) lra * (off_t) 2048, buf, 2 * 2048,
|
||||||
2 * 2048, &buf_count, 2 | 4);
|
&buf_count, 2 | 4);
|
||||||
if(ret <= 0) {
|
if(ret <= 0) {
|
||||||
lra-= 2;
|
lra-= 2;
|
||||||
size-= 2;
|
size-= 2;
|
||||||
@ -6092,8 +6033,6 @@ ex:;
|
|||||||
skin->drive_is_busy= 0;
|
skin->drive_is_busy= 0;
|
||||||
if(skin->drive_is_grabbed)
|
if(skin->drive_is_grabbed)
|
||||||
Cdrskin_release_drive(skin,0);
|
Cdrskin_release_drive(skin,0);
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
Cdrskin_abort(skin, 0); /* Never comes back */
|
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6147,9 +6086,6 @@ int Cdrskin_burn_pacifier(struct CdrskiN *skin,
|
|||||||
/* for debugging */
|
/* for debugging */
|
||||||
static double last_fifo_in= 0.0,last_fifo_out= 0.0,curr_fifo_in,curr_fifo_out;
|
static double last_fifo_in= 0.0,last_fifo_out= 0.0,curr_fifo_in,curr_fifo_out;
|
||||||
|
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
Cdrskin_abort(skin, 0); /* Never comes back */
|
|
||||||
|
|
||||||
current_time= Sfile_microtime(0);
|
current_time= Sfile_microtime(0);
|
||||||
elapsed_total_time= current_time-start_time;
|
elapsed_total_time= current_time-start_time;
|
||||||
elapsed_time= current_time-*last_time;
|
elapsed_time= current_time-*last_time;
|
||||||
@ -7358,8 +7294,7 @@ fifo_filling_failed:;
|
|||||||
skin->drive_is_busy= 1;
|
skin->drive_is_busy= 1;
|
||||||
burn_disc_write(o, disc);
|
burn_disc_write(o, disc);
|
||||||
if(skin->preskin->abort_handler==-1)
|
if(skin->preskin->abort_handler==-1)
|
||||||
Cleanup_set_handlers(Cleanup_handler_handlE, Cleanup_handler_funC,
|
Cleanup_set_handlers(skin,(Cleanup_app_handler_T) Cdrskin_abort_handler,4);
|
||||||
Cleanup_handler_flaG);
|
|
||||||
last_time= start_time= Sfile_microtime(0);
|
last_time= start_time= Sfile_microtime(0);
|
||||||
|
|
||||||
burn_write_opts_free(o);
|
burn_write_opts_free(o);
|
||||||
@ -7378,7 +7313,7 @@ fifo_filling_failed:;
|
|||||||
|
|
||||||
/* >>> how do i learn about success or failure ? */
|
/* >>> how do i learn about success or failure ? */
|
||||||
|
|
||||||
if(loop_counter>0 || Cdrskin__is_aborting(0))
|
if(loop_counter>0)
|
||||||
Cdrskin_burn_pacifier(skin,drive_status,&p,start_time,&last_time,
|
Cdrskin_burn_pacifier(skin,drive_status,&p,start_time,&last_time,
|
||||||
&total_count,&last_count,&min_buffer_fill,0);
|
&total_count,&last_count,&min_buffer_fill,0);
|
||||||
|
|
||||||
@ -7452,9 +7387,6 @@ fifo_filling_failed:;
|
|||||||
if(skin->verbosity>=Cdrskin_verbose_progresS)
|
if(skin->verbosity>=Cdrskin_verbose_progresS)
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
Cdrskin_abort(skin, 0); /* Never comes back */
|
|
||||||
|
|
||||||
#ifdef Cdrskin_libburn_has_wrote_welL
|
#ifdef Cdrskin_libburn_has_wrote_welL
|
||||||
wrote_well = burn_drive_wrote_well(drive);
|
wrote_well = burn_drive_wrote_well(drive);
|
||||||
#endif
|
#endif
|
||||||
@ -8953,11 +8885,9 @@ int Cdrskin_create(struct CdrskiN **o, struct CdrpreskiN **preskin,
|
|||||||
*o= skin;
|
*o= skin;
|
||||||
if(skin->preskin->abort_handler==1 || skin->preskin->abort_handler==3 ||
|
if(skin->preskin->abort_handler==1 || skin->preskin->abort_handler==3 ||
|
||||||
skin->preskin->abort_handler==4)
|
skin->preskin->abort_handler==4)
|
||||||
Cleanup_set_handlers(Cleanup_handler_handlE, Cleanup_handler_funC,
|
Cleanup_set_handlers(skin,(Cleanup_app_handler_T) Cdrskin_abort_handler,4);
|
||||||
Cleanup_handler_flaG);
|
|
||||||
else if(skin->preskin->abort_handler==2)
|
else if(skin->preskin->abort_handler==2)
|
||||||
Cleanup_set_handlers(Cleanup_handler_handlE, Cleanup_handler_funC,
|
Cleanup_set_handlers(skin,(Cleanup_app_handler_T) Cdrskin_abort_handler,2|8);
|
||||||
2 | 8);
|
|
||||||
|
|
||||||
printf("cdrskin: scanning for devices ...\n");
|
printf("cdrskin: scanning for devices ...\n");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
@ -9033,28 +8963,21 @@ int Cdrskin_run(struct CdrskiN *skin, int *exit_value, int flag)
|
|||||||
if(skin->do_devices) {
|
if(skin->do_devices) {
|
||||||
if(skin->n_drives<=0 && skin->preskin->scan_demands_drive)
|
if(skin->n_drives<=0 && skin->preskin->scan_demands_drive)
|
||||||
{*exit_value= 4; goto no_drive;}
|
{*exit_value= 4; goto no_drive;}
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
goto ex;
|
|
||||||
ret= Cdrskin_scanbus(skin,1);
|
ret= Cdrskin_scanbus(skin,1);
|
||||||
if(ret<=0) {
|
if(ret<=0) {
|
||||||
fprintf(stderr,"cdrskin: FATAL : --devices failed.\n");
|
fprintf(stderr,"cdrskin: FATAL : --devices failed.\n");
|
||||||
{*exit_value= 4; goto ex;}
|
{*exit_value= 4; goto ex;}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(skin->do_scanbus) {
|
if(skin->do_scanbus) {
|
||||||
if(skin->n_drives<=0 && skin->preskin->scan_demands_drive)
|
if(skin->n_drives<=0 && skin->preskin->scan_demands_drive)
|
||||||
{*exit_value= 5; goto no_drive;}
|
{*exit_value= 5; goto no_drive;}
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
goto ex;
|
|
||||||
ret= Cdrskin_scanbus(skin,0);
|
ret= Cdrskin_scanbus(skin,0);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
fprintf(stderr,"cdrskin: FATAL : -scanbus failed.\n");
|
fprintf(stderr,"cdrskin: FATAL : -scanbus failed.\n");
|
||||||
{*exit_value= 5*(ret<=0); goto ex;}
|
{*exit_value= 5*(ret<=0); goto ex;}
|
||||||
}
|
}
|
||||||
if(skin->do_load) {
|
if(skin->do_load) {
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
goto ex;
|
|
||||||
ret= Cdrskin_grab_drive(skin,8);
|
ret= Cdrskin_grab_drive(skin,8);
|
||||||
if(ret>0) {
|
if(ret>0) {
|
||||||
if(skin->do_load==2 && !skin->do_eject) {
|
if(skin->do_load==2 && !skin->do_eject) {
|
||||||
@ -9070,16 +8993,12 @@ int Cdrskin_run(struct CdrskiN *skin, int *exit_value, int flag)
|
|||||||
{*exit_value= 14*(ret<=0); goto ex;}
|
{*exit_value= 14*(ret<=0); goto ex;}
|
||||||
}
|
}
|
||||||
if(skin->do_checkdrive) {
|
if(skin->do_checkdrive) {
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
goto ex;
|
|
||||||
ret= Cdrskin_checkdrive(skin,"",(skin->do_checkdrive==2)<<1);
|
ret= Cdrskin_checkdrive(skin,"",(skin->do_checkdrive==2)<<1);
|
||||||
{*exit_value= 6*(ret<=0); goto ex;}
|
{*exit_value= 6*(ret<=0); goto ex;}
|
||||||
}
|
}
|
||||||
if(skin->do_msinfo) {
|
if(skin->do_msinfo) {
|
||||||
if(skin->n_drives<=0)
|
if(skin->n_drives<=0)
|
||||||
{*exit_value= 12; goto no_drive;}
|
{*exit_value= 12; goto no_drive;}
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
goto ex;
|
|
||||||
ret= Cdrskin_msinfo(skin,0);
|
ret= Cdrskin_msinfo(skin,0);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
{*exit_value= 12; goto ex;}
|
{*exit_value= 12; goto ex;}
|
||||||
@ -9087,8 +9006,6 @@ int Cdrskin_run(struct CdrskiN *skin, int *exit_value, int flag)
|
|||||||
if(skin->do_atip) {
|
if(skin->do_atip) {
|
||||||
if(skin->n_drives<=0)
|
if(skin->n_drives<=0)
|
||||||
{*exit_value= 7; goto no_drive;}
|
{*exit_value= 7; goto no_drive;}
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
goto ex;
|
|
||||||
ret= Cdrskin_atip(skin, skin->do_atip == 4 ? 4 :
|
ret= Cdrskin_atip(skin, skin->do_atip == 4 ? 4 :
|
||||||
(skin->do_atip>1) | (2 * (skin->do_atip > 2)));
|
(skin->do_atip>1) | (2 * (skin->do_atip > 2)));
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
@ -9097,8 +9014,6 @@ int Cdrskin_run(struct CdrskiN *skin, int *exit_value, int flag)
|
|||||||
if(skin->do_list_formats) {
|
if(skin->do_list_formats) {
|
||||||
if(skin->n_drives<=0)
|
if(skin->n_drives<=0)
|
||||||
{*exit_value= 14; goto no_drive;}
|
{*exit_value= 14; goto no_drive;}
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
goto ex;
|
|
||||||
ret= Cdrskin_list_formats(skin, 0);
|
ret= Cdrskin_list_formats(skin, 0);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
{*exit_value= 14; goto ex;}
|
{*exit_value= 14; goto ex;}
|
||||||
@ -9106,8 +9021,6 @@ int Cdrskin_run(struct CdrskiN *skin, int *exit_value, int flag)
|
|||||||
if(skin->do_blank) {
|
if(skin->do_blank) {
|
||||||
if(skin->n_drives<=0)
|
if(skin->n_drives<=0)
|
||||||
{*exit_value= 8; goto no_drive;}
|
{*exit_value= 8; goto no_drive;}
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
goto ex;
|
|
||||||
ret= Cdrskin_blank(skin,0);
|
ret= Cdrskin_blank(skin,0);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
{*exit_value= 8; goto ex;}
|
{*exit_value= 8; goto ex;}
|
||||||
@ -9116,8 +9029,6 @@ int Cdrskin_run(struct CdrskiN *skin, int *exit_value, int flag)
|
|||||||
#ifdef Cdrskin_libburn_has_random_access_rW
|
#ifdef Cdrskin_libburn_has_random_access_rW
|
||||||
if(skin->do_direct_write) {
|
if(skin->do_direct_write) {
|
||||||
skin->do_burn= 0;
|
skin->do_burn= 0;
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
goto ex;
|
|
||||||
ret= Cdrskin_direct_write(skin,0);
|
ret= Cdrskin_direct_write(skin,0);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
{*exit_value= 13; goto ex;}
|
{*exit_value= 13; goto ex;}
|
||||||
@ -9127,15 +9038,11 @@ int Cdrskin_run(struct CdrskiN *skin, int *exit_value, int flag)
|
|||||||
if(skin->do_burn || skin->tell_media_space) {
|
if(skin->do_burn || skin->tell_media_space) {
|
||||||
if(skin->n_drives<=0)
|
if(skin->n_drives<=0)
|
||||||
{*exit_value= 10; goto no_drive;}
|
{*exit_value= 10; goto no_drive;}
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
goto ex;
|
|
||||||
ret= Cdrskin_burn(skin,0);
|
ret= Cdrskin_burn(skin,0);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
{*exit_value= 10; goto ex;}
|
{*exit_value= 10; goto ex;}
|
||||||
}
|
}
|
||||||
ex:;
|
ex:;
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
Cdrskin_abort(skin, 0); /* Never comes back */
|
|
||||||
return((*exit_value)==0);
|
return((*exit_value)==0);
|
||||||
no_drive:;
|
no_drive:;
|
||||||
fprintf(stderr,"cdrskin: FATAL : This run would need an accessible drive\n");
|
fprintf(stderr,"cdrskin: FATAL : This run would need an accessible drive\n");
|
||||||
@ -9183,7 +9090,7 @@ int main(int argc, char **argv)
|
|||||||
messaging need libburn running */
|
messaging need libburn running */
|
||||||
ret= Cdrpreskin_initialize_lib(preskin,0);
|
ret= Cdrpreskin_initialize_lib(preskin,0);
|
||||||
if(ret<=0) {
|
if(ret<=0) {
|
||||||
fprintf(stderr,"cdrskin: FATAL : Initialization of burn library failed\n");
|
fprintf(stderr,"cdrskin: FATAL : Initializiation of burn library failed\n");
|
||||||
{exit_value= 2; goto ex;}
|
{exit_value= 2; goto ex;}
|
||||||
}
|
}
|
||||||
lib_initialized= 1;
|
lib_initialized= 1;
|
||||||
@ -9223,13 +9130,9 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Cdrskin__is_aborting(0))
|
Cdrskin_run(skin,&exit_value,0);
|
||||||
Cdrskin_run(skin,&exit_value,0);
|
|
||||||
|
|
||||||
ex:;
|
ex:;
|
||||||
if(Cdrskin__is_aborting(0))
|
|
||||||
Cdrskin_abort(skin, 0); /* Never comes back */
|
|
||||||
|
|
||||||
if(preskin!=NULL)
|
if(preskin!=NULL)
|
||||||
h_preskin= preskin;
|
h_preskin= preskin;
|
||||||
else if(skin!=NULL)
|
else if(skin!=NULL)
|
||||||
|
@ -62,7 +62,7 @@ via SCSI, PATA (aka IDE, ATA), USB, or SATA.
|
|||||||
GPL software included:<BR>
|
GPL software included:<BR>
|
||||||
</H2>
|
</H2>
|
||||||
<DL>
|
<DL>
|
||||||
<DT>libburn-0.8.0</DT>
|
<DT>libburn-0.7.6</DT>
|
||||||
<DD>(founded by Derek Foreman and Ben Jansens,
|
<DD>(founded by Derek Foreman and Ben Jansens,
|
||||||
developed and maintained since August 2006 by
|
developed and maintained since August 2006 by
|
||||||
Thomas Schmitt from team of libburnia-project.org)
|
Thomas Schmitt from team of libburnia-project.org)
|
||||||
@ -194,8 +194,8 @@ Standalone ISO 9660 multi-session CD/DVD/BD tool
|
|||||||
<P>
|
<P>
|
||||||
<DL>
|
<DL>
|
||||||
<DT>Download as source code (see README):</DT>
|
<DT>Download as source code (see README):</DT>
|
||||||
<DD><A HREF="cdrskin-0.8.0.pl00.tar.gz">cdrskin-0.8.0.pl00.tar.gz</A>
|
<DD><A HREF="cdrskin-0.7.6.pl00.tar.gz">cdrskin-0.7.6.pl00.tar.gz</A>
|
||||||
(835 KB).
|
(810 KB).
|
||||||
</DD>
|
</DD>
|
||||||
<DD>
|
<DD>
|
||||||
The cdrskin tarballs are source code identical with libburn releases
|
The cdrskin tarballs are source code identical with libburn releases
|
||||||
@ -244,21 +244,22 @@ cdrskin_0.4.2.pl00-x86-suse9_0-static.tar.gz</A>, (310 KB), -static compiled,
|
|||||||
<HR>
|
<HR>
|
||||||
|
|
||||||
<P>
|
<P>
|
||||||
Enhancements towards previous stable version cdrskin-0.7.8.pl00:
|
Enhancements towards previous stable version cdrskin-0.7.4.pl00:
|
||||||
<UL>
|
<UL>
|
||||||
<LI>
|
<LI>
|
||||||
Now able to work with ahci driver of FreeBSD 8-STABLE
|
Made FreeBSD system adapter safe from mutal burn spoiling and drive deadlock
|
||||||
</LI>
|
</LI>
|
||||||
|
<LI>Experimental system adapter via GNU libcdio on X/Open systems</LI>
|
||||||
|
<LI>Experimentally using FreeBSD system adapter for Debian kfreebsd</LI>
|
||||||
<!--
|
<!--
|
||||||
<LI>none</LI>
|
<LI>none</LI>
|
||||||
-->
|
-->
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
Bug fixes towards cdrskin-0.7.8.pl00:
|
Bug fixes towards cdrskin-0.7.4.pl00:
|
||||||
<UL>
|
<UL>
|
||||||
<LI>none</LI>
|
<LI>none</LI>
|
||||||
<!--
|
<!--
|
||||||
<LI>none</LI>
|
|
||||||
-->
|
-->
|
||||||
</UL>
|
</UL>
|
||||||
|
|
||||||
@ -266,8 +267,8 @@ Bug fixes towards cdrskin-0.7.8.pl00:
|
|||||||
|
|
||||||
<P>
|
<P>
|
||||||
<DL>
|
<DL>
|
||||||
<DT><H3>Development snapshot, version 0.8.1 :</H3></DT>
|
<DT><H3>Development snapshot, version 0.7.7 :</H3></DT>
|
||||||
<DD>Enhancements towards current stable version 0.8.0.pl00:
|
<DD>Enhancements towards current stable version 0.7.6.pl00:
|
||||||
<UL>
|
<UL>
|
||||||
<LI>none yet</LI>
|
<LI>none yet</LI>
|
||||||
<!--
|
<!--
|
||||||
@ -276,7 +277,7 @@ Bug fixes towards cdrskin-0.7.8.pl00:
|
|||||||
</UL>
|
</UL>
|
||||||
</DD>
|
</DD>
|
||||||
|
|
||||||
<DD>Bug fixes towards cdrskin-0.8.0.pl00:
|
<DD>Bug fixes towards cdrskin-0.7.6.pl00:
|
||||||
<UL>
|
<UL>
|
||||||
<LI>none yet</LI>
|
<LI>none yet</LI>
|
||||||
<!--
|
<!--
|
||||||
@ -285,10 +286,10 @@ Bug fixes towards cdrskin-0.7.8.pl00:
|
|||||||
</DD>
|
</DD>
|
||||||
|
|
||||||
<DD> </DD>
|
<DD> </DD>
|
||||||
<DD><A HREF="README_cdrskin_devel">README 0.8.1</A>
|
<DD><A HREF="README_cdrskin_devel">README 0.7.7</A>
|
||||||
<DD><A HREF="cdrskin__help_devel">cdrskin_0.8.1 --help</A></DD>
|
<DD><A HREF="cdrskin__help_devel">cdrskin_0.7.7 --help</A></DD>
|
||||||
<DD><A HREF="cdrskin_help_devel">cdrskin_0.8.1 -help</A></DD>
|
<DD><A HREF="cdrskin_help_devel">cdrskin_0.7.7 -help</A></DD>
|
||||||
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 0.8.1)</A></DD>
|
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 0.7.7)</A></DD>
|
||||||
<DD> </DD>
|
<DD> </DD>
|
||||||
<DT>Maintainers of cdrskin unstable packages please use SVN of
|
<DT>Maintainers of cdrskin unstable packages please use SVN of
|
||||||
<A HREF="http://libburnia-project.org"> libburnia-project.org</A></DT>
|
<A HREF="http://libburnia-project.org"> libburnia-project.org</A></DT>
|
||||||
@ -308,8 +309,8 @@ admins with full system souvereignty.</DT>
|
|||||||
<A HREF="README_cdrskin_devel">upcoming README</A> ):
|
<A HREF="README_cdrskin_devel">upcoming README</A> ):
|
||||||
</DD>
|
</DD>
|
||||||
<DD>
|
<DD>
|
||||||
<A HREF="cdrskin-0.8.1.tar.gz">cdrskin-0.8.1.tar.gz</A>
|
<A HREF="cdrskin-0.7.7.tar.gz">cdrskin-0.7.7.tar.gz</A>
|
||||||
(840 KB).
|
(810 KB).
|
||||||
</DD>
|
</DD>
|
||||||
|
|
||||||
<!-- This is not offered any more since spring 2008
|
<!-- This is not offered any more since spring 2008
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2010.04.09.100001"
|
#define Cdrskin_timestamP "2010.01.22.130001"
|
||||||
|
@ -7929,7 +7929,7 @@ Lifted ban to derive GPLv3, extended copyright range to 2010
|
|||||||
+ cdrskin/add_ts_changes_to_libburn_0_7_7
|
+ cdrskin/add_ts_changes_to_libburn_0_7_7
|
||||||
Updated cdrskin tarball generator
|
Updated cdrskin tarball generator
|
||||||
|
|
||||||
22 Jan 2009 [3034]
|
22 Jan 2009 []
|
||||||
cdrskin/changelog.txt
|
cdrskin/changelog.txt
|
||||||
Documented changes and release timestamp
|
Documented changes and release timestamp
|
||||||
|
|
||||||
@ -7940,387 +7940,84 @@ Documented changes and release timestamp
|
|||||||
* Enabled FreeBSD system adapter for Debian kfreebsd
|
* Enabled FreeBSD system adapter for Debian kfreebsd
|
||||||
* Experimental SCSI transport adapter via GNU libcdio 0.83git
|
* Experimental SCSI transport adapter via GNU libcdio 0.83git
|
||||||
|
|
||||||
|
------------------------------------ cycle - cdrskin-0.7.7 -
|
||||||
2010.01.23.103338 [3035]
|
------------------------------------ cycle - cdrskin-0.7.7 -
|
||||||
Makefile.am
|
------------------------------------ cycle - cdrskin-0.7.7 -
|
||||||
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.7.7
|
|
||||||
|
|
||||||
2010.01.23.104423 [3036]
|
|
||||||
COPYRIGHT
|
|
||||||
doc/cookbook.txt
|
|
||||||
libburn/libdax_msgs.h
|
|
||||||
libburn/libdax_msgs.c
|
|
||||||
test/libburner.c
|
|
||||||
test/telltoc.c
|
|
||||||
Lifted ban to derive GPLv3, extended copyright range to 2010
|
|
||||||
|
|
||||||
23 Jan 2010 [3037]
|
|
||||||
- cdrskin/add_ts_changes_to_libburn_0_7_4
|
|
||||||
- cdrskin/add_ts_changes_to_libburn_0_7_5
|
|
||||||
+ cdrskin/add_ts_changes_to_libburn_0_7_6
|
|
||||||
+ cdrskin/add_ts_changes_to_libburn_0_7_7
|
|
||||||
Updated cdrskin tarball generator
|
|
||||||
|
|
||||||
------------------------------------ cycle - cdrskin-0.7.7 - 2010.01.23.104423
|
|
||||||
|
|
||||||
|
|
||||||
23 Jan 2010 [3038]
|
|
||||||
svn move -m 'libburn release 0.7.6 is ready'
|
|
||||||
http://svn.libburnia-project.org/libburn/branches/ZeroSevenSix
|
|
||||||
http://svn.libburnia-project.org/libburn/tags/ZeroSevenSix
|
|
||||||
|
|
||||||
2010.02.04.083315 [3054]
|
|
||||||
acinclude.m4
|
|
||||||
configure.ac
|
|
||||||
Forcing use of /usr/local on FreeBSD by LDFLAGS and CPPFLAGS
|
|
||||||
|
|
||||||
2010.02.12.173236 [3063]
|
|
||||||
libburn/os-linux.h
|
|
||||||
libburn/sg-linux.c
|
|
||||||
Changed system adapter id and some remarks from "Linux" to "GNU/Linux"
|
|
||||||
|
|
||||||
2010.02.12.212818 [3064]
|
|
||||||
libburn/libburn.h
|
|
||||||
libburn/sg.c
|
|
||||||
libburn/mmc.c
|
|
||||||
libburn/drive.c
|
|
||||||
libburn/init.c
|
|
||||||
libburn/cleanup.c
|
|
||||||
libburn/os-linux.h
|
|
||||||
libburn/sg-linux.c
|
|
||||||
libburn/write.c
|
|
||||||
libburn/read.c
|
|
||||||
libburn/sg-libcdio.c
|
|
||||||
libburn/os-libcdio.h
|
|
||||||
libburn/os.h
|
|
||||||
libburn/toc.c
|
|
||||||
Changed docs and comments to "GNU/Linux" where appropriate
|
|
||||||
|
|
||||||
2010.02.14.084452 [3066]
|
|
||||||
libburn/sbc.c
|
|
||||||
libburn/file.h
|
|
||||||
libburn/os-libcdio.h
|
|
||||||
libburn/os-dummy.h
|
|
||||||
libburn/cleanup.h
|
|
||||||
libburn/sector.h
|
|
||||||
libburn/libiso_msgs.c
|
|
||||||
libburn/async.c
|
|
||||||
libburn/libdax_audioxtr.h
|
|
||||||
libburn/ecma130ab.c
|
|
||||||
libburn/back_hacks.h
|
|
||||||
libburn/libdax_msgs.h
|
|
||||||
libburn/drive.h
|
|
||||||
libburn/read.c
|
|
||||||
libburn/source.c
|
|
||||||
libburn/util.h
|
|
||||||
libburn/cleanup.c
|
|
||||||
libburn/sg.c
|
|
||||||
libburn/init.c
|
|
||||||
libburn/write.c
|
|
||||||
libburn/transport.h
|
|
||||||
libburn/write.h
|
|
||||||
libburn/libburn.h
|
|
||||||
libburn/options.c
|
|
||||||
libburn/mmc.h
|
|
||||||
libburn/sg.h
|
|
||||||
libburn/sbc.h
|
|
||||||
libburn/sg-dummy.c
|
|
||||||
libburn/ecma130ab.h
|
|
||||||
libburn/null.c
|
|
||||||
libburn/structure.c
|
|
||||||
libburn/mmc.c
|
|
||||||
libburn/spc.h
|
|
||||||
libburn/drive.c
|
|
||||||
libburn/sg-linux.c
|
|
||||||
libburn/options.h
|
|
||||||
libburn/os-linux.h
|
|
||||||
libburn/sg-libcdio.c
|
|
||||||
libburn/os-freebsd.h
|
|
||||||
libburn/sg-freebsd-port.c
|
|
||||||
libburn/sector.c
|
|
||||||
libburn/debug.c
|
|
||||||
libburn/util.c
|
|
||||||
libburn/toc.h
|
|
||||||
libburn/file.c
|
|
||||||
libburn/libdax_audioxtr.c
|
|
||||||
libburn/libdax_msgs.c
|
|
||||||
libburn/toc.c
|
|
||||||
libburn/sg-freebsd.c
|
|
||||||
libburn/spc.c
|
|
||||||
libburn/structure.h
|
|
||||||
Added or adjusted copyright and license statements in single files
|
|
||||||
|
|
||||||
2010.02.14.171833 [3069]
|
|
||||||
libburn/write.c
|
|
||||||
libburn/read.c
|
|
||||||
libburn/sector.c
|
|
||||||
libburn/crc.h
|
|
||||||
Created opportunity to omit source module libburn/crc.c
|
|
||||||
|
|
||||||
2010.02.15.125922 [3071]
|
|
||||||
libburn/crc.h
|
|
||||||
Changed a comment in libburn/crc.h
|
|
||||||
|
|
||||||
2010.02.16.194147 [3073]
|
|
||||||
libburn/file.c
|
|
||||||
Bug fix on FreeBSD: Piped input was falsely attributed a small fixed size
|
|
||||||
|
|
||||||
2010.02.17.141409 [3075]
|
|
||||||
libburn/async.c
|
|
||||||
libburn/drive.c
|
|
||||||
libburn/write.c
|
|
||||||
Avoided random percentage display at start of blanking
|
|
||||||
|
|
||||||
2010.02.22.134904 [3080]
|
|
||||||
libburn/init.c
|
|
||||||
Made burn_set_signal_handling() more suitable for cdrskin
|
|
||||||
|
|
||||||
2010.02.25.070635 [3090]
|
|
||||||
libburn/write.c
|
|
||||||
Corrected optional speed curb for stdio: drives. Was damaged by revision 2903.
|
|
||||||
|
|
||||||
2010.02.28.104003 [3091]
|
|
||||||
cdrskin/cdrskin.c
|
|
||||||
Added forgotten initialization of a variable
|
|
||||||
|
|
||||||
2010.02.28.110749 [3092]
|
|
||||||
cdrskin/cdrskin.c
|
|
||||||
Bug fix: cdrskin fs=0 lead to SIGSEGV. Regression introduced by revision 2936.
|
|
||||||
|
|
||||||
28 Feb 2010 [3093]
|
|
||||||
cdrskin/cdrskin.1
|
|
||||||
Corrected spelling errors in cdrskin man page
|
|
||||||
|
|
||||||
2010.03.03.140639 [3096]
|
|
||||||
libburn/drive.c
|
|
||||||
Enabled patience 0 within burn_abort()
|
|
||||||
|
|
||||||
2010.03.03.141407 [3097]
|
|
||||||
cdrskin/cdrskin.c
|
|
||||||
cdrskin/cdrfifo.c
|
|
||||||
Adapted cdrskin abort handler to FreeBSD peculiarities
|
|
||||||
|
|
||||||
3 Mar 2010 [3098] [3099]
|
|
||||||
cdrskin/compile_cdrskin.sh
|
|
||||||
Enabled static compile script compile_cdrskin.sh for FreeBSD
|
|
||||||
|
|
||||||
2010.03.04.121441 [3100]
|
|
||||||
libburn/sg-linux.c
|
|
||||||
Showing more patience with temporarily busy drives on Linux
|
|
||||||
|
|
||||||
2010.03.04.180102 [3101]
|
|
||||||
cdrskin/cdrskin.c
|
|
||||||
Changed burn_abort(0) to burn_abort(-1)
|
|
||||||
|
|
||||||
2010.03.05.090948 [3102]
|
|
||||||
libburn/libburn.h
|
|
||||||
libburn/transport.h
|
|
||||||
libburn/drive.h
|
|
||||||
libburn/drive.c
|
|
||||||
libburn/init.h
|
|
||||||
libburn/init.c
|
|
||||||
libburn/async.c
|
|
||||||
libburn/write.c
|
|
||||||
libburn/sector.c
|
|
||||||
libburn/libdax_msgs.h
|
|
||||||
libburn/libdax_msgs.c
|
|
||||||
Introduced alternative signal handling actions
|
|
||||||
|
|
||||||
2010.03.05.091432 [3103]
|
|
||||||
cdrskin/cdrskin.c
|
|
||||||
Enabled optional use of new signal action 2 with libburn built-in handler
|
|
||||||
|
|
||||||
2010.03.05.111712 [3104]
|
|
||||||
libburn/init.c
|
|
||||||
libburn/drive.h
|
|
||||||
libburn/drive.c
|
|
||||||
Removed some debugging printing
|
|
||||||
|
|
||||||
------------------------------------ cycle - cdrskin-0.7.7 - 2010.03.05.111954
|
|
||||||
Bug fix on FreeBSD: Piped input was falsely attributed a small fixed size
|
|
||||||
Bug fix: cdrskin fs=0 led to SIGSEGV. Regression introduced by revision 2936.
|
|
||||||
|
|
||||||
|
|
||||||
2010.03.05.190110 [3105]
|
|
||||||
libburn/async.c
|
|
||||||
Protected blanker and formatter thread from signals
|
|
||||||
|
|
||||||
06 Mar 2010 [3106]
|
|
||||||
test/libburner.c
|
|
||||||
Adapted libburner to new advise about signal handling
|
|
||||||
|
|
||||||
07 Mar 2010 [3107]
|
|
||||||
libburn/libburn.h
|
|
||||||
test/libburner.c
|
|
||||||
Changed examples burn_set_signal_handling(...,48) to (...,0x30)
|
|
||||||
|
|
||||||
2010.03.08.092608 [3108]
|
|
||||||
libburn/libburn.h
|
|
||||||
libburn/init.c
|
|
||||||
Prevented potential memory fault with burn_set_signal_handling()
|
|
||||||
|
|
||||||
2010.03.09.140341 [3111]
|
|
||||||
libburn/libburn.h
|
|
||||||
Clarifications in API description of burn_set_signal_handling()
|
|
||||||
|
|
||||||
10 Mar 2010 [3112]
|
|
||||||
svn copy -m "Branching for libburn release 0.7.8" \
|
|
||||||
http://svn.libburnia-project.org/libburn/trunk \
|
|
||||||
http://svn.libburnia-project.org/libburn/branches/ZeroSevenEight
|
|
||||||
|
|
||||||
2010.03.10.120001 [3113]
|
|
||||||
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.7.8
|
|
||||||
|
|
||||||
10 Mar 2010 [3114]
|
|
||||||
- cdrskin/add_ts_changes_to_libburn_0_7_6
|
|
||||||
- cdrskin/add_ts_changes_to_libburn_0_7_7
|
|
||||||
+ cdrskin/add_ts_changes_to_libburn_0_7_8
|
|
||||||
+ cdrskin/add_ts_changes_to_libburn_0_7_9
|
|
||||||
Updated cdrskin tarball generator
|
|
||||||
|
|
||||||
10 Mar 2010 [3115]
|
|
||||||
cdrskin/cdrskin.c
|
|
||||||
Removed unused variable
|
|
||||||
|
|
||||||
10 Mar 2010 [3116]
|
|
||||||
cdrskin/changelog.txt
|
|
||||||
Documented changes and release timestamp
|
|
||||||
|
|
||||||
------------------------------ release - cdrskin-0.7.8.pl00 - 2010.03.10.120001
|
|
||||||
Bug fix on FreeBSD: Piped input was falsely attributed a small fixed size
|
|
||||||
Bug fix: cdrskin fs=0 led to SIGSEGV. Regression introduced by version 0.7.4.
|
|
||||||
|
|
||||||
|
|
||||||
2010.03.10.134802 [3117]
|
|
||||||
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.7.9
|
|
||||||
|
|
||||||
10 Mar 2010 [3118]
|
|
||||||
- cdrskin/add_ts_changes_to_libburn_0_7_6
|
|
||||||
- cdrskin/add_ts_changes_to_libburn_0_7_7
|
|
||||||
+ cdrskin/add_ts_changes_to_libburn_0_7_8
|
|
||||||
+ cdrskin/add_ts_changes_to_libburn_0_7_9
|
|
||||||
Updated cdrskin tarball generator
|
|
||||||
|
|
||||||
10 Mar 2010 [3119]
|
|
||||||
cdrskin/changelog.txt
|
|
||||||
Documented changes and release timestamp
|
|
||||||
|
|
||||||
10 Mar 2010 [3120]
|
|
||||||
svn move -m 'libburn release 0.7.8 is ready'
|
|
||||||
http://svn.libburnia-project.org/libburn/branches/ZeroSevenEight
|
|
||||||
http://svn.libburnia-project.org/libburn/tags/ZeroSevenEight
|
|
||||||
|
|
||||||
------------------------------------ cycle - cdrskin-0.7.9 - 2010.03.10.143607
|
|
||||||
|
|
||||||
2010.03.17.185222 [3123]
|
|
||||||
cdrskin/cdrskin.c
|
|
||||||
Small bug fix about track size with cdrskin -minfo
|
|
||||||
|
|
||||||
17 Mar 2010 [3124]
|
|
||||||
configure.ac
|
|
||||||
Corrected initialization of configure option --enable-dvd-obs-64k
|
|
||||||
|
|
||||||
2010.03.25.113536 [3131]
|
|
||||||
libburn/spc.c
|
|
||||||
libburn/sg-freebsd.c
|
|
||||||
Changed sg-freebsd.c to work with ahci, advise by Alexander Motin
|
|
||||||
|
|
||||||
2010.03.26.083158 [3132]
|
|
||||||
libburn/sg-freebsd.c
|
|
||||||
Had to make ahci change conditional for now: -DLibburn_for_freebsd_ahcI
|
|
||||||
|
|
||||||
2010.03.27.155659 [3133]
|
|
||||||
libburn/mmc.c
|
|
||||||
Avoiding to inquire NWA of unwritable media or states
|
|
||||||
|
|
||||||
2010.03.27.172644 [3134]
|
|
||||||
libburn/os-freebsd.h
|
|
||||||
libburn/sg-freebsd.c
|
|
||||||
Trying to detect FreeBSD ahci devices and to handle others the old way
|
|
||||||
|
|
||||||
------------------------------------ cycle - cdrskin-0.7.9 - 2010.03.27.184614
|
|
||||||
* Now able to work with ahci driver of FreeBSD 8-STABLE
|
|
||||||
|
|
||||||
|
|
||||||
2010.03.29.103141 [3135]
|
|
||||||
libburn/spc.c
|
|
||||||
libburn/sg-linux.c
|
|
||||||
libburn/sg-freebsd.c
|
|
||||||
libburn/sg-libcdio.c
|
|
||||||
Adjusted libcdio system adapter to FreeBSD peculiarities
|
|
||||||
|
|
||||||
2010.04.04.181237 [3146]
|
|
||||||
test/libburner.c
|
|
||||||
Let libburner warn programmers if they forget to set 64 bit off_t
|
|
||||||
|
|
||||||
2010.04.09.090645 [3155]
|
|
||||||
libburn/sg-linux.c
|
|
||||||
Reporting eventual SCSI sense in sg-linux repeat loop
|
|
||||||
|
|
||||||
9 Apr 2010 [3156]
|
|
||||||
svn copy -m "Branching for libburn release 0.8.0" \
|
|
||||||
http://svn.libburnia-project.org/libburn/trunk \
|
|
||||||
http://svn.libburnia-project.org/libburn/branches/ZeroEightZero
|
|
||||||
|
|
||||||
2010.04.09.100001 [3157]
|
|
||||||
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.0
|
|
||||||
|
|
||||||
09 Apr 2010 [3158]
|
|
||||||
- cdrskin/add_ts_changes_to_libburn_0_7_8
|
|
||||||
- cdrskin/add_ts_changes_to_libburn_0_7_9
|
|
||||||
+ cdrskin/add_ts_changes_to_libburn_0_8_0
|
|
||||||
+ cdrskin/add_ts_changes_to_libburn_0_8_1
|
|
||||||
Updated cdrskin tarball generator
|
|
||||||
|
|
||||||
------------------------------ release - cdrskin-0.8.0.pl00 - 2010.04.09.100001
|
|
||||||
* Now able to work with ahci driver of FreeBSD 8-STABLE
|
|
||||||
|
|
||||||
------------------------------------ cycle - cdrskin-0.8.1 -
|
|
||||||
------------------------------------ cycle - cdrskin-0.8.1 -
|
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
TODO
|
TODO
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
||||||
- change all malloc() to calloc()
|
- After writing first session and reload:
|
||||||
|
Drive current: -dev '/dev/cd0'
|
||||||
|
Drive type : vendor 'TSSTcorp' product 'CDDVDW SH-S223C' revision 'SB02'
|
||||||
|
Media current: DVD-RW sequential recording
|
||||||
|
Media product: RITEKW01 , Ritek Corp
|
||||||
|
Media status : is written , is appendable
|
||||||
|
TOC layout : Idx , sbsector , Size , Volume Id
|
||||||
|
ISO session : 1 , 0 , 232357s , ISOIMAGE
|
||||||
|
Other session: 2 , 261200 , 2036688s ,
|
||||||
|
Media summary: 2 sessions, 2269200 data blocks, 4432m data, 3978m free
|
||||||
|
Media nwa : 261200s
|
||||||
|
dvd+rw-mediainfo shows 3 sessions with 2 tracks.
|
||||||
|
Firmware bug.
|
||||||
|
|
||||||
- find out from where libburn/crc.c stems. What algorithm is crc_32() ?
|
|
||||||
|
|
||||||
|
- USB stick and drive on FreeBSD
|
||||||
|
- how to detect random-read-write device ?
|
||||||
|
|
||||||
|
|
||||||
|
--- libcdio ---
|
||||||
|
|
||||||
|
24 Dec 2009 [29de1d8bcb614a8360b519c5843c5852f78101db]
|
||||||
|
include/cdio/mmc.h
|
||||||
|
lib/driver/generic.h
|
||||||
|
lib/driver/mmc.c
|
||||||
|
lib/driver/libcdio.sym ( - cdio_version)
|
||||||
|
New API function mmc_last_cmd_sense()
|
||||||
|
|
||||||
|
24 Dec 2009 [890b5610a8ec01609df8997f8031324af5bb4219]
|
||||||
|
lib/driver/gnu_linux.c
|
||||||
|
Linux driver makes available the sense reply of the most recent MMC command
|
||||||
|
(Is there a place to register access modes MMC_RDWR and MMC_RDWR_EXCL ?)
|
||||||
|
|
||||||
|
24 Dec 2009 [20f762c3c12c06b52a47b401eb913c69c72ddcf8]
|
||||||
|
include/cdio/version.h.in
|
||||||
|
lib/driver/util.c
|
||||||
|
lib/driver/libcdio.sym ( + cdio_version)
|
||||||
|
New API function cdio_version() tell libcdio version at runtime
|
||||||
|
|
||||||
|
24 Dec 2009 [7cc7484a0b93268260c02ec35c46e1456f0fb38a]
|
||||||
|
lib/driver/gnu_linux.c
|
||||||
|
lib/driver/util.c
|
||||||
|
Small repairs to the previous two changees
|
||||||
|
|
||||||
|
30 Dec 2009 07_cdio_get_arg_scsi_tuple_linux.tgz [cf882cfd20912fed94d1a4a2e057bbcf68c496a1]
|
||||||
|
lib/driver/generic.h
|
||||||
|
lib/driver/_cdio_generic.c
|
||||||
|
lib/driver/gnu_linux.c
|
||||||
|
New cdio_get_arg() key "scsi-tuple-linux"
|
||||||
|
|
||||||
|
15 Jan 2010 10_add_mmc_rdwr_excl_on_freebsd.tgz [bd096b3eca0644044a872c1f0d31a75395d420a4]
|
||||||
|
NEWS
|
||||||
|
test/test_mmc_rdwr.c
|
||||||
|
lib/driver/FreeBSD/freebsd.h
|
||||||
|
lib/driver/FreeBSD/freebsd.c
|
||||||
|
lib/driver/FreeBSD/freebsd_cam.c
|
||||||
|
lib/driver/FreeBSD/freebsd_ioctl.c
|
||||||
|
FreeBSD driver augmented by MMC_RDWR_EXCL
|
||||||
|
|
||||||
|
|
||||||
|
Todo:
|
||||||
|
|
||||||
|
Driver-Todo:
|
||||||
|
- implement MMC_RDWR and MMC_RDWR_EXCL
|
||||||
|
- record SCSI sense reply in generic_img_private_t.scsi_mmc_sense
|
||||||
|
- rectify return values to DRIVER_OP_*
|
||||||
|
(- obtain SCSI address tuple)
|
||||||
|
- test concurrent drive access attempts resp. exclusivity of drive access
|
||||||
|
|
||||||
|
|
||||||
--------------------------------- bugs -------------------------------------
|
--------------------------------- bugs -------------------------------------
|
||||||
@ -8348,8 +8045,13 @@ READ TRACK INFORMATION[#5]:
|
|||||||
|
|
||||||
------------------------------ end of bugs ---------------------------------
|
------------------------------ end of bugs ---------------------------------
|
||||||
|
|
||||||
|
- xorriso -as tar (Rocky wants me to begin with -x)
|
||||||
|
|
||||||
Support for BD-R SRM+POW
|
Support for BD-R SRM+POW
|
||||||
|
|
||||||
|
? Provide an option to open track source file O_DIRECT ?
|
||||||
|
(needs read chunks much larger than 2 kB)
|
||||||
|
|
||||||
? Enable profile 0x42 BD-R random recording
|
? Enable profile 0x42 BD-R random recording
|
||||||
|
|
||||||
Provide DVD+R DL layer break setter
|
Provide DVD+R DL layer break setter
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
debug_opts="-O2"
|
debug_opts="-O2"
|
||||||
def_opts=
|
def_opts=
|
||||||
largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1"
|
largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1"
|
||||||
fifo_opts=""
|
fifo_opts="-DCdrskin_use_libburn_fifO"
|
||||||
libvers="-DCdrskin_libburn_0_8_0"
|
libvers="-DCdrskin_libburn_0_7_6"
|
||||||
|
|
||||||
# To be used if Makefile.am uses libburn_libburn_la_CFLAGS
|
# To be used if Makefile.am uses libburn_libburn_la_CFLAGS
|
||||||
# burn="libburn/libburn_libburn_la-"
|
# burn="libburn/libburn_libburn_la-"
|
||||||
@ -26,13 +26,6 @@ compile_cdrskin=1
|
|||||||
compile_cdrfifo=0
|
compile_cdrfifo=0
|
||||||
compile_dewav=0
|
compile_dewav=0
|
||||||
|
|
||||||
libcam=
|
|
||||||
os=$(uname -s)
|
|
||||||
case $os in
|
|
||||||
*FreeBSD)
|
|
||||||
libcam="-lcam"
|
|
||||||
esac
|
|
||||||
|
|
||||||
for i in "$@"
|
for i in "$@"
|
||||||
do
|
do
|
||||||
if test "$i" = "-compile_cdrfifo"
|
if test "$i" = "-compile_cdrfifo"
|
||||||
@ -47,15 +40,15 @@ do
|
|||||||
libdax_audioxtr_o=
|
libdax_audioxtr_o=
|
||||||
libdax_msgs_o="$burn"message.o
|
libdax_msgs_o="$burn"message.o
|
||||||
cleanup_src_or_obj="-DCleanup_has_no_libburn_os_H cdrskin/cleanup.c"
|
cleanup_src_or_obj="-DCleanup_has_no_libburn_os_H cdrskin/cleanup.c"
|
||||||
elif test "$i" = "-libburn_0_8_0"
|
elif test "$i" = "-libburn_0_7_6"
|
||||||
then
|
then
|
||||||
libvers="-DCdrskin_libburn_0_8_0"
|
libvers="-DCdrskin_libburn_0_7_6"
|
||||||
libdax_audioxtr_o="$burn"libdax_audioxtr.o
|
libdax_audioxtr_o="$burn"libdax_audioxtr.o
|
||||||
libdax_msgs_o="$burn"libdax_msgs.o
|
libdax_msgs_o="$burn"libdax_msgs.o
|
||||||
cleanup_src_or_obj="$burn"cleanup.o
|
cleanup_src_or_obj="$burn"cleanup.o
|
||||||
elif test "$i" = "-libburn_svn"
|
elif test "$i" = "-libburn_svn"
|
||||||
then
|
then
|
||||||
libvers="-DCdrskin_libburn_0_8_1"
|
libvers="-DCdrskin_libburn_0_7_7"
|
||||||
libdax_audioxtr_o="$burn"libdax_audioxtr.o
|
libdax_audioxtr_o="$burn"libdax_audioxtr.o
|
||||||
libdax_msgs_o="$burn"libdax_msgs.o
|
libdax_msgs_o="$burn"libdax_msgs.o
|
||||||
cleanup_src_or_obj="$burn"cleanup.o
|
cleanup_src_or_obj="$burn"cleanup.o
|
||||||
@ -93,10 +86,6 @@ do
|
|||||||
then
|
then
|
||||||
fifo_source=
|
fifo_source=
|
||||||
fifo_opts="-DCdrskin_use_libburn_fifO -DCdrskin_no_cdrfifO"
|
fifo_opts="-DCdrskin_use_libburn_fifO -DCdrskin_no_cdrfifO"
|
||||||
elif test "$i" = "-use_libburn_cleanup"
|
|
||||||
then
|
|
||||||
fifo_source=
|
|
||||||
fifo_opts="-DCdrskin_use_libburn_cleanuP -DCdrskin_use_libburn_fifO -DCdrskin_no_cdrfifO"
|
|
||||||
elif test "$i" = "-use_libcdio"
|
elif test "$i" = "-use_libcdio"
|
||||||
then
|
then
|
||||||
libcdio="-lcdio"
|
libcdio="-lcdio"
|
||||||
@ -109,7 +98,7 @@ do
|
|||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -compile_cdrfifo compile program cdrskin/cdrfifo."
|
echo " -compile_cdrfifo compile program cdrskin/cdrfifo."
|
||||||
echo " -compile_dewav compile program test/dewav without libburn."
|
echo " -compile_dewav compile program test/dewav without libburn."
|
||||||
echo " -libburn_0_8_0 set macro to match libburn-0.8.0"
|
echo " -libburn_0_7_6 set macro to match libburn-0.7.6"
|
||||||
echo " -libburn_svn set macro to match current libburn-SVN."
|
echo " -libburn_svn set macro to match current libburn-SVN."
|
||||||
echo " -dvd_obs_64k 64 KB default size for DVD/BD writing."
|
echo " -dvd_obs_64k 64 KB default size for DVD/BD writing."
|
||||||
echo " -use_libcdio link with -lcdio because libburn uses it."
|
echo " -use_libcdio link with -lcdio because libburn uses it."
|
||||||
@ -136,7 +125,7 @@ echo "Build timestamp : $timestamp"
|
|||||||
|
|
||||||
if test "$compile_cdrskin"
|
if test "$compile_cdrskin"
|
||||||
then
|
then
|
||||||
echo "compiling program cdrskin/cdrskin.c $fifo_source $static_opts $debug_opts $libvers $fifo_opts $def_opts $cleanup_src_or_obj $libcdio $libcam"
|
echo "compiling program cdrskin/cdrskin.c $fifo_source $static_opts $debug_opts $libvers $fifo_opts $def_opts $cleanup_src_or_obj $libcdio"
|
||||||
cc -I. \
|
cc -I. \
|
||||||
$warn_opts \
|
$warn_opts \
|
||||||
$static_opts \
|
$static_opts \
|
||||||
@ -182,7 +171,6 @@ then
|
|||||||
"$burn"ecma130ab.o \
|
"$burn"ecma130ab.o \
|
||||||
\
|
\
|
||||||
$libcdio \
|
$libcdio \
|
||||||
$libcam \
|
|
||||||
-lpthread
|
-lpthread
|
||||||
|
|
||||||
ret=$?
|
ret=$?
|
||||||
|
24
configure.ac
24
configure.ac
@ -1,15 +1,13 @@
|
|||||||
AC_INIT([libburn], [0.8.0], [http://libburnia-project.org])
|
AC_INIT([libburn], [0.7.6], [http://libburnia-project.org])
|
||||||
AC_PREREQ([2.50])
|
AC_PREREQ([2.50])
|
||||||
dnl AC_CONFIG_HEADER([config.h])
|
dnl AC_CONFIG_HEADER([config.h])
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
AC_CANONICAL_TARGET
|
AC_CANONICAL_TARGET
|
||||||
|
|
||||||
LIBBURNIA_SET_FLAGS
|
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE([subdir-objects])
|
AM_INIT_AUTOMAKE([subdir-objects])
|
||||||
|
|
||||||
dnl Notes by ts A71207 - B00310 :
|
dnl Notes by ts A71207 - B00122 :
|
||||||
dnl
|
dnl
|
||||||
dnl Regrettably the meaning of the various version types was misunderstood
|
dnl Regrettably the meaning of the various version types was misunderstood
|
||||||
dnl before version 0.4.1.
|
dnl before version 0.4.1.
|
||||||
@ -79,8 +77,6 @@ dnl 0.7.0 = libburn.so.4.35.0
|
|||||||
dnl 0.7.2 = libburn.so.4.37.0
|
dnl 0.7.2 = libburn.so.4.37.0
|
||||||
dnl 0.7.4 = libburn.so.4.39.0
|
dnl 0.7.4 = libburn.so.4.39.0
|
||||||
dnl 0.7.6 = libburn.so.4.41.0
|
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
|
dnl
|
||||||
dnl So LT_CURRENT, LT_REVISION and LT_AGE get set directly here.
|
dnl So LT_CURRENT, LT_REVISION and LT_AGE get set directly here.
|
||||||
dnl SONAME of the emerging library is LT_CURRENT - LT_AGE.
|
dnl SONAME of the emerging library is LT_CURRENT - LT_AGE.
|
||||||
@ -105,8 +101,8 @@ dnl If BURN_*_VERSION changes, be sure to change AC_INIT above to match.
|
|||||||
dnl
|
dnl
|
||||||
dnl As said: Only copies. Original in libburn/libburn.h : burn_header_version_*
|
dnl As said: Only copies. Original in libburn/libburn.h : burn_header_version_*
|
||||||
BURN_MAJOR_VERSION=0
|
BURN_MAJOR_VERSION=0
|
||||||
BURN_MINOR_VERSION=8
|
BURN_MINOR_VERSION=7
|
||||||
BURN_MICRO_VERSION=0
|
BURN_MICRO_VERSION=6
|
||||||
BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
|
BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
|
||||||
|
|
||||||
AC_SUBST(BURN_MAJOR_VERSION)
|
AC_SUBST(BURN_MAJOR_VERSION)
|
||||||
@ -117,15 +113,15 @@ AC_SUBST(BURN_VERSION)
|
|||||||
dnl Libtool versioning
|
dnl Libtool versioning
|
||||||
LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
|
LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
|
||||||
dnl
|
dnl
|
||||||
dnl ts B00409
|
dnl ts B00122
|
||||||
dnl This is the release version libburn-0.8.0
|
dnl This is the release version libburn-0.7.6 = libburn.so.4.41.0
|
||||||
dnl ### This is the development version after above release version
|
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 not yet happened.
|
||||||
dnl ### LT_CURRENT++, LT_AGE++ has happened meanwhile.
|
dnl ### LT_CURRENT++, LT_AGE++ has happened meanwhile.
|
||||||
dnl
|
dnl
|
||||||
dnl SONAME = 49 - 45 = 4 . Linux library name = libburn.so.4.45.0
|
dnl SONAME = 45 - 41 = 4 . Linux library name = libburn.so.4.41.0
|
||||||
LT_CURRENT=49
|
LT_CURRENT=45
|
||||||
LT_AGE=45
|
LT_AGE=41
|
||||||
LT_REVISION=0
|
LT_REVISION=0
|
||||||
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
|
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
|
||||||
|
|
||||||
@ -203,7 +199,7 @@ CFLAGS="$CFLAGS $LIBBURN_O_DIRECT_DEF"
|
|||||||
dnl ts A91116
|
dnl ts A91116
|
||||||
AC_ARG_ENABLE(dvd-obs-64k,
|
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)
|
, enable_fifo_odirect=no)
|
||||||
if test x$enable_dvd_obs_64k = xyes; then
|
if test x$enable_dvd_obs_64k = xyes; then
|
||||||
LIBBURN_DVD_OBS_64K="-DLibburn_dvd_obs_default_64K"
|
LIBBURN_DVD_OBS_64K="-DLibburn_dvd_obs_default_64K"
|
||||||
echo "enabled write size default 64 KB on DVD and BD"
|
echo "enabled write size default 64 KB on DVD and BD"
|
||||||
|
113
libburn/async.c
113
libburn/async.c
@ -1,9 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* ts A71019 */
|
/* ts A71019 */
|
||||||
|
|
||||||
@ -40,7 +36,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <signal.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#include <a ssert.h>
|
#include <a ssert.h>
|
||||||
@ -233,22 +228,6 @@ static void *scan_worker_func(struct w_list *w)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reset_progress(struct burn_drive *d, int sessions, int tracks,
|
|
||||||
int indices, int sectors, int flag)
|
|
||||||
{
|
|
||||||
/* reset the progress indicator */
|
|
||||||
d->progress.session = 0;
|
|
||||||
d->progress.sessions = sessions;
|
|
||||||
d->progress.track = 0;
|
|
||||||
d->progress.tracks = tracks;
|
|
||||||
d->progress.index = 0;
|
|
||||||
d->progress.indices = indices;
|
|
||||||
d->progress.start_sector = 0;
|
|
||||||
d->progress.sectors = sectors;
|
|
||||||
d->progress.sector = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int burn_drive_scan(struct burn_drive_info *drives[], unsigned int *n_drives)
|
int burn_drive_scan(struct burn_drive_info *drives[], unsigned int *n_drives)
|
||||||
{
|
{
|
||||||
struct scan_opts o;
|
struct scan_opts o;
|
||||||
@ -318,27 +297,8 @@ drive_is_active:;
|
|||||||
|
|
||||||
static void *erase_worker_func(struct w_list *w)
|
static void *erase_worker_func(struct w_list *w)
|
||||||
{
|
{
|
||||||
|
|
||||||
#define Libburn_protect_erase_threaD 1
|
|
||||||
|
|
||||||
#ifdef Libburn_protect_erase_threaD
|
|
||||||
sigset_t sigset, oldset;
|
|
||||||
|
|
||||||
/* Protect blank thread from being interrupted by external signals */
|
|
||||||
sigfillset(&sigset);
|
|
||||||
sigdelset(&sigset, SIGSEGV);
|
|
||||||
sigdelset(&sigset, SIGILL);
|
|
||||||
pthread_sigmask(SIG_SETMASK, &sigset, &oldset);
|
|
||||||
#endif /* Libburn_protect_erase_threaD */
|
|
||||||
|
|
||||||
burn_disc_erase_sync(w->u.erase.drive, w->u.erase.fast);
|
burn_disc_erase_sync(w->u.erase.drive, w->u.erase.fast);
|
||||||
remove_worker(pthread_self());
|
remove_worker(pthread_self());
|
||||||
|
|
||||||
#ifdef Libburn_protect_erase_threaD
|
|
||||||
/* (just in case it would not end with all signals blocked) */
|
|
||||||
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
|
|
||||||
#endif /* Libburn_protect_erase_threaD */
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,7 +310,6 @@ void burn_disc_erase(struct burn_drive *drive, int fast)
|
|||||||
/* a ssert(drive); */
|
/* a ssert(drive); */
|
||||||
/* a ssert(!SCAN_GOING()); */
|
/* a ssert(!SCAN_GOING()); */
|
||||||
/* a ssert(!find_worker(drive)); */
|
/* a ssert(!find_worker(drive)); */
|
||||||
|
|
||||||
if((drive == NULL)) {
|
if((drive == NULL)) {
|
||||||
libdax_msgs_submit(libdax_messenger, drive->global_index,
|
libdax_msgs_submit(libdax_messenger, drive->global_index,
|
||||||
0x00020104,
|
0x00020104,
|
||||||
@ -366,9 +325,6 @@ void burn_disc_erase(struct burn_drive *drive, int fast)
|
|||||||
0, 0);
|
0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
reset_progress(drive, 1, 1, 1, 0x10000, 0);
|
|
||||||
|
|
||||||
/* A70103 : will be set to 0 by burn_disc_erase_sync() */
|
/* A70103 : will be set to 0 by burn_disc_erase_sync() */
|
||||||
drive->cancel = 1;
|
drive->cancel = 1;
|
||||||
|
|
||||||
@ -409,28 +365,9 @@ void burn_disc_erase(struct burn_drive *drive, int fast)
|
|||||||
/* ts A61230 */
|
/* ts A61230 */
|
||||||
static void *format_worker_func(struct w_list *w)
|
static void *format_worker_func(struct w_list *w)
|
||||||
{
|
{
|
||||||
|
|
||||||
#define Libburn_protect_format_threaD 1
|
|
||||||
|
|
||||||
#ifdef Libburn_protect_format_threaD
|
|
||||||
sigset_t sigset, oldset;
|
|
||||||
|
|
||||||
/* Protect format thread from being interrupted by external signals */
|
|
||||||
sigfillset(&sigset);
|
|
||||||
sigdelset(&sigset, SIGSEGV);
|
|
||||||
sigdelset(&sigset, SIGILL);
|
|
||||||
pthread_sigmask(SIG_SETMASK, &sigset, &oldset);
|
|
||||||
#endif /* Libburn_protect_format_threaD */
|
|
||||||
|
|
||||||
burn_disc_format_sync(w->u.format.drive, w->u.format.size,
|
burn_disc_format_sync(w->u.format.drive, w->u.format.size,
|
||||||
w->u.format.flag);
|
w->u.format.flag);
|
||||||
remove_worker(pthread_self());
|
remove_worker(pthread_self());
|
||||||
|
|
||||||
#ifdef Libburn_protect_format_threaD
|
|
||||||
/* (just in case it would not end with all signals blocked) */
|
|
||||||
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
|
|
||||||
#endif /* Libburn_protect_format_threaD */
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -442,8 +379,6 @@ void burn_disc_format(struct burn_drive *drive, off_t size, int flag)
|
|||||||
int ok = 0, ret;
|
int ok = 0, ret;
|
||||||
char msg[160];
|
char msg[160];
|
||||||
|
|
||||||
reset_progress(drive, 1, 1, 1, 0x10000, 0);
|
|
||||||
|
|
||||||
if ((SCAN_GOING()) || find_worker(drive) != NULL) {
|
if ((SCAN_GOING()) || find_worker(drive) != NULL) {
|
||||||
libdax_msgs_submit(libdax_messenger, drive->global_index,
|
libdax_msgs_submit(libdax_messenger, drive->global_index,
|
||||||
0x00020102,
|
0x00020102,
|
||||||
@ -573,22 +508,8 @@ no_non_default_bd_re:;
|
|||||||
static void *write_disc_worker_func(struct w_list *w)
|
static void *write_disc_worker_func(struct w_list *w)
|
||||||
{
|
{
|
||||||
struct burn_drive *d = w->u.write.drive;
|
struct burn_drive *d = w->u.write.drive;
|
||||||
char msg[80];
|
|
||||||
|
|
||||||
#define Libburn_protect_write_threaD 1
|
|
||||||
|
|
||||||
#ifdef Libburn_protect_write_threaD
|
|
||||||
sigset_t sigset, oldset;
|
|
||||||
|
|
||||||
/* Protect write thread from being interrupted by external signals */
|
|
||||||
sigfillset(&sigset);
|
|
||||||
sigdelset(&sigset, SIGSEGV);
|
|
||||||
sigdelset(&sigset, SIGILL);
|
|
||||||
pthread_sigmask(SIG_SETMASK, &sigset, &oldset);
|
|
||||||
#endif /* Libburn_protect_write_threaD */
|
|
||||||
|
|
||||||
d->thread_pid = getpid();
|
d->thread_pid = getpid();
|
||||||
d->thread_tid = pthread_self();
|
|
||||||
d->thread_pid_valid= 1;
|
d->thread_pid_valid= 1;
|
||||||
burn_disc_write_sync(w->u.write.opts, w->u.write.disc);
|
burn_disc_write_sync(w->u.write.opts, w->u.write.disc);
|
||||||
d->thread_pid_valid= 0;
|
d->thread_pid_valid= 0;
|
||||||
@ -598,19 +519,7 @@ static void *write_disc_worker_func(struct w_list *w)
|
|||||||
*/
|
*/
|
||||||
burn_write_opts_free(w->u.write.opts);
|
burn_write_opts_free(w->u.write.opts);
|
||||||
|
|
||||||
sprintf(msg, "Write thread on drive %d ended", d->global_index);
|
|
||||||
libdax_msgs_submit(libdax_messenger, d->global_index, 0x00020178,
|
|
||||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
|
|
||||||
msg, 0, 0);
|
|
||||||
|
|
||||||
remove_worker(pthread_self());
|
remove_worker(pthread_self());
|
||||||
d->busy = BURN_DRIVE_IDLE;
|
|
||||||
|
|
||||||
#ifdef Libburn_protect_write_threaD
|
|
||||||
/* (just in case it would not end with all signals blocked) */
|
|
||||||
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
|
|
||||||
#endif /* Libburn_protect_write_threaD */
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -634,9 +543,6 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
reset_progress(d, disc->sessions, disc->session[0]->tracks,
|
|
||||||
disc->session[0]->track[0]->indices, 0, 0);
|
|
||||||
|
|
||||||
/* For the next lines any return indicates failure */
|
/* For the next lines any return indicates failure */
|
||||||
d->cancel = 1;
|
d->cancel = 1;
|
||||||
|
|
||||||
@ -703,30 +609,12 @@ static void *fifo_worker_func(struct w_list *w)
|
|||||||
{
|
{
|
||||||
int old;
|
int old;
|
||||||
|
|
||||||
#define Libburn_protect_fifo_threaD 1
|
|
||||||
|
|
||||||
#ifdef Libburn_protect_fifo_threaD
|
|
||||||
sigset_t sigset, oldset;
|
|
||||||
|
|
||||||
/* Protect fifo thread from being interrupted by external signals */
|
|
||||||
sigfillset(&sigset);
|
|
||||||
sigdelset(&sigset, SIGSEGV);
|
|
||||||
sigdelset(&sigset, SIGILL);
|
|
||||||
pthread_sigmask(SIG_SETMASK, &sigset, &oldset);
|
|
||||||
#endif /* Libburn_protect_fifo_threaD */
|
|
||||||
|
|
||||||
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old);
|
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old);
|
||||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &old);
|
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &old);
|
||||||
/* Note: Only burn_fifo_abort() shall cancel the fifo thread */
|
/* Note: Only burn_fifo_abort() shall cancel the fifo thread */
|
||||||
|
|
||||||
burn_fifo_source_shoveller(w->u.fifo.source, w->u.fifo.flag);
|
burn_fifo_source_shoveller(w->u.fifo.source, w->u.fifo.flag);
|
||||||
remove_worker(pthread_self());
|
remove_worker(pthread_self());
|
||||||
|
|
||||||
#ifdef Libburn_protect_fifo_threaD
|
|
||||||
/* (just in case it would not end with all signals blocked) */
|
|
||||||
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
|
|
||||||
#endif /* Libburn_protect_fifo_threaD */
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -751,7 +639,6 @@ int burn_fifo_start(struct burn_source *source, int flag)
|
|||||||
add_worker(Burnworker_type_fifO, NULL,
|
add_worker(Burnworker_type_fifO, NULL,
|
||||||
(WorkerFunc) fifo_worker_func, &o);
|
(WorkerFunc) fifo_worker_func, &o);
|
||||||
fs->is_started = 1;
|
fs->is_started = 1;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
/**
|
/**
|
||||||
Copyright (c) 2006 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
|
|
||||||
This file bundles variables which disable changes in libburn which are
|
This file bundles variables which disable changes in libburn which are
|
||||||
not yet completely accepted.
|
not yet completely accepted.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
A signal handler which cleans up an application and exits.
|
A signal handler which cleans up an application and exits.
|
||||||
|
|
||||||
Provided under GPLv2+ license within GPL projects, BSD license elsewise.
|
Provided under GPL license within GPL projects, BSD license elsewise.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -40,8 +40,7 @@ static int non_signal_list_count= BURN_OS_NON_SIGNAL_COUNT;
|
|||||||
#else /* ! Cleanup_has_no_libburn_os_H */
|
#else /* ! Cleanup_has_no_libburn_os_H */
|
||||||
|
|
||||||
|
|
||||||
/* Outdated. GNU/Linux only.
|
/* Outdated. Linux only. For backward compatibility with pre-libburn-0.2.3 */
|
||||||
For backward compatibility with pre-libburn-0.2.3 */
|
|
||||||
|
|
||||||
/* Signals to be caught */
|
/* Signals to be caught */
|
||||||
static int signal_list[]= {
|
static int signal_list[]= {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
A signal handler which cleans up an application and exits.
|
A signal handler which cleans up an application and exits.
|
||||||
|
|
||||||
Provided under GPLv2+ within GPL projects, BSD license elsewise.
|
Provided under GPL license within GPL projects, BSD license elsewise.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef Cleanup_includeD
|
#ifndef Cleanup_includeD
|
||||||
|
@ -3,21 +3,7 @@
|
|||||||
#ifndef BURN__CRC_H
|
#ifndef BURN__CRC_H
|
||||||
#define BURN__CRC_H
|
#define BURN__CRC_H
|
||||||
|
|
||||||
|
|
||||||
#ifdef Xorriso_standalonE
|
|
||||||
/* Source module crc.c of yet unclear ancestry is excluded from GNU xorriso */
|
|
||||||
#ifndef Libburn_no_crc_C
|
|
||||||
#define Libburn_no_crc_C 1
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef Libburn_no_crc_C
|
|
||||||
|
|
||||||
unsigned short crc_ccitt(unsigned char *, int len);
|
unsigned short crc_ccitt(unsigned char *, int len);
|
||||||
unsigned int crc_32(unsigned char *, int len);
|
unsigned int crc_32(unsigned char *, int len);
|
||||||
|
|
||||||
#endif /* Libburn_no_crc_C */
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* BURN__CRC_H */
|
#endif /* BURN__CRC_H */
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
105
libburn/drive.c
105
libburn/drive.c
@ -1,15 +1,9 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
/* #include <m alloc.h> ts A61013 : not in GNU/Linux man 3 malloc */
|
/* #include <m alloc.h> ts A61013 : not in Linux man 3 malloc */
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -376,7 +370,6 @@ struct burn_drive *burn_drive_register(struct burn_drive *d)
|
|||||||
d->busy = BURN_DRIVE_IDLE;
|
d->busy = BURN_DRIVE_IDLE;
|
||||||
d->thread_pid = 0;
|
d->thread_pid = 0;
|
||||||
d->thread_pid_valid = 0;
|
d->thread_pid_valid = 0;
|
||||||
memset(&(d->thread_tid), 0, sizeof(d->thread_tid));
|
|
||||||
d->toc_entries = 0;
|
d->toc_entries = 0;
|
||||||
d->toc_entry = NULL;
|
d->toc_entry = NULL;
|
||||||
d->disc = NULL;
|
d->disc = NULL;
|
||||||
@ -622,9 +615,8 @@ void burn_disc_erase_sync(struct burn_drive *d, int fast)
|
|||||||
d->idata->product);
|
d->idata->product);
|
||||||
|
|
||||||
d->cancel = 0;
|
d->cancel = 0;
|
||||||
|
d->busy = BURN_DRIVE_ERASING;
|
||||||
#ifdef Libburn_reset_progress_asynC
|
d->erase(d, fast);
|
||||||
/* <<< This is now done in async.c */
|
|
||||||
/* reset the progress */
|
/* reset the progress */
|
||||||
d->progress.session = 0;
|
d->progress.session = 0;
|
||||||
d->progress.sessions = 1;
|
d->progress.sessions = 1;
|
||||||
@ -635,11 +627,6 @@ void burn_disc_erase_sync(struct burn_drive *d, int fast)
|
|||||||
d->progress.start_sector = 0;
|
d->progress.start_sector = 0;
|
||||||
d->progress.sectors = 0x10000;
|
d->progress.sectors = 0x10000;
|
||||||
d->progress.sector = 0;
|
d->progress.sector = 0;
|
||||||
#endif /* Libburn_reset_progress_asynC */
|
|
||||||
|
|
||||||
d->erase(d, fast);
|
|
||||||
d->busy = BURN_DRIVE_ERASING;
|
|
||||||
|
|
||||||
/* read the initial 0 stage */
|
/* read the initial 0 stage */
|
||||||
while (!d->test_unit_ready(d) && d->get_erase_progress(d) == 0)
|
while (!d->test_unit_ready(d) && d->get_erase_progress(d) == 0)
|
||||||
sleep(1);
|
sleep(1);
|
||||||
@ -666,8 +653,6 @@ void burn_disc_format_sync(struct burn_drive *d, off_t size, int flag)
|
|||||||
char msg[80];
|
char msg[80];
|
||||||
struct buffer buf, *buf_mem = d->buffer;
|
struct buffer buf, *buf_mem = d->buffer;
|
||||||
|
|
||||||
#ifdef Libburn_reset_progress_asynC
|
|
||||||
/* <<< This is now done in async.c */
|
|
||||||
/* reset the progress */
|
/* reset the progress */
|
||||||
d->progress.session = 0;
|
d->progress.session = 0;
|
||||||
d->progress.sessions = 1;
|
d->progress.sessions = 1;
|
||||||
@ -678,8 +663,6 @@ void burn_disc_format_sync(struct burn_drive *d, off_t size, int flag)
|
|||||||
d->progress.start_sector = 0;
|
d->progress.start_sector = 0;
|
||||||
d->progress.sectors = 0x10000;
|
d->progress.sectors = 0x10000;
|
||||||
d->progress.sector = 0;
|
d->progress.sector = 0;
|
||||||
#endif /* Libburn_reset_progress_asynC */
|
|
||||||
|
|
||||||
stages = 1 + ((flag & 1) && size > 1024 * 1024);
|
stages = 1 + ((flag & 1) && size > 1024 * 1024);
|
||||||
d->cancel = 0;
|
d->cancel = 0;
|
||||||
d->busy = BURN_DRIVE_FORMATTING;
|
d->busy = BURN_DRIVE_FORMATTING;
|
||||||
@ -816,22 +799,10 @@ int burn_disc_erasable(struct burn_drive *d)
|
|||||||
enum burn_drive_status burn_drive_get_status(struct burn_drive *d,
|
enum burn_drive_status burn_drive_get_status(struct burn_drive *d,
|
||||||
struct burn_progress *p)
|
struct burn_progress *p)
|
||||||
{
|
{
|
||||||
/* --- Part of asynchronous signal handling --- */
|
|
||||||
/* This frequently used call may be used to react on messages from
|
|
||||||
the libburn built-in signal handler.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* ts B00225 :
|
|
||||||
If aborting with action 2:
|
|
||||||
catch control thread after it returned from signal handler.
|
|
||||||
Let it run burn_abort(4440,...)
|
|
||||||
*/
|
|
||||||
burn_init_catch_on_abort(0);
|
|
||||||
|
|
||||||
/* ts A70928 : inform control thread of signal in sub-threads */
|
/* ts A70928 : inform control thread of signal in sub-threads */
|
||||||
if (burn_builtin_triggered_action < 2 && burn_global_abort_level > 0)
|
if (burn_global_abort_level > 0)
|
||||||
burn_global_abort_level++;
|
burn_global_abort_level++;
|
||||||
if (burn_builtin_triggered_action < 2 && burn_global_abort_level > 5) {
|
if (burn_global_abort_level > 5) {
|
||||||
if (burn_global_signal_handler == NULL)
|
if (burn_global_signal_handler == NULL)
|
||||||
kill(getpid(), burn_global_abort_signum);
|
kill(getpid(), burn_global_abort_signum);
|
||||||
else
|
else
|
||||||
@ -841,9 +812,6 @@ enum burn_drive_status burn_drive_get_status(struct burn_drive *d,
|
|||||||
burn_global_abort_level = -1;
|
burn_global_abort_level = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- End of asynchronous signal handling --- */
|
|
||||||
|
|
||||||
|
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
memcpy(p, &(d->progress), sizeof(struct burn_progress));
|
memcpy(p, &(d->progress), sizeof(struct burn_progress));
|
||||||
/* TODO: add mutex */
|
/* TODO: add mutex */
|
||||||
@ -865,13 +833,9 @@ int burn_drive_set_stream_recording(struct burn_drive *d, int recmode,
|
|||||||
|
|
||||||
void burn_drive_cancel(struct burn_drive *d)
|
void burn_drive_cancel(struct burn_drive *d)
|
||||||
{
|
{
|
||||||
/* ts B00225 : these mutexes are unnecessary because "= 1" is atomar.
|
|
||||||
pthread_mutex_lock(&d->access_lock);
|
pthread_mutex_lock(&d->access_lock);
|
||||||
*/
|
|
||||||
d->cancel = 1;
|
d->cancel = 1;
|
||||||
/*
|
|
||||||
pthread_mutex_unlock(&d->access_lock);
|
pthread_mutex_unlock(&d->access_lock);
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ts A61007 : defunct because unused */
|
/* ts A61007 : defunct because unused */
|
||||||
@ -1888,12 +1852,17 @@ int burn_abort_pacifier(void *handle, int patience, int elapsed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ts B00226 : Outsourced backend of burn_abort()
|
/** Abort any running drive operation and finish libburn.
|
||||||
@param flag bit0= do not call burn_finish()
|
@param patience Maximum number of seconds to wait for drives to finish
|
||||||
|
@param pacifier_func Function to produce appeasing messages. See
|
||||||
|
burn_abort_pacifier() for an example.
|
||||||
|
@return 1 ok, all went well
|
||||||
|
0 had to leave a drive in unclean state
|
||||||
|
<0 severe error, do no use libburn again
|
||||||
*/
|
*/
|
||||||
int burn_abort_5(int patience,
|
int burn_abort(int patience,
|
||||||
int (*pacifier_func)(void *handle, int patience, int elapsed),
|
int (*pacifier_func)(void *handle, int patience, int elapsed),
|
||||||
void *handle, int elapsed, int flag)
|
void *handle)
|
||||||
{
|
{
|
||||||
int ret, i, occup, still_not_done= 1, pacifier_off= 0, first_round= 1;
|
int ret, i, occup, still_not_done= 1, pacifier_off= 0, first_round= 1;
|
||||||
unsigned long wait_grain= 100000;
|
unsigned long wait_grain= 100000;
|
||||||
@ -1903,14 +1872,7 @@ int burn_abort_5(int patience,
|
|||||||
time_t stdio_patience = 3;
|
time_t stdio_patience = 3;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
fprintf(stderr,
|
|
||||||
"libburn_EXPERIMENTAL: burn_abort_5(%d,%d)\n", patience, flag);
|
|
||||||
*/
|
|
||||||
|
|
||||||
current_time = start_time = pacifier_time = time(0);
|
current_time = start_time = pacifier_time = time(0);
|
||||||
start_time -= elapsed;
|
|
||||||
end_time = start_time + patience;
|
end_time = start_time + patience;
|
||||||
|
|
||||||
/* >>> ts A71002 : are there any threads at work ?
|
/* >>> ts A71002 : are there any threads at work ?
|
||||||
@ -1918,7 +1880,7 @@ int burn_abort_5(int patience,
|
|||||||
change status on their own.
|
change status on their own.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
while(current_time < end_time || (patience <= 0 && first_round)) {
|
while(current_time-end_time < patience) {
|
||||||
still_not_done = 0;
|
still_not_done = 0;
|
||||||
|
|
||||||
for(i = 0; i < drivetop + 1; i++) {
|
for(i = 0; i < drivetop + 1; i++) {
|
||||||
@ -1957,9 +1919,6 @@ int burn_abort_5(int patience,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(occup <= 10) {
|
if(occup <= 10) {
|
||||||
if (drive_array[i].drive_role != 1)
|
|
||||||
/* occup == -1 comes early */
|
|
||||||
usleep(1000000);
|
|
||||||
burn_drive_forget(&(drive_array[i]), 1);
|
burn_drive_forget(&(drive_array[i]), 1);
|
||||||
} else if(occup <= 100) {
|
} else if(occup <= 100) {
|
||||||
if(first_round)
|
if(first_round)
|
||||||
@ -1971,7 +1930,7 @@ int burn_abort_5(int patience,
|
|||||||
}
|
}
|
||||||
first_round = 0;
|
first_round = 0;
|
||||||
|
|
||||||
if(still_not_done == 0 || patience <= 0)
|
if(still_not_done == 0)
|
||||||
break;
|
break;
|
||||||
usleep(wait_grain);
|
usleep(wait_grain);
|
||||||
current_time = time(0);
|
current_time = time(0);
|
||||||
@ -1984,35 +1943,11 @@ int burn_abort_5(int patience,
|
|||||||
pacifier_time = current_time;
|
pacifier_time = current_time;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(flag & 1))
|
burn_finish();
|
||||||
burn_finish();
|
|
||||||
return(still_not_done == 0);
|
return(still_not_done == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Abort any running drive operation and finish libburn.
|
|
||||||
@param patience Maximum number of seconds to wait for drives to finish
|
|
||||||
@param pacifier_func Function to produce appeasing messages. See
|
|
||||||
burn_abort_pacifier() for an example.
|
|
||||||
@return 1 ok, all went well
|
|
||||||
0 had to leave a drive in unclean state
|
|
||||||
<0 severe error, do no use libburn again
|
|
||||||
*/
|
|
||||||
int burn_abort(int patience,
|
|
||||||
int (*pacifier_func)(void *handle, int patience, int elapsed),
|
|
||||||
void *handle)
|
|
||||||
{
|
|
||||||
int ret, flg = 0;
|
|
||||||
|
|
||||||
if (patience < 0) {
|
|
||||||
patience = 0;
|
|
||||||
flg |= 1;
|
|
||||||
}
|
|
||||||
ret = burn_abort_5(patience, pacifier_func, handle, 0, flg);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ts A61020 API function */
|
/* ts A61020 API function */
|
||||||
int burn_drive_get_start_end_lba(struct burn_drive *d,
|
int burn_drive_get_start_end_lba(struct burn_drive *d,
|
||||||
int *start_lba, int *end_lba, int flag)
|
int *start_lba, int *end_lba, int flag)
|
||||||
@ -2746,8 +2681,7 @@ int burn_drive_equals_adr(struct burn_drive *d1, char *adr2_in, int role2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int burn_drive_find_by_thread_pid(struct burn_drive **d, pid_t pid,
|
int burn_drive_find_by_thread_pid(struct burn_drive **d, pid_t pid)
|
||||||
pthread_t tid)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -2759,8 +2693,7 @@ int burn_drive_find_by_thread_pid(struct burn_drive **d, pid_t pid,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (drive_array[i].thread_pid_valid &&
|
if (drive_array[i].thread_pid_valid &&
|
||||||
drive_array[i].thread_pid == pid &&
|
drive_array[i].thread_pid == pid) {
|
||||||
pthread_equal(drive_array[i].thread_tid, tid)) {
|
|
||||||
*d = &(drive_array[i]);
|
*d = &(drive_array[i]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __DRIVE
|
#ifndef __DRIVE
|
||||||
#define __DRIVE
|
#define __DRIVE
|
||||||
|
|
||||||
@ -127,9 +121,8 @@ int burn_disc_get_write_mode_demands(struct burn_disc *disc,
|
|||||||
int burn_drive__fd_from_special_adr(char *adr);
|
int burn_drive__fd_from_special_adr(char *adr);
|
||||||
|
|
||||||
|
|
||||||
/* ts A70929 : Find the drive which is being worked on by pid , tid */
|
/* ts A70929 : Find the drive which is being worked on by pid */
|
||||||
int burn_drive_find_by_thread_pid(struct burn_drive **d, pid_t pid,
|
int burn_drive_find_by_thread_pid(struct burn_drive **d, pid_t pid);
|
||||||
pthread_t tid);
|
|
||||||
|
|
||||||
|
|
||||||
/* ts A51221 - A80731 : Whitelist inquiry functions */
|
/* ts A51221 - A80731 : Whitelist inquiry functions */
|
||||||
@ -142,12 +135,4 @@ char *burn_drive_whitelist_item(int idx, int flag);
|
|||||||
int burn_drive_is_listed(char *path, struct burn_drive **found, int flag);
|
int burn_drive_is_listed(char *path, struct burn_drive **found, int flag);
|
||||||
|
|
||||||
|
|
||||||
/* ts B00226 : Outsourced backend of burn_abort()
|
|
||||||
@param elapsed to be subtracted from start time
|
|
||||||
@param flag bit0= do not shutdown the library
|
|
||||||
*/
|
|
||||||
int burn_abort_5(int patience,
|
|
||||||
int (*pacifier_func)(void *handle, int patience, int elapsed),
|
|
||||||
void *handle, int elapsed, int flag);
|
|
||||||
|
|
||||||
#endif /* __DRIVE */
|
#endif /* __DRIVE */
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
/* ts A91016 : libburn/ecma130ab.c is the replacement for old libburn/lec.c
|
/* ts A91016 : libburn/ecma130ab.c is the replacement for old libburn/lec.c
|
||||||
|
|
||||||
Copyright 2009, Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
|
Copyright 2009, Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
|
|
||||||
This code module implements the production of RSPC parity bytes (P- and Q-
|
This code module implements the production of RSPC parity bytes (P- and Q-
|
||||||
parity) and the scrambling of raw CD-ROM sectors as specified in ECMA-130:
|
parity) and the scrambling of raw CD-ROM sectors as specified in ECMA-130:
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
/* ts A91016 : libburn/ecma130ab.h is the replacement for old libburn/lec.h
|
/* ts A91016 : libburn/ecma130ab.h is the replacement for old libburn/lec.h
|
||||||
|
|
||||||
Copyright 2009, Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
|
Copyright 2009, Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
|
|
||||||
This code module implements the computations prescribed in ECMA-130 Annex A
|
This code module implements the computations prescribed in ECMA-130 Annex A
|
||||||
and B. For explanations of the underlying mathematics see ecma130ab.c .
|
and B. For explanations of the underlying mathematics see ecma130ab.c .
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -89,9 +83,7 @@ static off_t file_size(struct burn_source *source)
|
|||||||
|
|
||||||
if (fs->fixed_size > 0)
|
if (fs->fixed_size > 0)
|
||||||
return fs->fixed_size;
|
return fs->fixed_size;
|
||||||
if (fstat(fs->datafd, &buf) != 0)
|
if (fstat(fs->datafd, &buf) == -1)
|
||||||
return (off_t) 0;
|
|
||||||
if ((buf.st_mode & S_IFMT) != S_IFREG)
|
|
||||||
return (off_t) 0;
|
return (off_t) 0;
|
||||||
return (off_t) buf.st_size;
|
return (off_t) buf.st_size;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BURN__FILE_H
|
#ifndef BURN__FILE_H
|
||||||
#define BURN__FILE_H
|
#define BURN__FILE_H
|
||||||
|
|
||||||
|
134
libburn/init.c
134
libburn/init.c
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
/* ts A61007 */
|
/* ts A61007 */
|
||||||
@ -15,7 +9,6 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
/* ts A70928 : init.h is for others, not for init .c
|
/* ts A70928 : init.h is for others, not for init .c
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
@ -39,16 +32,14 @@ struct libdax_msgs *libdax_messenger= NULL;
|
|||||||
|
|
||||||
int burn_running = 0;
|
int burn_running = 0;
|
||||||
|
|
||||||
/* ts A60813 : GNU/Linux: whether to use O_EXCL on open() of device files
|
/* ts A60813 : Linux: wether to use O_EXCL on open() of device files */
|
||||||
ts B00212 : FreeBSD: whether to use flock(LOCK_EX) after open()
|
|
||||||
*/
|
|
||||||
int burn_sg_open_o_excl = 1;
|
int burn_sg_open_o_excl = 1;
|
||||||
|
|
||||||
/* ts A70403 : GNU/Linux: wether to use fcntl(,F_SETLK,)
|
/* ts A70403 : Linux: wether to use fcntl(,F_SETLK,)
|
||||||
after open() of device files */
|
after open() of device files */
|
||||||
int burn_sg_fcntl_f_setlk = 1;
|
int burn_sg_fcntl_f_setlk = 1;
|
||||||
|
|
||||||
/* ts A70314 : GNU/Linux: what device family to use :
|
/* ts A70314 : Linux: what device family to use :
|
||||||
0= default family
|
0= default family
|
||||||
1= sr
|
1= sr
|
||||||
2= scd
|
2= scd
|
||||||
@ -81,13 +72,10 @@ static char sg_initialize_msg[1024] = {""};
|
|||||||
/* Parameters for builtin abort handler */
|
/* Parameters for builtin abort handler */
|
||||||
static char abort_message_prefix[81] = {"libburn : "};
|
static char abort_message_prefix[81] = {"libburn : "};
|
||||||
static pid_t abort_control_pid= 0;
|
static pid_t abort_control_pid= 0;
|
||||||
static pthread_t abort_control_thread;
|
|
||||||
volatile int burn_global_abort_level= 0;
|
volatile int burn_global_abort_level= 0;
|
||||||
int burn_global_abort_signum= 0;
|
int burn_global_abort_signum= 0;
|
||||||
void *burn_global_signal_handle = NULL;
|
void *burn_global_signal_handle = NULL;
|
||||||
burn_abort_handler_t burn_global_signal_handler = NULL;
|
burn_abort_handler_t burn_global_signal_handler = NULL;
|
||||||
int burn_builtin_signal_action = 0; /* burn_set_signal_handling() */
|
|
||||||
volatile int burn_builtin_triggered_action = 0; /* burn_is_aborting() */
|
|
||||||
|
|
||||||
|
|
||||||
/* ts A70223 : wether implemented untested profiles are supported */
|
/* ts A70223 : wether implemented untested profiles are supported */
|
||||||
@ -333,20 +321,6 @@ int burn_sev_to_text(int severity_number, char **severity_name, int flag)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ts B00224 */
|
|
||||||
char *burn_util_thread_id(pid_t pid, pthread_t tid, char text[80])
|
|
||||||
{
|
|
||||||
int i, l;
|
|
||||||
|
|
||||||
sprintf(text, "[%d,", getpid());
|
|
||||||
l= strlen(text);
|
|
||||||
for(i= 0; i < sizeof(pthread_t) && 2 * i < 80 - l - 3; i++)
|
|
||||||
sprintf(text + l + 2 * i,
|
|
||||||
"%2.2X", ((unsigned char *) &tid)[i]);
|
|
||||||
|
|
||||||
sprintf(text + l + 2 * i, "]");
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
int burn_builtin_abort_handler(void *handle, int signum, int flag)
|
int burn_builtin_abort_handler(void *handle, int signum, int flag)
|
||||||
{
|
{
|
||||||
@ -355,53 +329,15 @@ int burn_builtin_abort_handler(void *handle, int signum, int flag)
|
|||||||
/*
|
/*
|
||||||
#define Libburn_signal_handler_verbouS 1
|
#define Libburn_signal_handler_verbouS 1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
struct burn_drive *d;
|
struct burn_drive *d;
|
||||||
|
|
||||||
#ifdef Libburn_signal_handler_verbouS
|
#ifdef Libburn_signal_handler_verbouS
|
||||||
char text[80];
|
fprintf(stderr,
|
||||||
|
"libburn_ABORT: pid = %d , abort_control_pid = %d , sig= %d\n",
|
||||||
fprintf(stderr, "libburn_ABORT: in = %s\n",
|
getpid(), abort_control_pid, signum);
|
||||||
burn_util_thread_id(getpid(), pthread_self(), text));
|
|
||||||
fprintf(stderr, "libburn_ABORT: ctrl = %s\n",
|
|
||||||
burn_util_thread_id(abort_control_pid, abort_control_thread,
|
|
||||||
text));
|
|
||||||
if (burn_global_signal_handler == burn_builtin_abort_handler)
|
|
||||||
fprintf(stderr, "libburn_ABORT: signal action = %d\n",
|
|
||||||
burn_builtin_signal_action);
|
|
||||||
|
|
||||||
/* >>> find writing drives and report their tid
|
|
||||||
fprintf(stderr, "libburn_ABORT: wrt = %s\n",
|
|
||||||
burn_util_thread_id(0, burn_write_thread_id, text));
|
|
||||||
fprintf(stderr, "libburn_ABORT: sig= %d\n", signum);
|
|
||||||
*/
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
burn_builtin_triggered_action = burn_builtin_signal_action;
|
|
||||||
burn_global_abort_level = -1;
|
|
||||||
|
|
||||||
if (burn_builtin_signal_action > 1) {
|
|
||||||
Cleanup_set_handlers(NULL, NULL, 2);
|
|
||||||
if (burn_builtin_signal_action == 4)
|
|
||||||
return -2;
|
|
||||||
fprintf(stderr,"%sABORT : Trying to shut down busy drives\n",
|
|
||||||
abort_message_prefix);
|
|
||||||
fprintf(stderr,
|
|
||||||
"%sABORT : Wait the normal burning time before any kill -9\n",
|
|
||||||
abort_message_prefix);
|
|
||||||
burn_abort_5(0, burn_abort_pacifier, abort_message_prefix,
|
|
||||||
0, 1);
|
|
||||||
libdax_msgs_submit(libdax_messenger, -1, 0x00020177,
|
|
||||||
LIBDAX_MSGS_SEV_ABORT, LIBDAX_MSGS_PRIO_HIGH,
|
|
||||||
"Urged drive worker threads to do emergency halt",
|
|
||||||
0, 0);
|
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ---- old deprecated stuck-in-abort-handler loop ---- */
|
|
||||||
|
|
||||||
/* ts A70928:
|
/* ts A70928:
|
||||||
Must be quick. Allowed to coincide with other thread and to share
|
Must be quick. Allowed to coincide with other thread and to share
|
||||||
the increment with that one. It must not decrease, though, and
|
the increment with that one. It must not decrease, though, and
|
||||||
@ -414,8 +350,7 @@ int burn_builtin_abort_handler(void *handle, int signum, int flag)
|
|||||||
|
|
||||||
#ifdef Libburn_new_thread_signal_handleR
|
#ifdef Libburn_new_thread_signal_handleR
|
||||||
|
|
||||||
ret = burn_drive_find_by_thread_pid(&d, getpid(),
|
ret = burn_drive_find_by_thread_pid(&d, getpid());
|
||||||
pthread_self());
|
|
||||||
if (ret > 0 && d->busy == BURN_DRIVE_WRITING) {
|
if (ret > 0 && d->busy == BURN_DRIVE_WRITING) {
|
||||||
/* This is an active writer thread */
|
/* This is an active writer thread */
|
||||||
|
|
||||||
@ -455,13 +390,13 @@ int burn_builtin_abort_handler(void *handle, int signum, int flag)
|
|||||||
}
|
}
|
||||||
burn_global_abort_level = -1;
|
burn_global_abort_level = -1;
|
||||||
Cleanup_set_handlers(NULL, NULL, 2);
|
Cleanup_set_handlers(NULL, NULL, 2);
|
||||||
|
|
||||||
fprintf(stderr,"%sABORT : Trying to shut down drive and library\n",
|
fprintf(stderr,"%sABORT : Trying to shut down drive and library\n",
|
||||||
abort_message_prefix);
|
abort_message_prefix);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"%sABORT : Wait the normal burning time before any kill -9\n",
|
"%sABORT : Wait the normal burning time before any kill -9\n",
|
||||||
abort_message_prefix);
|
abort_message_prefix);
|
||||||
close(0); /* somehow stdin as input blocks abort until EOF */
|
close(0); /* somehow stdin as input blocks abort until EOF */
|
||||||
|
|
||||||
burn_abort(4440, burn_abort_pacifier, abort_message_prefix);
|
burn_abort(4440, burn_abort_pacifier, abort_message_prefix);
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
@ -471,71 +406,28 @@ int burn_builtin_abort_handler(void *handle, int signum, int flag)
|
|||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ts A61002 : API */
|
|
||||||
void burn_set_signal_handling(void *handle, burn_abort_handler_t handler,
|
void burn_set_signal_handling(void *handle, burn_abort_handler_t handler,
|
||||||
int mode)
|
int mode)
|
||||||
{
|
{
|
||||||
|
if(handler == NULL && mode == 0) {
|
||||||
/*
|
|
||||||
fprintf(stderr, "libburn_experimental: burn_set_signal_handling, handler==%lx mode=%d\n", (unsigned long) handler, mode);
|
|
||||||
*/
|
|
||||||
|
|
||||||
if(handler == NULL) {
|
|
||||||
handler = burn_builtin_abort_handler;
|
handler = burn_builtin_abort_handler;
|
||||||
/*
|
/*
|
||||||
if ((mode & ~4) == 0)
|
fprintf(stderr, "libburn_experimental: activated burn_builtin_abort_handler() with handle '%s'\n",(handle==NULL ? "libburn : " : (char *) handle));
|
||||||
fprintf(stderr, "libburn_experimental: activated burn_builtin_abort_handler() with handle '%s'\n",(handle==NULL ? "libburn : " : (char *) handle));
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
strcpy(abort_message_prefix, "libburn : ");
|
strcpy(abort_message_prefix, "libburn : ");
|
||||||
abort_message_prefix[0] = 0;
|
if(handle != NULL)
|
||||||
if(handle != NULL && handler == burn_builtin_abort_handler)
|
|
||||||
strncpy(abort_message_prefix, (char *) handle,
|
strncpy(abort_message_prefix, (char *) handle,
|
||||||
sizeof(abort_message_prefix)-1);
|
sizeof(abort_message_prefix)-1);
|
||||||
abort_message_prefix[sizeof(abort_message_prefix)-1] = 0;
|
abort_message_prefix[sizeof(abort_message_prefix)-1] = 0;
|
||||||
abort_control_pid = getpid();
|
abort_control_pid = getpid();
|
||||||
abort_control_thread = pthread_self();
|
Cleanup_set_handlers(handle, (Cleanup_app_handler_T) handler, mode|4);
|
||||||
burn_builtin_signal_action = (mode >> 4) & 15;
|
|
||||||
if((mode & 11) != 0)
|
|
||||||
burn_builtin_signal_action = 0;
|
|
||||||
if(burn_builtin_signal_action > 1)
|
|
||||||
burn_builtin_triggered_action = 0;
|
|
||||||
if(burn_builtin_signal_action == 0)
|
|
||||||
burn_builtin_signal_action = 1;
|
|
||||||
Cleanup_set_handlers(handle, (Cleanup_app_handler_T) handler,
|
|
||||||
(mode & 15) | 4);
|
|
||||||
burn_global_signal_handle = handle;
|
burn_global_signal_handle = handle;
|
||||||
burn_global_signal_handler = handler;
|
burn_global_signal_handler = handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ts B00304 : API */
|
|
||||||
int burn_is_aborting(int flag)
|
|
||||||
{
|
|
||||||
return burn_builtin_triggered_action;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ts B00225 */
|
|
||||||
/* @return 0= no abort action 2 pending , 1= not control thread
|
|
||||||
*/
|
|
||||||
int burn_init_catch_on_abort(int flag)
|
|
||||||
{
|
|
||||||
if (burn_builtin_triggered_action != 2)
|
|
||||||
return 0;
|
|
||||||
if (abort_control_pid != getpid() ||
|
|
||||||
abort_control_thread != pthread_self())
|
|
||||||
return 1;
|
|
||||||
burn_abort(4440, burn_abort_pacifier, abort_message_prefix);
|
|
||||||
fprintf(stderr,
|
|
||||||
"\n%sABORT : Program done. Even if you do not see a shell prompt.\n\n",
|
|
||||||
abort_message_prefix);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* ts A70223 : API */
|
/* ts A70223 : API */
|
||||||
void burn_allow_untested_profiles(int yes)
|
void burn_allow_untested_profiles(int yes)
|
||||||
{
|
{
|
||||||
|
@ -17,15 +17,5 @@ extern int burn_global_abort_signum;
|
|||||||
extern void *burn_global_signal_handle;
|
extern void *burn_global_signal_handle;
|
||||||
extern burn_abort_handler_t burn_global_signal_handler;
|
extern burn_abort_handler_t burn_global_signal_handler;
|
||||||
|
|
||||||
extern int burn_builtin_signal_action; /* burn_set_signal_handling() */
|
|
||||||
extern volatile int burn_builtin_triggered_action; /* burn_is_aborting() */
|
|
||||||
|
|
||||||
|
|
||||||
/* ts B00225 */
|
|
||||||
/* @return 0= no abort pending , 1= not control thread ,
|
|
||||||
-1= surprisingly burn_abort returned
|
|
||||||
*/
|
|
||||||
int burn_init_catch_on_abort(int flag);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* BURN__INIT_H */
|
#endif /* BURN__INIT_H */
|
||||||
|
@ -1,14 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
|
|
||||||
This is the official API definition of libburn.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef LIBBURN_H
|
#ifndef LIBBURN_H
|
||||||
#define LIBBURN_H
|
#define LIBBURN_H
|
||||||
|
|
||||||
@ -736,22 +727,17 @@ void burn_finish(void);
|
|||||||
|
|
||||||
|
|
||||||
/* ts A61002 */
|
/* ts A61002 */
|
||||||
/** Abort any running drive operation and eventually call burn_finish().
|
/** Abort any running drive operation and finally call burn_finish().
|
||||||
|
You MUST calm down the busy drive if an aborting event occurs during a
|
||||||
You MUST shut down the busy drives if an aborting event occurs during a
|
|
||||||
burn run. For that you may call this function either from your own signal
|
burn run. For that you may call this function either from your own signal
|
||||||
handling code or indirectly by activating the built-in signal handling:
|
handling code or indirectly by activating the builtin signal handling:
|
||||||
burn_set_signal_handling("my_app_name : ", NULL, 0);
|
burn_set_signal_handling("my_app_name : ", NULL, 0);
|
||||||
Else you may eventually call burn_drive_cancel() on the active drives and
|
Else you may eventually call burn_drive_cancel() on the active drive and
|
||||||
wait for them to assume state BURN_DRIVE_IDLE.
|
wait for it to assume state BURN_DRIVE_IDLE.
|
||||||
@param patience Maximum number of seconds to wait for drives to
|
@param patience Maximum number of seconds to wait for drives to finish
|
||||||
finish.
|
|
||||||
@since 0.7.8 :
|
|
||||||
If this is -1, then only the cancel operations will
|
|
||||||
be performed and no burn_finish() will happen.
|
|
||||||
@param pacifier_func If not NULL: a function to produce appeasing messages.
|
@param pacifier_func If not NULL: a function to produce appeasing messages.
|
||||||
See burn_abort_pacifier() for an example.
|
See burn_abort_pacifier() for an example.
|
||||||
@param handle Opaque handle to be used with pacifier_func
|
@param handle Opaque handle to be used with pacifier_func
|
||||||
@return 1 ok, all went well
|
@return 1 ok, all went well
|
||||||
0 had to leave a drive in unclean state
|
0 had to leave a drive in unclean state
|
||||||
<0 severe error, do no use libburn again
|
<0 severe error, do no use libburn again
|
||||||
@ -779,7 +765,7 @@ int burn_abort_pacifier(void *handle, int patience, int elapsed);
|
|||||||
void burn_set_verbosity(int level);
|
void burn_set_verbosity(int level);
|
||||||
|
|
||||||
/* ts A91111 */
|
/* ts A91111 */
|
||||||
/** Enable resp. disable logging of SCSI commands (currently GNU/Linux only).
|
/** Enable resp. disable logging of SCSI commands (currently Linux only).
|
||||||
This call can be made at any time - even before burn_initialize().
|
This call can be made at any time - even before burn_initialize().
|
||||||
It is in effect for all active drives and currently not very thread
|
It is in effect for all active drives and currently not very thread
|
||||||
safe for multiple drives.
|
safe for multiple drives.
|
||||||
@ -796,11 +782,12 @@ void burn_set_scsi_logging(int flag);
|
|||||||
after burn_initialize() and before any bus scan. But not mandatory at all.
|
after burn_initialize() and before any bus scan. But not mandatory at all.
|
||||||
Parameter value 1 enables a feature, 0 disables.
|
Parameter value 1 enables a feature, 0 disables.
|
||||||
Default is (1,0,0). Have a good reason before you change it.
|
Default is (1,0,0). Have a good reason before you change it.
|
||||||
@param exclusive
|
@param exclusive Linux only:
|
||||||
0 = no attempt to make drive access exclusive.
|
0 = no attempt to make drive access exclusive.
|
||||||
1 = Try to open only devices which are not marked as busy
|
1 = Try to open only devices which are not marked as busy
|
||||||
and try to mark them busy if opened sucessfully. (O_EXCL
|
and try to mark them busy if opened sucessfully. (O_EXCL)
|
||||||
on GNU/Linux , flock(LOCK_EX) on FreeBSD.)
|
There are kernels which simply don't care about O_EXCL.
|
||||||
|
Some have it off, some have it on, some are switchable.
|
||||||
2 = in case of a SCSI device, also try to open exclusively
|
2 = in case of a SCSI device, also try to open exclusively
|
||||||
the matching /dev/sr, /dev/scd and /dev/st .
|
the matching /dev/sr, /dev/scd and /dev/st .
|
||||||
One may select a device SCSI file family by adding
|
One may select a device SCSI file family by adding
|
||||||
@ -809,8 +796,8 @@ void burn_set_scsi_logging(int flag);
|
|||||||
8 = /dev/scd%d
|
8 = /dev/scd%d
|
||||||
16 = /dev/sg%d
|
16 = /dev/sg%d
|
||||||
Do not use other values !
|
Do not use other values !
|
||||||
Add 32 to demand on GNU/Linux an exclusive lock by
|
Add 32 to demand an exclusive lock by fcntl(,F_SETLK,)
|
||||||
fcntl(,F_SETLK,) after open() has succeeded.
|
after open() has succeeded.
|
||||||
@param blocking Try to wait for drives which do not open immediately but
|
@param blocking Try to wait for drives which do not open immediately but
|
||||||
also do not return an error as well. (O_NONBLOCK)
|
also do not return an error as well. (O_NONBLOCK)
|
||||||
This might stall indefinitely with /dev/hdX hard disks.
|
This might stall indefinitely with /dev/hdX hard disks.
|
||||||
@ -1110,6 +1097,7 @@ int burn_drive_snooze(struct burn_drive *d, int flag);
|
|||||||
|
|
||||||
/** Release a drive. This should not be done until the drive is no longer
|
/** Release a drive. This should not be done until the drive is no longer
|
||||||
busy (see burn_drive_get_status).
|
busy (see burn_drive_get_status).
|
||||||
|
Linux: The drive device file is not reserved afterwards. (O_EXCL, F_SETLK).
|
||||||
@param drive The drive to release.
|
@param drive The drive to release.
|
||||||
@param eject Nonzero to make the drive eject the disc in it.
|
@param eject Nonzero to make the drive eject the disc in it.
|
||||||
*/
|
*/
|
||||||
@ -2627,12 +2615,12 @@ void burn_version(int *major, int *minor, int *micro);
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
#define burn_header_version_major 0
|
#define burn_header_version_major 0
|
||||||
#define burn_header_version_minor 8
|
#define burn_header_version_minor 7
|
||||||
#define burn_header_version_micro 0
|
#define burn_header_version_micro 6
|
||||||
/** Note:
|
/** Note:
|
||||||
Above version numbers are also recorded in configure.ac because libtool
|
Above version numbers are also recorded in configure.ac because libtool
|
||||||
wants them as parameters at build time.
|
wants them as parameters at build time.
|
||||||
For the library compatibility check, BURN_*_VERSION in configure.ac
|
For the library compatibility check BURN_*_VERSION in configure.ac
|
||||||
are not decisive. Only the three numbers above do matter.
|
are not decisive. Only the three numbers above do matter.
|
||||||
*/
|
*/
|
||||||
/** Usage discussion:
|
/** Usage discussion:
|
||||||
@ -2789,82 +2777,30 @@ int burn_set_messenger(void *messenger);
|
|||||||
|
|
||||||
/* ts A61002 */
|
/* ts A61002 */
|
||||||
/* @since 0.2.6 */
|
/* @since 0.2.6 */
|
||||||
/** The prototype of a handler function suitable for burn_set_signal_handling()
|
/** The prototype of a handler function suitable for burn_set_abort_handling().
|
||||||
Such a function has to return -2 if it does not want the process to
|
Such a function has to return -2 if it does not want the process to
|
||||||
exit with value 1.
|
exit with value 1.
|
||||||
*/
|
*/
|
||||||
typedef int (*burn_abort_handler_t)(void *handle, int signum, int flag);
|
typedef int (*burn_abort_handler_t)(void *handle, int signum, int flag);
|
||||||
|
|
||||||
/** Control built-in signal handling. Either by setting an own handler or
|
/** Control builtin signal handling. See also burn_abort().
|
||||||
by activating the built-in signal handler.
|
|
||||||
|
|
||||||
A function parameter handle of NULL activates the built-in abort handler.
|
|
||||||
Depending on mode it may cancel all drive operations, wait for all drives
|
|
||||||
to become idle, exit(1). It may also prepare function
|
|
||||||
burn_drive_get_status() for waiting and performing exit(1).
|
|
||||||
If parameter handle may be NULL or a text that shall be used as prefix for
|
|
||||||
pacifier messages of burn_abort_pacifier(). Other than with an application
|
|
||||||
provided handler, the prefix char array does not have to be kept existing
|
|
||||||
until the eventual signal event.
|
|
||||||
Before version 0.7.8 only action 0 was available. I.e. the built-in handler
|
|
||||||
waited for the drives to become idle and then performed exit(1) directly.
|
|
||||||
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_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).
|
|
||||||
|
|
||||||
@param handle Opaque handle eventually pointing to an application
|
@param handle Opaque handle eventually pointing to an application
|
||||||
provided memory object
|
provided memory object
|
||||||
@param handler A function to be called on signals. It will get handle as
|
@param handler A function to be called on signals. It will get handle as
|
||||||
argument. flag will be 0.
|
argument. It should finally call burn_abort(). See there.
|
||||||
It should finally call burn_abort(). See there.
|
@param mode : 0 call handler(handle, signum, 0) on nearly all signals
|
||||||
@param mode : bit0 - bit3:
|
1 enable system default reaction on all signals
|
||||||
Receiving signals:
|
2 try to ignore nearly all signals
|
||||||
0 Call handler(handle, signum, 0) on nearly all signals
|
10 like mode 2 but handle SIGABRT like with mode 0
|
||||||
1 Enable system default reaction on all signals
|
Arguments (text, NULL, 0) activate the builtin abort handler. It will
|
||||||
2 Try to ignore nearly all signals
|
eventually call burn_abort() and then perform exit(1). If text is not NULL
|
||||||
10 like mode 2 but handle SIGABRT like with mode 0
|
then it is used as prefix for pacifier messages of burn_abort_pacifier().
|
||||||
bit4 - bit7: With handler == NULL :
|
|
||||||
Action of built-in handler. "control thread" is the one
|
|
||||||
which called burn_set_signal_handling().
|
|
||||||
All actions activate receive mode 2 to ignore further
|
|
||||||
signals.
|
|
||||||
0 Same as 1 (for pre-0.7.8 backward compatibility)
|
|
||||||
@since 0.7.8
|
|
||||||
1 Catch the control thread in abort handler, call
|
|
||||||
burn_abort(>0) and finally exit(1).
|
|
||||||
Does not always work with FreeBSD.
|
|
||||||
2 Call burn_abort(-1) and return from handler. When the
|
|
||||||
control thread calls burn_drive_get_status(), then do
|
|
||||||
burn_abort(>0) instead, and finally exit(1).
|
|
||||||
Does not always work with FreeBSD.
|
|
||||||
3 Call burn_abort(-1), return from handler. It is duty of
|
|
||||||
the application to detect a pending abort condition
|
|
||||||
by calling burn_is_aborting() and to wait for all
|
|
||||||
drives to become idle. E.g. by calling burn_abort(>0).
|
|
||||||
4 Like 3, but without calling burn_abort(-1). Only the
|
|
||||||
indicator of burn_is_aborting() gets set.
|
|
||||||
@since 0.2.6
|
@since 0.2.6
|
||||||
*/
|
*/
|
||||||
void burn_set_signal_handling(void *handle, burn_abort_handler_t handler,
|
void burn_set_signal_handling(void *handle, burn_abort_handler_t handler,
|
||||||
int mode);
|
int mode);
|
||||||
|
|
||||||
|
|
||||||
/* ts B00304 */
|
|
||||||
/* Inquire whether the built-in abort handler was triggered by a signal.
|
|
||||||
This has to be done to detect pending abort handling if signal handling
|
|
||||||
was set to the built-in handler and action was set to 2 or 3.
|
|
||||||
@param flag Bitfield for control purposes (unused yet, submit 0)
|
|
||||||
@return 0 = no abort was triggered
|
|
||||||
>0 = action that was triggered (action 0 is reported as 1)
|
|
||||||
@since 0.7.8
|
|
||||||
*/
|
|
||||||
int burn_is_aborting(int flag);
|
|
||||||
|
|
||||||
|
|
||||||
/* ts A70811 */
|
/* ts A70811 */
|
||||||
/** Write data in random access mode.
|
/** Write data in random access mode.
|
||||||
The drive must be grabbed successfully before calling this function which
|
The drive must be grabbed successfully before calling this function which
|
||||||
@ -3012,4 +2948,5 @@ BURN_END_DECLS
|
|||||||
#define Libburn_dummy_probe_write_modeS 1
|
#define Libburn_dummy_probe_write_modeS 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /*LIBBURN_H*/
|
#endif /*LIBBURN_H*/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* libdax_audioxtr
|
/* libdax_audioxtr
|
||||||
Audio track data extraction facility of libdax and libburn.
|
Audio track data extraction facility of libdax and libburn.
|
||||||
Copyright (C) 2006 Thomas Schmitt <scdbackup@gmx.net>, provided under GPLv2+
|
Copyright (C) 2006 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* libdax_audioxtr
|
/* libdax_audioxtr
|
||||||
Audio track data extraction facility of libdax and libburn.
|
Audio track data extraction facility of libdax and libburn.
|
||||||
Copyright (C) 2006 Thomas Schmitt <scdbackup@gmx.net>, provided under GPLv2+
|
Copyright (C) 2006 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBDAX_AUDIOXTR_H_INCLUDED
|
#ifndef LIBDAX_AUDIOXTR_H_INCLUDED
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/* libdax_msgs
|
/* libdax_msgs
|
||||||
Message handling facility of libdax.
|
Message handling facility of libdax.
|
||||||
Copyright (C) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>,
|
Copyright (C) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>,
|
||||||
provided under GPL version 2 or later.
|
provided under GPL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -12,7 +12,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
/* Only this single source module is entitled to do this */
|
/* Only this single source module is entitled to do this */
|
||||||
#define LIBDAX_MSGS_H_INTERNAL 1
|
#define LIBDAX_MSGS_H_INTERNAL 1
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/* libdax_msgs
|
/* libdax_msgs
|
||||||
Message handling facility of libdax.
|
Message handling facility of libdax.
|
||||||
Copyright (C) 2006-2010 Thomas Schmitt <scdbackup@gmx.net>,
|
Copyright (C) 2006-2010 Thomas Schmitt <scdbackup@gmx.net>,
|
||||||
provided under GPL version 2 or later.
|
provided under GPL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -554,8 +554,6 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
|
|||||||
0x00020174 (SORRY,HIGH) = Fifo alignment does not allow desired read size
|
0x00020174 (SORRY,HIGH) = Fifo alignment does not allow desired read size
|
||||||
0x00020175 (FATAL,HIGH) = Supporting library is too old
|
0x00020175 (FATAL,HIGH) = Supporting library is too old
|
||||||
0x00020176 (NOTE,HIGH) = Stream recording disabled because of small OS buffer
|
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
|
|
||||||
|
|
||||||
|
|
||||||
libdax_audioxtr:
|
libdax_audioxtr:
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* ts A61009 */
|
/* ts A61009 */
|
||||||
/* #include <a ssert.h> */
|
/* #include <a ssert.h> */
|
||||||
|
|
||||||
@ -425,10 +419,6 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa)
|
|||||||
if (mmc_function_spy(d, "mmc_get_nwa") <= 0)
|
if (mmc_function_spy(d, "mmc_get_nwa") <= 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* ts B00327 : Avoid to inquire unsuitable media states */
|
|
||||||
if (d->status != BURN_DISC_BLANK && d->status != BURN_DISC_APPENDABLE)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
ret = mmc_read_track_info(d, trackno, &buf, alloc_len);
|
ret = mmc_read_track_info(d, trackno, &buf, alloc_len);
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
return ret;
|
return ret;
|
||||||
@ -4088,7 +4078,7 @@ int mmc_read_disc_structure(struct burn_drive *d,
|
|||||||
desired payload bytes. The drive then returns 35
|
desired payload bytes. The drive then returns 35
|
||||||
bytes as requested and the media id is "RITEKF1".
|
bytes as requested and the media id is "RITEKF1".
|
||||||
Nevertheless this is not a generally usable gesture
|
Nevertheless this is not a generally usable gesture
|
||||||
because older GNU/Linux USB dislikes requests to fetch
|
because older Linux USB dislikes requests to fetch
|
||||||
more bytes than the drive will deliver.
|
more bytes than the drive will deliver.
|
||||||
|
|
||||||
# define Libburn_enforce_structure_code_0x0E 1
|
# define Libburn_enforce_structure_code_0x0E 1
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __MMC
|
#ifndef __MMC
|
||||||
#define __MMC
|
#define __MMC
|
||||||
|
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "null.h"
|
#include "null.h"
|
||||||
#include "libburn.h"
|
#include "libburn.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "libburn.h"
|
#include "libburn.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "drive.h"
|
#include "drive.h"
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BURN__OPTIONS_H
|
#ifndef BURN__OPTIONS_H
|
||||||
#define BURN__OPTIONS_H
|
#define BURN__OPTIONS_H
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
Unknown POSIX like systems
|
Unknown POSIX like systems
|
||||||
with the dummy MMC transport adapter sg-dummy.c
|
with the dummy MMC transport adapter sg-dummy.c
|
||||||
|
|
||||||
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPLv2+
|
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
by os.h in case of compilation for
|
by os.h in case of compilation for
|
||||||
FreeBSD with CAM
|
FreeBSD with CAM
|
||||||
|
|
||||||
Copyright (C) 2006 Thomas Schmitt <scdbackup@gmx.net>, provided under GPLv2+
|
Copyright (C) 2006 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** List of all signals which shall be caught by signal handlers and trigger
|
/** List of all signals which shall be caught by signal handlers and trigger
|
||||||
@ -59,6 +59,5 @@ typedef struct burn_drive_enumeration_state *burn_drive_enumerator_t;
|
|||||||
#define BURN_OS_TRANSPORT_DRIVE_ELEMENTS \
|
#define BURN_OS_TRANSPORT_DRIVE_ELEMENTS \
|
||||||
struct cam_device* cam; \
|
struct cam_device* cam; \
|
||||||
int lock_fd; \
|
int lock_fd; \
|
||||||
int is_ahci; \
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
Unknown X/Open-like systems
|
Unknown X/Open-like systems
|
||||||
with GNU libcdio MMC transport adapter sg-libcdio.c
|
with GNU libcdio MMC transport adapter sg-libcdio.c
|
||||||
|
|
||||||
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPLv2+
|
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ SIGKILL, SIGCHLD, SIGSTOP
|
|||||||
/* Important : MUST be at least 32768 ! */
|
/* Important : MUST be at least 32768 ! */
|
||||||
/* My Blu-ray burner LG GGW-H20 writes junk if stream recording is combined
|
/* 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.
|
with buffer size 32 kB. So stream recording is allowed only with size 64k.
|
||||||
This makes it worth to have a special case for GNU/Linux buffer size here.
|
This makes it worth to have a special case for Linux buffer size here.
|
||||||
*/
|
*/
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
#define BURN_OS_TRANSPORT_BUFFER_SIZE 65536
|
#define BURN_OS_TRANSPORT_BUFFER_SIZE 65536
|
||||||
|
@ -2,10 +2,9 @@
|
|||||||
/* os-linux.h
|
/* os-linux.h
|
||||||
Operating system specific libburn definitions and declarations. Included
|
Operating system specific libburn definitions and declarations. Included
|
||||||
by os.h in case of compilation for
|
by os.h in case of compilation for
|
||||||
Linux kernels 2.4 and 2.6, GNU/Linux SCSI Generic (sg)
|
Linux kernels 2.4 and 2.6 with Linux SCSI Generic (sg)
|
||||||
|
|
||||||
Copyright (C) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
Copyright (C) 2006 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Operating system specific libburn definitions and declarations.
|
Operating system specific libburn definitions and declarations.
|
||||||
The macros defined here are used by libburn modules in order to
|
The macros defined here are used by libburn modules in order to
|
||||||
avoid own system dependent case distinctions.
|
avoid own system dependent case distinctions.
|
||||||
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPLv2+
|
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BURN_OS_H_INCLUDED
|
#ifndef BURN_OS_H_INCLUDED
|
||||||
@ -41,7 +41,7 @@
|
|||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
|
|
||||||
|
|
||||||
/* ------- Linux kernels 2.4 and 2.6 with GNU/Linux SCSI Generic (sg) ------ */
|
/* --------- Linux kernels 2.4 and 2.6 with Linux SCSI Generic (sg) -------- */
|
||||||
#include "os-linux.h"
|
#include "os-linux.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
/* #include <m alloc.h> ts A61013 : not in Linux man 3 malloc */
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* #include <m alloc.h> ts A61013 : not in GNU/Linux man 3 malloc */
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -100,13 +94,7 @@ drive, or only store a subset of the _opts structs in drives */
|
|||||||
fakesub[20] = 2;
|
fakesub[20] = 2;
|
||||||
fakesub[12] = (d->toc->toc_entry[0].control << 4) +
|
fakesub[12] = (d->toc->toc_entry[0].control << 4) +
|
||||||
d->toc->toc_entry[0].adr;
|
d->toc->toc_entry[0].adr;
|
||||||
|
|
||||||
#ifdef Libburn_no_crc_C
|
|
||||||
crc = 0; /* dummy */
|
|
||||||
#else
|
|
||||||
crc = crc_ccitt(fakesub + 12, 10);
|
crc = crc_ccitt(fakesub + 12, 10);
|
||||||
#endif
|
|
||||||
|
|
||||||
fakesub[22] = crc >> 8;
|
fakesub[22] = crc >> 8;
|
||||||
fakesub[23] = crc & 0xFF;
|
fakesub[23] = crc & 0xFF;
|
||||||
write(o->subfd, fakesub, 96);
|
write(o->subfd, fakesub, 96);
|
||||||
@ -253,8 +241,6 @@ void burn_packet_process(struct burn_drive *d, unsigned char *data,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
crc = (*(sub + 22) << 8) + *(sub + 23);
|
crc = (*(sub + 22) << 8) + *(sub + 23);
|
||||||
|
|
||||||
#ifndef Libburn_no_crc_C
|
|
||||||
if (crc != crc_ccitt(sub + 12, 10)) {
|
if (crc != crc_ccitt(sub + 12, 10)) {
|
||||||
burn_print(1, "sending error on %s %s\n",
|
burn_print(1, "sending error on %s %s\n",
|
||||||
d->idata->vendor, d->idata->product);
|
d->idata->vendor, d->idata->product);
|
||||||
@ -263,8 +249,6 @@ void burn_packet_process(struct burn_drive *d, unsigned char *data,
|
|||||||
*/
|
*/
|
||||||
burn_print(1, "crc mismatch in Q\n");
|
burn_print(1, "crc mismatch in Q\n");
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* else process_q(d, sub + 12); */
|
/* else process_q(d, sub + 12); */
|
||||||
/*
|
/*
|
||||||
if (o->subfd != -1) write(o->subfd, sub, 96); */
|
if (o->subfd != -1) write(o->subfd, sub, 96); */
|
||||||
|
@ -2,12 +2,6 @@
|
|||||||
|
|
||||||
/* scsi block commands */
|
/* scsi block commands */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __SBC
|
#ifndef __SBC
|
||||||
#define __SBC
|
#define __SBC
|
||||||
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
/* ts A61010 */
|
/* ts A61010 */
|
||||||
@ -31,7 +25,7 @@ extern struct libdax_msgs *libdax_messenger;
|
|||||||
|
|
||||||
|
|
||||||
#ifdef Libburn_log_in_and_out_streaM
|
#ifdef Libburn_log_in_and_out_streaM
|
||||||
/* ts A61031 */
|
/* <<< ts A61031 */
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@ -102,7 +96,7 @@ static void get_bytes(struct burn_track *track, int count, unsigned char *data)
|
|||||||
int valid, shortage, curr, i, tr;
|
int valid, shortage, curr, i, tr;
|
||||||
|
|
||||||
#ifdef Libburn_log_in_and_out_streaM
|
#ifdef Libburn_log_in_and_out_streaM
|
||||||
/* ts A61031 */
|
/* <<< ts A61031 */
|
||||||
static int tee_fd= -1;
|
static int tee_fd= -1;
|
||||||
if(tee_fd==-1)
|
if(tee_fd==-1)
|
||||||
tee_fd= open("/tmp/libburn_sg_readin",
|
tee_fd= open("/tmp/libburn_sg_readin",
|
||||||
@ -148,7 +142,7 @@ static void get_bytes(struct burn_track *track, int count, unsigned char *data)
|
|||||||
track->sourcecount += valid;
|
track->sourcecount += valid;
|
||||||
|
|
||||||
#ifdef Libburn_log_in_and_out_streaM
|
#ifdef Libburn_log_in_and_out_streaM
|
||||||
/* ts A61031 */
|
/* <<< ts A61031 */
|
||||||
if(tee_fd!=-1 && valid>0) {
|
if(tee_fd!=-1 && valid>0) {
|
||||||
write(tee_fd, data + curr, valid);
|
write(tee_fd, data + curr, valid);
|
||||||
}
|
}
|
||||||
@ -411,13 +405,7 @@ a2 - lout ctrl
|
|||||||
q[7] = dec_to_bcd(d->toc_entry[track].pmin);
|
q[7] = dec_to_bcd(d->toc_entry[track].pmin);
|
||||||
q[8] = dec_to_bcd(d->toc_entry[track].psec);
|
q[8] = dec_to_bcd(d->toc_entry[track].psec);
|
||||||
q[9] = dec_to_bcd(d->toc_entry[track].pframe);
|
q[9] = dec_to_bcd(d->toc_entry[track].pframe);
|
||||||
|
|
||||||
#ifdef Libburn_no_crc_C
|
|
||||||
crc = 0; /* dummy */
|
|
||||||
#else
|
|
||||||
crc = crc_ccitt(q, 10);
|
crc = crc_ccitt(q, 10);
|
||||||
#endif
|
|
||||||
|
|
||||||
q[10] = crc >> 8;
|
q[10] = crc >> 8;
|
||||||
q[11] = crc & 0xFF;
|
q[11] = crc & 0xFF;
|
||||||
d->toc_temp++;
|
d->toc_temp++;
|
||||||
@ -514,13 +502,7 @@ static void subcode_lout(struct burn_write_opts *o, unsigned char control,
|
|||||||
q[7] = dec_to_bcd(min);
|
q[7] = dec_to_bcd(min);
|
||||||
q[8] = dec_to_bcd(sec);
|
q[8] = dec_to_bcd(sec);
|
||||||
q[9] = dec_to_bcd(frame);
|
q[9] = dec_to_bcd(frame);
|
||||||
|
|
||||||
#ifdef Libburn_no_crc_C
|
|
||||||
crc = 0; /* dummy */
|
|
||||||
#else
|
|
||||||
crc = crc_ccitt(q, 10);
|
crc = crc_ccitt(q, 10);
|
||||||
#endif
|
|
||||||
|
|
||||||
q[10] = crc >> 8;
|
q[10] = crc >> 8;
|
||||||
q[11] = crc & 0xFF;
|
q[11] = crc & 0xFF;
|
||||||
}
|
}
|
||||||
@ -640,13 +622,7 @@ void subcode_user(struct burn_write_opts *o, unsigned char *subcodes,
|
|||||||
}
|
}
|
||||||
q[0] = (control << 4) + qmode;
|
q[0] = (control << 4) + qmode;
|
||||||
|
|
||||||
|
|
||||||
#ifdef Libburn_no_crc_C
|
|
||||||
crc = 0; /* dummy */
|
|
||||||
#else
|
|
||||||
crc = crc_ccitt(q, 10);
|
crc = crc_ccitt(q, 10);
|
||||||
#endif
|
|
||||||
|
|
||||||
q[10] = crc >> 8;
|
q[10] = crc >> 8;
|
||||||
q[11] = crc & 0xff;
|
q[11] = crc & 0xff;
|
||||||
}
|
}
|
||||||
@ -678,7 +654,7 @@ int sector_data(struct burn_write_opts *o, struct burn_track *t, int psub)
|
|||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
|
|
||||||
data = get_sector(o, t, t->mode);
|
data = get_sector(o, t, t->mode);
|
||||||
if (data == NULL)
|
if (!data)
|
||||||
return 0;
|
return 0;
|
||||||
/* ts A61010 */
|
/* ts A61010 */
|
||||||
if (convert_data(o, t, t->mode, data) <= 0)
|
if (convert_data(o, t, t->mode, data) <= 0)
|
||||||
@ -792,13 +768,7 @@ int sector_headers(struct burn_write_opts *o, unsigned char *out,
|
|||||||
out[15] = modebyte;
|
out[15] = modebyte;
|
||||||
}
|
}
|
||||||
if (mode & BURN_MODE1) {
|
if (mode & BURN_MODE1) {
|
||||||
|
|
||||||
#ifdef Libburn_no_crc_C
|
|
||||||
crc = 0; /* dummy */
|
|
||||||
#else
|
|
||||||
crc = crc_32(out, 2064);
|
crc = crc_32(out, 2064);
|
||||||
#endif
|
|
||||||
|
|
||||||
out[2064] = crc & 0xFF;
|
out[2064] = crc & 0xFF;
|
||||||
crc >>= 8;
|
crc >>= 8;
|
||||||
out[2065] = crc & 0xFF;
|
out[2065] = crc & 0xFF;
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __SECTOR
|
#ifndef __SECTOR
|
||||||
#define __SECTOR
|
#define __SECTOR
|
||||||
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright (c) 2009 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
This is the main operating system dependent SCSI part of libburn. It implements
|
This is the main operating system dependent SCSI part of libburn. It implements
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
This is the main operating system dependent SCSI part of libburn. It implements
|
This is the main operating system dependent SCSI part of libburn. It implements
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -29,18 +24,6 @@
|
|||||||
#include <sys/disk.h> /* DIOCGMEDIASIZE */
|
#include <sys/disk.h> /* DIOCGMEDIASIZE */
|
||||||
|
|
||||||
|
|
||||||
/* ts B00326 : For use of CAM_PASS_ERR_RECOVER with ahci */
|
|
||||||
#define Libburn_for_freebsd_ahcI yes
|
|
||||||
|
|
||||||
/* ts B00327 : for debugging of cam_send_cdb() failures
|
|
||||||
# define Libburn_ahci_verbouS yes
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* ts B00327 : Apply CAM_PASS_ERR_RECOVER to drives even if not ahci
|
|
||||||
# define libburn_ahci_style_for_alL yes
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "transport.h"
|
#include "transport.h"
|
||||||
#include "drive.h"
|
#include "drive.h"
|
||||||
#include "sg.h"
|
#include "sg.h"
|
||||||
@ -446,7 +429,6 @@ static void enumerate_common(char *fname, int bus_no, int host_no,
|
|||||||
|
|
||||||
out.cam = NULL;
|
out.cam = NULL;
|
||||||
out.lock_fd = -1;
|
out.lock_fd = -1;
|
||||||
out.is_ahci = 0;
|
|
||||||
|
|
||||||
out.start_lba= -2000000000;
|
out.start_lba= -2000000000;
|
||||||
out.end_lba= -2000000000;
|
out.end_lba= -2000000000;
|
||||||
@ -539,7 +521,6 @@ static void enumerate_common(char *fname, int bus_no, int host_no,
|
|||||||
/* Adapter specific handles and data */
|
/* Adapter specific handles and data */
|
||||||
out.cam = NULL;
|
out.cam = NULL;
|
||||||
out.lock_fd = -1;
|
out.lock_fd = -1;
|
||||||
out.is_ahci = 0;
|
|
||||||
|
|
||||||
/* Adapter specific functions */
|
/* Adapter specific functions */
|
||||||
out.grab = sg_grab;
|
out.grab = sg_grab;
|
||||||
@ -691,7 +672,6 @@ static int sg_lock(struct burn_drive *d, int flag)
|
|||||||
int sg_grab(struct burn_drive *d)
|
int sg_grab(struct burn_drive *d)
|
||||||
{
|
{
|
||||||
struct cam_device *cam;
|
struct cam_device *cam;
|
||||||
char path_string[80];
|
|
||||||
|
|
||||||
if (mmc_function_spy(d, "sg_grab") <= 0)
|
if (mmc_function_spy(d, "sg_grab") <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
@ -714,18 +694,6 @@ int sg_grab(struct burn_drive *d)
|
|||||||
if (sg_lock(d, 0) <= 0)
|
if (sg_lock(d, 0) <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
fcntl(cam->fd, F_SETOWN, getpid());
|
fcntl(cam->fd, F_SETOWN, getpid());
|
||||||
|
|
||||||
cam_path_string(d->cam, path_string, sizeof(path_string));
|
|
||||||
|
|
||||||
#ifdef Libburn_ahci_verbouS
|
|
||||||
fprintf(stderr, "libburn_EXPERIMENTAL: CAM path = %s\n", path_string);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (strstr(path_string, ":ahcich") != NULL)
|
|
||||||
d->is_ahci = 1;
|
|
||||||
else
|
|
||||||
d->is_ahci = -1;
|
|
||||||
|
|
||||||
d->released = 0;
|
d->released = 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -755,8 +723,7 @@ int sg_release(struct burn_drive *d)
|
|||||||
|
|
||||||
int sg_issue_command(struct burn_drive *d, struct command *c)
|
int sg_issue_command(struct burn_drive *d, struct command *c)
|
||||||
{
|
{
|
||||||
int done = 0, err, sense_len = 0, ret, ignore_error, no_retry = 0;
|
int done = 0, err, sense_len, ret;
|
||||||
int cam_pass_err_recover = 0;
|
|
||||||
union ccb *ccb;
|
union ccb *ccb;
|
||||||
char buf[161];
|
char buf[161];
|
||||||
static FILE *fp = NULL;
|
static FILE *fp = NULL;
|
||||||
@ -804,23 +771,6 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Libburn_for_freebsd_ahcI
|
|
||||||
/* ts B00325 : Advise by Alexander Motin */
|
|
||||||
/* Runs well on 8-STABLE (23 Mar 2003)
|
|
||||||
But on 8-RELEASE cam_send_ccb() returns non-zero with errno 6
|
|
||||||
on eject. Long lasting TEST UNIT READY cycles break with
|
|
||||||
errno 16.
|
|
||||||
*/
|
|
||||||
#ifdef Libburn_ahci_style_for_alL
|
|
||||||
{
|
|
||||||
#else
|
|
||||||
if (d->is_ahci > 0) {
|
|
||||||
#endif
|
|
||||||
ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER;
|
|
||||||
cam_pass_err_recover = 1;
|
|
||||||
}
|
|
||||||
#endif /* Libburn_for_freebsd_ahcI */
|
|
||||||
|
|
||||||
ccb->csio.cdb_len = c->oplen;
|
ccb->csio.cdb_len = c->oplen;
|
||||||
memcpy(&ccb->csio.cdb_io.cdb_bytes, &c->opcode, c->oplen);
|
memcpy(&ccb->csio.cdb_io.cdb_bytes, &c->opcode, c->oplen);
|
||||||
|
|
||||||
@ -851,74 +801,8 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
memset(c->sense, 0, sizeof(c->sense));
|
|
||||||
err = cam_send_ccb(d->cam, ccb);
|
err = cam_send_ccb(d->cam, ccb);
|
||||||
|
if (err == -1) {
|
||||||
ignore_error = sense_len = 0;
|
|
||||||
/* ts B00325 : CAM_AUTOSNS_VALID advised by Alexander Motin */
|
|
||||||
if (ccb->ccb_h.status & CAM_AUTOSNS_VALID) {
|
|
||||||
/* ts B00110 */
|
|
||||||
/* Better curb sense_len */
|
|
||||||
sense_len = ccb->csio.sense_len;
|
|
||||||
if (sense_len > sizeof(c->sense))
|
|
||||||
sense_len = sizeof(c->sense);
|
|
||||||
memcpy(c->sense, &ccb->csio.sense_data, sense_len);
|
|
||||||
if (sense_len >= 14 && cam_pass_err_recover &&
|
|
||||||
(c->sense[2] & 0x0f))
|
|
||||||
ignore_error = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (err == -1 && cam_pass_err_recover && ! ignore_error) {
|
|
||||||
|
|
||||||
#ifdef Libburn_ahci_verbouS
|
|
||||||
fprintf(stderr, "libburn_EXPERIMENTAL: errno = %d . cam_errbuf = '%s'\n", errno, cam_errbuf);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (errno == ENXIO && c->opcode[0] != 0) {
|
|
||||||
/* Operations on empty or ejected tray */
|
|
||||||
/* MEDIUM NOT PRESENT */
|
|
||||||
|
|
||||||
#ifdef Libburn_ahci_verbouS
|
|
||||||
fprintf(stderr, "libburn_EXPERIMENTAL: Emulating [2,3A,00] MEDIUM NOT PRESENT\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
c->sense[2] = 0x02;
|
|
||||||
c->sense[12] = 0x3A;
|
|
||||||
c->sense[13] = 0x00;
|
|
||||||
sense_len = 14;
|
|
||||||
ignore_error = 1;
|
|
||||||
} else if (c->opcode[0] == 0 &&
|
|
||||||
(errno == EBUSY || errno == ENXIO)) {
|
|
||||||
/* Timeout of TEST UNIT READY loop */
|
|
||||||
/* Inquiries while tray is being loaded */
|
|
||||||
/*LOGICAL UNIT NOT READY,CAUSE NOT REPORTABLE*/
|
|
||||||
|
|
||||||
#ifdef Libburn_ahci_verbouS
|
|
||||||
fprintf(stderr, "libburn_EXPERIMENTAL: Emulating [2,04,00] LOGICAL UNIT NOT READY,CAUSE NOT REPORTABLE\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
c->sense[2] = 0x02;
|
|
||||||
c->sense[12] = 0x04;
|
|
||||||
c->sense[13] = 0x00;
|
|
||||||
sense_len = 14;
|
|
||||||
ignore_error = 1;
|
|
||||||
} else if (errno == EINVAL) {
|
|
||||||
/* Inappropriate MODE SENSE */
|
|
||||||
/* INVALID FIELD IN CDB */
|
|
||||||
|
|
||||||
#ifdef Libburn_ahci_verbouS
|
|
||||||
fprintf(stderr, "libburn_EXPERIMENTAL: Emulating [5,24,00] INVALID FIELD IN CDB\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
c->sense[2] = 0x05;
|
|
||||||
c->sense[12] = 0x24;
|
|
||||||
c->sense[13] = 0x00;
|
|
||||||
sense_len = 14;
|
|
||||||
ignore_error = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (err == -1 && !ignore_error) {
|
|
||||||
libdax_msgs_submit(libdax_messenger,
|
libdax_msgs_submit(libdax_messenger,
|
||||||
d->global_index, 0x0002010c,
|
d->global_index, 0x0002010c,
|
||||||
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
|
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
|
||||||
@ -932,33 +816,20 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
|||||||
}
|
}
|
||||||
/* XXX */
|
/* XXX */
|
||||||
|
|
||||||
|
/* ts B00110 */
|
||||||
|
/* Better curb sense_len */
|
||||||
|
sense_len = ccb->csio.sense_len;
|
||||||
|
if (sense_len > sizeof(c->sense))
|
||||||
|
sense_len = sizeof(c->sense);
|
||||||
|
memcpy(c->sense, &ccb->csio.sense_data, ccb->csio.sense_len);
|
||||||
if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
|
if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
|
||||||
if (sense_len < 14) {
|
if (!c->retry) {
|
||||||
/*LOGICAL UNIT NOT READY,CAUSE NOT REPORTABLE*/
|
|
||||||
|
|
||||||
#ifdef Libburn_ahci_verbouS
|
|
||||||
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[2] = 0x02;
|
|
||||||
c->sense[12] = 0x04;
|
|
||||||
c->sense[13] = 0x00;
|
|
||||||
no_retry = 1;
|
|
||||||
}
|
|
||||||
if (no_retry || ignore_error || !c->retry) {
|
|
||||||
c->error = 1;
|
c->error = 1;
|
||||||
{ret = 1; goto ex;}
|
{ret = 1; goto ex;}
|
||||||
}
|
}
|
||||||
switch (scsi_error(d, c->sense, 0)) {
|
switch (scsi_error(d, c->sense, 0)) {
|
||||||
case RETRY:
|
case RETRY:
|
||||||
done = 0;
|
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;
|
break;
|
||||||
case FAIL:
|
case FAIL:
|
||||||
done = 1;
|
done = 1;
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright (c) 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
This is the main operating system dependent SCSI part of libburn. It implements
|
This is the main operating system dependent SCSI part of libburn. It implements
|
||||||
@ -553,7 +547,7 @@ int sg_release(struct burn_drive *d)
|
|||||||
*/
|
*/
|
||||||
int sg_issue_command(struct burn_drive *d, struct command *c)
|
int sg_issue_command(struct burn_drive *d, struct command *c)
|
||||||
{
|
{
|
||||||
int sense_valid = 0, i, usleep_time, timeout_ms, no_retry = 0;
|
int sense_valid = 0, i, usleep_time, timeout_ms;
|
||||||
time_t start_time;
|
time_t start_time;
|
||||||
driver_return_code_t i_status;
|
driver_return_code_t i_status;
|
||||||
unsigned int dxfer_len;
|
unsigned int dxfer_len;
|
||||||
@ -568,15 +562,15 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
p_cdio = (CdIo_t *) d->p_cdio;
|
p_cdio = (CdIo_t *) d->p_cdio;
|
||||||
if (burn_sg_log_scsi & 1) {
|
if (burn_sg_log_scsi & 1) {
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
fp= fopen("/tmp/libburn_sg_command_log", "a");
|
fp= fopen("/tmp/libburn_sg_command_log", "a");
|
||||||
fprintf(fp,
|
fprintf(fp,
|
||||||
"\n-----------------------------------------\n");
|
"\n-----------------------------------------\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (burn_sg_log_scsi & 3)
|
if (burn_sg_log_scsi & 3)
|
||||||
scsi_log_cmd(c,fp,0);
|
scsi_log_cmd(c,fp,0);
|
||||||
|
|
||||||
memcpy(cdb.field, c->opcode, c->oplen);
|
memcpy(cdb.field, c->opcode, c->oplen);
|
||||||
if (c->dir == TO_DRIVE) {
|
if (c->dir == TO_DRIVE) {
|
||||||
@ -628,35 +622,24 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ((!sense_valid) ||
|
if (!sense_valid) {
|
||||||
((c->sense[2] & 0x0f) == 0 && c->sense[12] == 0 &&
|
|
||||||
c->sense[13] == 0)) {
|
|
||||||
memset(c->sense, 0, sizeof(c->sense));
|
memset(c->sense, 0, sizeof(c->sense));
|
||||||
if (i_status != 0) { /* set dummy sense */
|
if (i_status != 0) { /* set dummy sense */
|
||||||
/*LOGICAL UNIT NOT READY,
|
/*LOGICAL UNIT NOT READY,CAUSE NOT REPORTABLE*/
|
||||||
CAUSE NOT REPORTABLE*/
|
|
||||||
c->sense[2] = 0x02;
|
c->sense[2] = 0x02;
|
||||||
c->sense[12] = 0x04;
|
c->sense[12] = 0x04;
|
||||||
no_retry = 1;
|
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
c->sense[2] &= 15;
|
c->sense[2] &= 15;
|
||||||
|
|
||||||
if (i_status != 0 ||
|
if (i_status != 0 ||
|
||||||
(c->sense[2] || c->sense[12] || c->sense[13])) {
|
(c->sense[2] || c->sense[12] || c->sense[13])) {
|
||||||
if (no_retry || !c->retry) {
|
if (!c->retry) {
|
||||||
c->error = 1;
|
c->error = 1;
|
||||||
goto ex;
|
goto ex;
|
||||||
}
|
}
|
||||||
switch (scsi_error(d, c->sense, 18)) {
|
switch (scsi_error(d, c->sense, 18)) {
|
||||||
case RETRY:
|
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;
|
break;
|
||||||
case FAIL:
|
case FAIL:
|
||||||
c->error = 1;
|
c->error = 1;
|
||||||
@ -851,7 +834,7 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
|
|||||||
|
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
|
|
||||||
/* GNU/Linux specific determination of block device size */
|
/* Linux specific determination of block device size */
|
||||||
} else if(S_ISBLK(stbuf.st_mode)) {
|
} else if(S_ISBLK(stbuf.st_mode)) {
|
||||||
int open_mode = O_RDONLY, fd, ret;
|
int open_mode = O_RDONLY, fd, ret;
|
||||||
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* <<< ts A91112 : experiments to get better speed with USB
|
/* <<< ts A91112 : experiments to get better speed with USB
|
||||||
#define Libburn_sgio_as_growisofS 1
|
#define Libburn_sgio_as_growisofS 1
|
||||||
@ -17,7 +11,7 @@
|
|||||||
This is the main operating system dependent SCSI part of libburn. It implements
|
This is the main operating system dependent SCSI part of libburn. It implements
|
||||||
the transport level aspects of SCSI control and command i/o.
|
the transport level aspects of SCSI control and command i/o.
|
||||||
|
|
||||||
Present implementation: GNU/Linux SCSI Generic (sg)
|
Present implementation: Linux SCSI Generic (sg)
|
||||||
|
|
||||||
|
|
||||||
PORTING:
|
PORTING:
|
||||||
@ -899,7 +893,7 @@ static int is_scsi_drive(char *fname, int *bus_no, int *host_no,
|
|||||||
#endif /* Libburn_drive_new_deaL */
|
#endif /* Libburn_drive_new_deaL */
|
||||||
|
|
||||||
|
|
||||||
/** Speciality of GNU/Linux: detect non-SCSI ATAPI (EIDE) which will from
|
/** Speciality of Linux: detect non-SCSI ATAPI (EIDE) which will from
|
||||||
then on used used via generic SCSI as is done with (emulated) SCSI drives */
|
then on used used via generic SCSI as is done with (emulated) SCSI drives */
|
||||||
static void ata_enumerate(void)
|
static void ata_enumerate(void)
|
||||||
{
|
{
|
||||||
@ -1408,7 +1402,7 @@ static void enumerate_common(char *fname, int bus_no, int host_no,
|
|||||||
|
|
||||||
/* PORTING: ------------------- non portable part --------------- */
|
/* PORTING: ------------------- non portable part --------------- */
|
||||||
|
|
||||||
/* Operating system adapter is GNU/Linux Generic SCSI (sg) */
|
/* Operating system adapter is Linux Generic SCSI (sg) */
|
||||||
/* Adapter specific handles and data */
|
/* Adapter specific handles and data */
|
||||||
out.fd = -1337;
|
out.fd = -1337;
|
||||||
out.sibling_count = 0;
|
out.sibling_count = 0;
|
||||||
@ -1445,7 +1439,7 @@ static void enumerate_common(char *fname, int bus_no, int host_no,
|
|||||||
*/
|
*/
|
||||||
int sg_id_string(char msg[1024], int flag)
|
int sg_id_string(char msg[1024], int flag)
|
||||||
{
|
{
|
||||||
strcpy(msg, "internal GNU/Linux SG_IO adapter sg-linux");
|
strcpy(msg, "internal Linux SG_IO adapter sg-linux");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1490,7 +1484,7 @@ int sg_dispose_drive(struct burn_drive *d, int flag)
|
|||||||
|
|
||||||
|
|
||||||
/** PORTING:
|
/** PORTING:
|
||||||
In this GNU/Linux implementation, this function mirrors the enumeration
|
In this Linux implementation, this function mirrors the enumeration
|
||||||
done in sg_enumerate and ata_enumerate(). It would be better to base those
|
done in sg_enumerate and ata_enumerate(). It would be better to base those
|
||||||
functions on this sg_give_next_adr() but the situation is not inviting.
|
functions on this sg_give_next_adr() but the situation is not inviting.
|
||||||
*/
|
*/
|
||||||
@ -1587,7 +1581,7 @@ return_1_pre_proc:;
|
|||||||
libburn's list of drives.
|
libburn's list of drives.
|
||||||
*/
|
*/
|
||||||
/** PORTING:
|
/** PORTING:
|
||||||
If not stricken with an incompletely unified situation like in GNU/Linux
|
If not stricken with an incompletely unified situation like in Linux
|
||||||
one would rather implement this by a loop calling sg_give_next_adr().
|
one would rather implement this by a loop calling sg_give_next_adr().
|
||||||
If needed with your sg_give_next_adr() results, do a test for existence
|
If needed with your sg_give_next_adr() results, do a test for existence
|
||||||
and accessability. If burn activities are prone to external interference
|
and accessability. If burn activities are prone to external interference
|
||||||
@ -1651,7 +1645,6 @@ int sg_drive_is_open(struct burn_drive * d)
|
|||||||
int sg_grab(struct burn_drive *d)
|
int sg_grab(struct burn_drive *d)
|
||||||
{
|
{
|
||||||
int fd, os_errno= 0, ret;
|
int fd, os_errno= 0, ret;
|
||||||
int max_tries = 3, tries = 0;
|
|
||||||
|
|
||||||
/* ts A60813 */
|
/* ts A60813 */
|
||||||
int open_mode = O_RDWR;
|
int open_mode = O_RDWR;
|
||||||
@ -1685,7 +1678,6 @@ int sg_grab(struct burn_drive *d)
|
|||||||
value -1 of open(2) war used. */
|
value -1 of open(2) war used. */
|
||||||
if(! burn_drive_is_open(d)) {
|
if(! burn_drive_is_open(d)) {
|
||||||
|
|
||||||
try_open:;
|
|
||||||
/* ts A60821
|
/* ts A60821
|
||||||
<<< debug: for tracing calls which might use open drive fds */
|
<<< debug: for tracing calls which might use open drive fds */
|
||||||
mmc_function_spy(NULL, "sg_grab ----------- opening");
|
mmc_function_spy(NULL, "sg_grab ----------- opening");
|
||||||
@ -1719,19 +1711,13 @@ try_open:;
|
|||||||
fcntl(fd, F_SETOWN, getpid());
|
fcntl(fd, F_SETOWN, getpid());
|
||||||
d->released = 0;
|
d->released = 0;
|
||||||
return 1;
|
return 1;
|
||||||
} else if (errno == EBUSY)
|
}
|
||||||
goto drive_is_in_use;
|
|
||||||
libdax_msgs_submit(libdax_messenger, d->global_index, 0x00020003,
|
libdax_msgs_submit(libdax_messenger, d->global_index, 0x00020003,
|
||||||
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||||
"Could not grab drive", os_errno, 0);
|
"Could not grab drive", os_errno, 0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
drive_is_in_use:;
|
drive_is_in_use:;
|
||||||
tries++;
|
|
||||||
if (tries < max_tries) {
|
|
||||||
usleep(2000000);
|
|
||||||
goto try_open;
|
|
||||||
}
|
|
||||||
libdax_msgs_submit(libdax_messenger, d->global_index,
|
libdax_msgs_submit(libdax_messenger, d->global_index,
|
||||||
0x00020003,
|
0x00020003,
|
||||||
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||||
@ -1928,11 +1914,6 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
|||||||
switch (scsi_error(d, s.sbp, s.sb_len_wr)) {
|
switch (scsi_error(d, s.sbp, s.sb_len_wr)) {
|
||||||
case RETRY:
|
case RETRY:
|
||||||
done = 0;
|
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;
|
break;
|
||||||
case FAIL:
|
case FAIL:
|
||||||
done = 1;
|
done = 1;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* sg.c
|
/* sg.c
|
||||||
Switcher for operating system dependent transport level modules of libburn.
|
Switcher for operating system dependent transport level modules of libburn.
|
||||||
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPLv2+
|
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -34,11 +34,11 @@
|
|||||||
static int intentional_compiler_warning(void)
|
static int intentional_compiler_warning(void)
|
||||||
{
|
{
|
||||||
int INTENTIONAL_COMPILER_WARNING_;
|
int INTENTIONAL_COMPILER_WARNING_;
|
||||||
int Cannot_recognize_GNU_Linux_nor_FreeBSD_;
|
int Cannot_recognize_Linux_nor_FreeBSD_;
|
||||||
int Have_to_use_dummy_MMC_transport_adapter_;
|
int Have_to_use_dummy_MMC_transport_adapter_;
|
||||||
int This_libburn_will_not_be_able_to_operate_on_real_CD_drives;
|
int This_libburn_will_not_be_able_to_operate_on_real_CD_drives;
|
||||||
int Have_to_use_dummy_MMC_transport_adapter;
|
int Have_to_use_dummy_MMC_transport_adapter;
|
||||||
int Cannot_recognize_GNU_Linux_nor_FreeBSD;
|
int Cannot_recognize_Linux_nor_FreeBSD;
|
||||||
int INTENTIONAL_COMPILER_WARNING;
|
int INTENTIONAL_COMPILER_WARNING;
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPLv2+
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __SG
|
#ifndef __SG
|
||||||
#define __SG
|
#define __SG
|
||||||
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "libburn.h"
|
#include "libburn.h"
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* scsi primary commands */
|
/* scsi primary commands */
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -113,8 +107,7 @@ int spc_test_unit_ready(struct burn_drive *d)
|
|||||||
int spc_wait_unit_attention(struct burn_drive *d, int max_sec, char *cmd_text,
|
int spc_wait_unit_attention(struct burn_drive *d, int max_sec, char *cmd_text,
|
||||||
int flag)
|
int flag)
|
||||||
{
|
{
|
||||||
int i, ret = 1, key = 0, asc = 0, ascq = 0, clueless_start = 0;
|
int i, ret = 1, key = 0, asc = 0, ascq = 0;
|
||||||
static int clueless_timeout = 5 * 10;
|
|
||||||
char msg[320];
|
char msg[320];
|
||||||
unsigned char sense[14];
|
unsigned char sense[14];
|
||||||
enum response resp;
|
enum response resp;
|
||||||
@ -144,7 +137,6 @@ int spc_wait_unit_attention(struct burn_drive *d, int max_sec, char *cmd_text,
|
|||||||
/* media change notice = try again */
|
/* media change notice = try again */
|
||||||
goto slumber;
|
goto slumber;
|
||||||
|
|
||||||
handle_error:;
|
|
||||||
/* ts A90213 */
|
/* ts A90213 */
|
||||||
sprintf(msg,
|
sprintf(msg,
|
||||||
"Asynchronous SCSI error on %s: ", cmd_text);
|
"Asynchronous SCSI error on %s: ", cmd_text);
|
||||||
@ -159,23 +151,7 @@ handle_error:;
|
|||||||
msg, 0, 0);
|
msg, 0, 0);
|
||||||
d->cancel = 1;
|
d->cancel = 1;
|
||||||
break;
|
break;
|
||||||
} else if (ascq == 0x00) { /* CAUSE NOT REPORTABLE */
|
}
|
||||||
/* Might be a clueless system adapter */
|
|
||||||
if (clueless_start == 0)
|
|
||||||
clueless_start = i;
|
|
||||||
if (i - clueless_start > clueless_timeout) {
|
|
||||||
libdax_msgs_submit(libdax_messenger,
|
|
||||||
d->global_index,
|
|
||||||
0x00000002,
|
|
||||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
|
|
||||||
"Ended clueless NOT READY cycle",
|
|
||||||
0, 0);
|
|
||||||
ret = 1; /* medium not present = ok */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else if (ascq == 0x02 || ascq == 0x03)
|
|
||||||
goto handle_error;
|
|
||||||
|
|
||||||
slumber:;
|
slumber:;
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
}
|
}
|
||||||
@ -979,13 +955,13 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
|
|||||||
*key= *asc= *ascq= -1;
|
*key= *asc= *ascq= -1;
|
||||||
|
|
||||||
if (senselen<=0 || senselen>2)
|
if (senselen<=0 || senselen>2)
|
||||||
*key = sense[2] & 0x0f;
|
*key = sense[2];
|
||||||
if (senselen<=0 || senselen>12)
|
if (senselen<=0 || senselen>12)
|
||||||
*asc = sense[12];
|
*asc = sense[12];
|
||||||
if (senselen<=0 || senselen>13)
|
if (senselen<=0 || senselen>13)
|
||||||
*ascq = sense[13];
|
*ascq = sense[13];
|
||||||
|
|
||||||
sprintf(msg, "[%X %2.2X %2.2X] ", *key, *asc, *ascq);
|
sprintf(msg, "[%X %2.2X %2.2X] ", (*key) & 0xf, *asc, *ascq);
|
||||||
msg= msg + strlen(msg);
|
msg= msg + strlen(msg);
|
||||||
|
|
||||||
burn_print(12, "CONDITION: 0x%x 0x%x 0x%x on %s %s\n",
|
burn_print(12, "CONDITION: 0x%x 0x%x 0x%x on %s %s\n",
|
||||||
@ -1000,11 +976,8 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
|
|||||||
sprintf(msg, "Not ready");
|
sprintf(msg, "Not ready");
|
||||||
return RETRY;
|
return RETRY;
|
||||||
case 0x04:
|
case 0x04:
|
||||||
if (*ascq == 1)
|
sprintf(msg,
|
||||||
sprintf(msg,
|
|
||||||
"Logical unit is in the process of becoming ready");
|
"Logical unit is in the process of becoming ready");
|
||||||
else
|
|
||||||
sprintf(msg, "Logical unit is not ready");
|
|
||||||
return RETRY;
|
return RETRY;
|
||||||
case 0x08:
|
case 0x08:
|
||||||
if (*key != 4)
|
if (*key != 4)
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __SPC
|
#ifndef __SPC
|
||||||
#define __SPC
|
#define __SPC
|
||||||
|
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* ts A61008 */
|
/* ts A61008 */
|
||||||
/* #include <a ssert.h> */
|
/* #include <a ssert.h> */
|
||||||
|
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BURN__STRUCTURE_H
|
#ifndef BURN__STRUCTURE_H
|
||||||
#define BURN__STRUCTURE_H
|
#define BURN__STRUCTURE_H
|
||||||
|
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/* ts A61008 */
|
/* ts A61008 */
|
||||||
/* #include <a ssert.h> */
|
/* #include <a ssert.h> */
|
||||||
|
|
||||||
@ -135,7 +130,7 @@ void toc_find_modes(struct burn_drive *d)
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
t->mode = BURN_MODE1;
|
t->mode = BURN_MODE1;
|
||||||
/* ts A70519 : this does not work with GNU/Linux 2.4 USB because one cannot
|
/* ts A70519 : this does not work with Linux 2.4 USB because one cannot
|
||||||
predict the exact dxfer_size without knowing the sector type.
|
predict the exact dxfer_size without knowing the sector type.
|
||||||
mem.sectors = 1;
|
mem.sectors = 1;
|
||||||
d->read_sectors(d, lba, mem.sectors, &o, &mem);
|
d->read_sectors(d, lba, mem.sectors, &o, &mem);
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __TOC_H
|
#ifndef __TOC_H
|
||||||
#define __TOC_H
|
#define __TOC_H
|
||||||
|
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __TRANSPORT
|
#ifndef __TRANSPORT
|
||||||
#define __TRANSPORT
|
#define __TRANSPORT
|
||||||
|
|
||||||
@ -312,8 +306,6 @@ struct burn_drive
|
|||||||
/* ts A70929 */
|
/* ts A70929 */
|
||||||
pid_t thread_pid;
|
pid_t thread_pid;
|
||||||
int thread_pid_valid;
|
int thread_pid_valid;
|
||||||
/* ts B00225 */
|
|
||||||
pthread_t thread_tid;
|
|
||||||
|
|
||||||
|
|
||||||
/* transport functions */
|
/* transport functions */
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* ts A61008 */
|
/* ts A61008 */
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
@ -39,6 +33,7 @@
|
|||||||
#include "libburn.h"
|
#include "libburn.h"
|
||||||
#include "drive.h"
|
#include "drive.h"
|
||||||
#include "transport.h"
|
#include "transport.h"
|
||||||
|
#include "crc.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "toc.h"
|
#include "toc.h"
|
||||||
@ -942,8 +937,6 @@ int burn_disc_init_write_status(struct burn_write_opts *o,
|
|||||||
|
|
||||||
d->cancel = 0;
|
d->cancel = 0;
|
||||||
|
|
||||||
#ifdef Libburn_reset_progress_asynC
|
|
||||||
/* <<< This is now done in async.c */
|
|
||||||
/* init progress before showing the state */
|
/* init progress before showing the state */
|
||||||
d->progress.session = 0;
|
d->progress.session = 0;
|
||||||
d->progress.sessions = disc->sessions;
|
d->progress.sessions = disc->sessions;
|
||||||
@ -958,7 +951,6 @@ int burn_disc_init_write_status(struct burn_write_opts *o,
|
|||||||
d->progress.sectors = 0;
|
d->progress.sectors = 0;
|
||||||
d->progress.sector = 0;
|
d->progress.sector = 0;
|
||||||
d->progress.track = 0;
|
d->progress.track = 0;
|
||||||
#endif /* Libburn_reset_progress_asynC */
|
|
||||||
|
|
||||||
/* ts A61023 */
|
/* ts A61023 */
|
||||||
d->progress.buffer_capacity = 0;
|
d->progress.buffer_capacity = 0;
|
||||||
@ -1271,8 +1263,8 @@ int burn_disc_close_track_dvd_plus_r(struct burn_write_opts *o,
|
|||||||
|
|
||||||
/* ts A91114 : EXPERIMENTAL, NOT COMPLETELY IMPLEMENTED
|
/* ts A91114 : EXPERIMENTAL, NOT COMPLETELY IMPLEMENTED
|
||||||
|
|
||||||
Simplified data transmission for DVD. libburn via GNU/Linux USB is 30 %
|
Simplified data transmission for DVD. libburn via Linux USB is 30 % slower
|
||||||
slower than growisofs or cdrecord when transmitting 32 KB chunks.
|
than growisofs or cdrecord when transmitting 32 KB chunks.
|
||||||
With 64 KB chunks it is 20% faster than the competitors.
|
With 64 KB chunks it is 20% faster than the competitors.
|
||||||
No heavy CPU load is visible but there might be subtle race conditions in
|
No heavy CPU load is visible but there might be subtle race conditions in
|
||||||
the USB driver which work better with shorter time gaps between WRITE
|
the USB driver which work better with shorter time gaps between WRITE
|
||||||
@ -1312,7 +1304,7 @@ static int transact_dvd_chunk(struct burn_write_opts *opts,
|
|||||||
unsigned char *data = out->data;
|
unsigned char *data = out->data;
|
||||||
|
|
||||||
#ifdef Libburn_log_in_and_out_streaM
|
#ifdef Libburn_log_in_and_out_streaM
|
||||||
/* ts A61031 */
|
/* <<< ts A61031 */
|
||||||
static int tee_fd= -1;
|
static int tee_fd= -1;
|
||||||
if(tee_fd==-1)
|
if(tee_fd==-1)
|
||||||
tee_fd= open("/tmp/libburn_sg_readin",
|
tee_fd= open("/tmp/libburn_sg_readin",
|
||||||
@ -2002,7 +1994,7 @@ ex:;
|
|||||||
burn_drive_mark_unready(d);
|
burn_drive_mark_unready(d);
|
||||||
burn_drive_inquire_media(d);
|
burn_drive_inquire_media(d);
|
||||||
|
|
||||||
/* <<< d->busy = BURN_DRIVE_IDLE; */
|
d->busy = BURN_DRIVE_IDLE;
|
||||||
return ret;
|
return ret;
|
||||||
early_failure:;
|
early_failure:;
|
||||||
return 0;
|
return 0;
|
||||||
@ -2265,9 +2257,8 @@ int burn_stdio_write_track(struct burn_write_opts *o, struct burn_session *s,
|
|||||||
prev_sync_sector = d->progress.sector;
|
prev_sync_sector = d->progress.sector;
|
||||||
if (!o->simulate)
|
if (!o->simulate)
|
||||||
burn_stdio_sync_cache(d->stdio_fd, d, 1);
|
burn_stdio_sync_cache(d->stdio_fd, d, 1);
|
||||||
}
|
|
||||||
if ((d->progress.sector % 512) == 0)
|
|
||||||
burn_stdio_slowdown(d, &prev_time, 512 * 2, 0);
|
burn_stdio_slowdown(d, &prev_time, 512 * 2, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Pad up buffer to next full o->obs (usually 32 kB) */
|
/* Pad up buffer to next full o->obs (usually 32 kB) */
|
||||||
@ -2330,7 +2321,7 @@ ex:;
|
|||||||
/* update media state records */
|
/* update media state records */
|
||||||
burn_drive_mark_unready(d);
|
burn_drive_mark_unready(d);
|
||||||
|
|
||||||
/* <<< d->busy = BURN_DRIVE_IDLE; */
|
d->busy = BURN_DRIVE_IDLE;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2406,7 +2397,7 @@ calloc() seems not to have the desired effect. valgrind warns:
|
|||||||
goto ex;
|
goto ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ts A70521 : GNU/Linux 2.4 USB audio fails with 64 kiB */
|
/* ts A70521 : Linux 2.4 USB audio fails with 64 kiB */
|
||||||
/* ts A80414 : might need 64 kiB for BD-RE streaming */
|
/* ts A80414 : might need 64 kiB for BD-RE streaming */
|
||||||
/* buffer flush trigger for sector.c:get_sector() */
|
/* buffer flush trigger for sector.c:get_sector() */
|
||||||
o->obs = Libburn_cd_obS;
|
o->obs = Libburn_cd_obS;
|
||||||
@ -2567,7 +2558,7 @@ return crap. so we send the command, then ignore the result.
|
|||||||
burn_drive_inquire_media(d);
|
burn_drive_inquire_media(d);
|
||||||
|
|
||||||
burn_print(1, "done\n");
|
burn_print(1, "done\n");
|
||||||
/* <<< d->busy = BURN_DRIVE_IDLE; */
|
d->busy = BURN_DRIVE_IDLE;
|
||||||
|
|
||||||
/* ts A61012 : This return was traditionally missing. I suspect this
|
/* ts A61012 : This return was traditionally missing. I suspect this
|
||||||
to have caused Cdrskin_eject() failures */
|
to have caused Cdrskin_eject() failures */
|
||||||
@ -2582,7 +2573,7 @@ fail_wo_sync:;
|
|||||||
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
|
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
|
||||||
"Burn run failed", 0, 0);
|
"Burn run failed", 0, 0);
|
||||||
d->cancel = 1;
|
d->cancel = 1;
|
||||||
/* <<< d->busy = BURN_DRIVE_IDLE; */
|
d->busy = BURN_DRIVE_IDLE;
|
||||||
ex:;
|
ex:;
|
||||||
d->do_stream_recording = 0;
|
d->do_stream_recording = 0;
|
||||||
if (d->buffer != NULL)
|
if (d->buffer != NULL)
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||||
|
|
||||||
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
|
|
||||||
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
|
|
||||||
Provided under GPL version 2 or later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef BURN__WRITE_H
|
#ifndef BURN__WRITE_H
|
||||||
#define BURN__WRITE_H
|
#define BURN__WRITE_H
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
approaches are shown here in application functions:
|
approaches are shown here in application functions:
|
||||||
libburner_aquire_by_adr() demonstrates usage as of cdrecord traditions
|
libburner_aquire_by_adr() demonstrates usage as of cdrecord traditions
|
||||||
libburner_aquire_by_driveno() demonstrates a scan-and-choose approach
|
libburner_aquire_by_driveno() demonstrates a scan-and-choose approach
|
||||||
With that aquired drive you can blank a CD-RW or DVD-RW
|
With that aquired drive you can blank a CD-RW
|
||||||
libburner_blank_disc()
|
libburner_blank_disc()
|
||||||
or you can format a DVD-RW to profile "Restricted Overwrite" (needed once)
|
or you can format a DVD-RW to profile "Restricted Overwrite" (needed once)
|
||||||
or an unused BD to default size with spare blocks
|
or an unused BD to default size with spare blocks
|
||||||
@ -36,15 +36,9 @@
|
|||||||
When everything is done, main() releases the drive and shuts down libburn:
|
When everything is done, main() releases the drive and shuts down libburn:
|
||||||
burn_drive_release();
|
burn_drive_release();
|
||||||
burn_finish()
|
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
|
Applications must use 64 bit off_t. E.g. by defining
|
||||||
#define _LARGEFILE_SOURCE
|
#define _LARGEFILE_SOURCE
|
||||||
#define _FILE_OFFSET_BITS 64
|
#define _FILE_OFFSET_BITS 64
|
||||||
@ -316,12 +310,9 @@ int libburner_blank_disc(struct burn_drive *drive, int blank_fast)
|
|||||||
"FATAL : Media is not of erasable type\n");
|
"FATAL : Media is not of erasable type\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/* Switch to asynchronous signal handling for the time of waiting */
|
printf(
|
||||||
burn_set_signal_handling("libburner : ", NULL, 0x30);
|
"Beginning to %s-blank media.\n", (blank_fast?"fast":"full"));
|
||||||
|
|
||||||
printf("Beginning to %s-blank media.\n", (blank_fast?"fast":"full"));
|
|
||||||
burn_disc_erase(drive, blank_fast);
|
burn_disc_erase(drive, blank_fast);
|
||||||
|
|
||||||
sleep(1);
|
sleep(1);
|
||||||
while (burn_drive_get_status(drive, &p) != BURN_DRIVE_IDLE) {
|
while (burn_drive_get_status(drive, &p) != BURN_DRIVE_IDLE) {
|
||||||
if(p.sectors>0 && p.sector>=0) /* display 1 to 99 percent */
|
if(p.sectors>0 && p.sector>=0) /* display 1 to 99 percent */
|
||||||
@ -330,10 +321,6 @@ int libburner_blank_disc(struct burn_drive *drive, int blank_fast)
|
|||||||
printf("Blanking ( %.1f%% done )\n", percent);
|
printf("Blanking ( %.1f%% done )\n", percent);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
if (burn_is_aborting(0) > 0)
|
|
||||||
return -1;
|
|
||||||
/* Back to synchronous handling */
|
|
||||||
burn_set_signal_handling("libburner : ", NULL, 0);
|
|
||||||
printf("Done\n");
|
printf("Done\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -386,7 +373,6 @@ int libburner_format(struct burn_drive *drive)
|
|||||||
fprintf(stderr, "FATAL: Can only format DVD-RW or BD\n");
|
fprintf(stderr, "FATAL: Can only format DVD-RW or BD\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
burn_set_signal_handling("libburner : ", NULL, 0x30);
|
|
||||||
|
|
||||||
printf("Beginning to format media.\n");
|
printf("Beginning to format media.\n");
|
||||||
burn_disc_format(drive, size, format_flag);
|
burn_disc_format(drive, size, format_flag);
|
||||||
@ -399,9 +385,6 @@ int libburner_format(struct burn_drive *drive)
|
|||||||
printf("Formatting ( %.1f%% done )\n", percent);
|
printf("Formatting ( %.1f%% done )\n", percent);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
if (burn_is_aborting(0) > 0)
|
|
||||||
return -1;
|
|
||||||
burn_set_signal_handling("libburner : ", NULL, 0);
|
|
||||||
burn_disc_get_profile(drive_list[0].drive, ¤t_profile,
|
burn_disc_get_profile(drive_list[0].drive, ¤t_profile,
|
||||||
current_profile_name);
|
current_profile_name);
|
||||||
if (current_profile == 0x14 || current_profile == 0x13)
|
if (current_profile == 0x14 || current_profile == 0x13)
|
||||||
@ -547,7 +530,6 @@ int libburner_payload(struct burn_drive *drive,
|
|||||||
fprintf(stderr, "Reasons given:\n%s\n", reasons);
|
fprintf(stderr, "Reasons given:\n%s\n", reasons);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
burn_set_signal_handling("libburner : ", NULL, 0x30);
|
|
||||||
|
|
||||||
printf("Burning starts. With e.g. 4x media expect up to a minute of zero progress.\n");
|
printf("Burning starts. With e.g. 4x media expect up to a minute of zero progress.\n");
|
||||||
start_time = time(0);
|
start_time = time(0);
|
||||||
@ -595,8 +577,6 @@ int libburner_payload(struct burn_drive *drive,
|
|||||||
}
|
}
|
||||||
burn_session_free(session);
|
burn_session_free(session);
|
||||||
burn_disc_free(target_disc);
|
burn_disc_free(target_disc);
|
||||||
if (burn_is_aborting(0) > 0)
|
|
||||||
return -1;
|
|
||||||
if (multi && current_profile != 0x1a && current_profile != 0x13 &&
|
if (multi && current_profile != 0x1a && current_profile != 0x13 &&
|
||||||
current_profile != 0x12 && current_profile != 0x43)
|
current_profile != 0x12 && current_profile != 0x43)
|
||||||
/* not with DVD+RW, formatted DVD-RW, DVD-RAM, BD-RE */
|
/* not with DVD+RW, formatted DVD-RW, DVD-RAM, BD-RE */
|
||||||
@ -732,13 +712,6 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* A warning to programmers who start their own projekt from here. */
|
|
||||||
if (sizeof(off_t) != 8) {
|
|
||||||
fprintf(stderr,
|
|
||||||
"\nFATAL: Compile time misconfiguration. off_t is not 64 bit.\n\n");
|
|
||||||
exit(39);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = libburner_setup(argc, argv);
|
ret = libburner_setup(argc, argv);
|
||||||
if (ret)
|
if (ret)
|
||||||
exit(ret);
|
exit(ret);
|
||||||
@ -755,7 +728,7 @@ int main(int argc, char **argv)
|
|||||||
/* Print messages of severity SORRY or more directly to stderr */
|
/* Print messages of severity SORRY or more directly to stderr */
|
||||||
burn_msgs_set_severities("NEVER", "SORRY", "libburner : ");
|
burn_msgs_set_severities("NEVER", "SORRY", "libburner : ");
|
||||||
|
|
||||||
/* Activate the synchronous signal handler which eventually will try to
|
/* Activate the default signal handler which eventually will try to
|
||||||
properly shutdown drive and library on aborting events. */
|
properly shutdown drive and library on aborting events. */
|
||||||
burn_set_signal_handling("libburner : ", NULL, 0);
|
burn_set_signal_handling("libburner : ", NULL, 0);
|
||||||
|
|
||||||
@ -789,14 +762,10 @@ release_drive:;
|
|||||||
burn_drive_release(drive_list[driveno].drive, 0);
|
burn_drive_release(drive_list[driveno].drive, 0);
|
||||||
|
|
||||||
finish_libburn:;
|
finish_libburn:;
|
||||||
if (burn_is_aborting(0) > 0) {
|
|
||||||
burn_abort(4400, burn_abort_pacifier, "libburner : ");
|
|
||||||
fprintf(stderr,"\nlibburner run aborted\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
/* This app does not bother to know about exact scan state.
|
/* This app does not bother to know about exact scan state.
|
||||||
Better to accept a memory leak here. We are done anyway. */
|
Better to accept a memory leak here. We are done anyway. */
|
||||||
/* burn_drive_info_free(drive_list); */
|
/* burn_drive_info_free(drive_list); */
|
||||||
|
|
||||||
burn_finish();
|
burn_finish();
|
||||||
exit(ret);
|
exit(ret);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user