Codebase list libburn / 18991d5
Import Upstream version 0.7.0 Dominique Dumont 6 years ago
28 changed file(s) with 2012 addition(s) and 946 deletion(s). Raw diff Collapse all Expand all
0 pkgconfigdir=$(libdir)/pkgconfig
0
1 # ts A90315 : LIBBURNIA_PKGCONFDIR is defined OS specific in acinclude.m4
2 # was: pkgconfigdir=$(libdir)/pkgconfig
3 pkgconfigdir=$(LIBBURNIA_PKGCONFDIR)
4
15 libincludedir=$(includedir)/libburn
26
37 lib_LTLIBRARIES = libburn/libburn.la
102106 test_structest_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
103107 test_structest_SOURCES = test/structest.c
104108
105 ## cdrskin construction site - ts A60816 - A90313
109 ## cdrskin construction site - ts A60816 - A90507
106110 cdrskin_cdrskin_CPPFLAGS = -Ilibburn
107 cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_6_4
111 cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_7_0
108112
109113 # cdrskin_cdrskin_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
110114 # ts A80123, change proposed by Simon Huggins to cause dynamic libburn linking
204204 INSTALL_SCRIPT = @INSTALL_SCRIPT@
205205 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
206206 LDFLAGS = @LDFLAGS@
207 LIBBURNIA_PKGCONFDIR = @LIBBURNIA_PKGCONFDIR@
207208 LIBBURN_ARCH_LIBS = @LIBBURN_ARCH_LIBS@
208209 LIBOBJS = @LIBOBJS@
209210 LIBS = @LIBS@
285286 target_cpu = @target_cpu@
286287 target_os = @target_os@
287288 target_vendor = @target_vendor@
288 pkgconfigdir = $(libdir)/pkgconfig
289
290 # ts A90315 : LIBBURNIA_PKGCONFDIR is defined OS specific in acinclude.m4
291 # was: pkgconfigdir=$(libdir)/pkgconfig
292 pkgconfigdir = $(LIBBURNIA_PKGCONFDIR)
289293 libincludedir = $(includedir)/libburn
290294 lib_LTLIBRARIES = libburn/libburn.la
291295
371375 test_structest_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
372376 test_structest_SOURCES = test/structest.c
373377 cdrskin_cdrskin_CPPFLAGS = -Ilibburn
374 cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_6_4
378 cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_7_0
375379
376380 # cdrskin_cdrskin_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
377381 # ts A80123, change proposed by Simon Huggins to cause dynamic libburn linking
1010 and Ben Jansens <xor@orodu.net>
1111 Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
1212
13 http://files.libburnia-project.org/releases/libburn-0.6.4.pl00.tar.gz
13 http://files.libburnia-project.org/releases/libburn-0.7.0.pl00.tar.gz
1414
1515 ------------------------------------------------------------------------------
1616
1818
1919 From tarball
2020
21 Obtain libburn-0.6.4.pl00.tar.gz, take it to a directory of your choice and do:
22
23 tar xzf libburn-0.6.4.pl00.tar.gz
24 cd libburn-0.6.4
21 Obtain libburn-0.7.0.pl00.tar.gz, take it to a directory of your choice and do:
22
23 tar xzf libburn-0.7.0.pl00.tar.gz
24 cd libburn-0.7.0
2525 ./configure --prefix=/usr
2626 make
2727
4646 snapshot you will need autotools of at least version 1.7.
4747 Do in a directory of your choice:
4848
49 svn co http://svn.libburnia-project.org/libburn/trunk libburn-0.6.3
50 cd libburn-0.6.3
49 svn co http://svn.libburnia-project.org/libburn/trunk libburn-svn
50 cd libburn-svn
5151 ./bootstrap
5252 ./configure --prefix=/usr
5353 make
387387 operations on "stdio:" pseudo drives. Nevertheless this allowed to lift the
388388 ban to build libburn on operating systems other than Linux and FreeBSD.
389389
390 - 16 Mar 2009 libisoburn-0.3.6: xorriso uses RRIP version 1.10 as default
391 in order to be mountable where mkisofs images are mountable.
392
393 - 17 Apr 2009 libisofs-0.6.18 introduces content filtering of data files.
394 Built-in filters allow compression to formats gzip and zisofs. External
395 filter processes allow arbitrary data conversions like encryption.
396
397 - 19 Apr 2009 libisoburn-0.3.8 makes use of the new libisofs capability to
398 perform content filtering of data files.
399
400 - 08 May 2009 libburn-0.6.6 fixes a bug with aborting on broken output pipe
401 and a bug with device scan on FreeBSD.
402
403 - 31 May 2009 libisofs-0.6.20 can record hard link relations in ISO images
404 and offers support with restoring them to disk. Current Linux kernels will
405 mount images with such hard links but will attribute a unique inode number
406 to each file.
407
408 - 28 Jun 2009 libisoburn-0.4.0: xorriso can record and restore hard link
409 relations of files. Performance of data reading has been improved. Option
410 -find now supports logical operators with its tests.
411
412 - 14 Jul 2009 libburn-0.6.8 fixes bugs and shortcommings with old MMC-1 drives
413 and with large SCSI bus numbers as handed out by Linux for USB drives.
414
415 - 20 Jul 2009 libisoburn-0.4.0.pl01 fixes a regression in xorriso which caused
416 data loss in older sessions if xorriso was used underneath growisofs.
417 Affected are releases since libisoburn-0.3.2 in january 2009.
418
419 - 25 Aug 2009 libisofs-0.6.22 can record MD5 checksums for the whole session
420 and for each single data file. Checksum tags allow to verify superblock and
421 directory tree before importing them.
422
423 - 27 Aug 2009 libburn-0.7.0 allows to calm down a drive and to inquire its
424 supported profiles. It works around some pitfalls with U3 enhanced memory
425 sticks which emulate a CD-ROM.
426
390427
391428 ------------------------------------------------------------------------------
392429
00 AC_DEFUN([TARGET_SHIZZLE],
11 [
22 ARCH=""
3 LIBBURNIA_PKGCONFDIR="$libdir"/pkgconfig
34
45 AC_MSG_CHECKING([target operating system])
56
7
68 case $target in
79 *-*-linux*)
810 ARCH=linux
1113 *-*-freebsd*)
1214 ARCH=freebsd
1315 LIBBURN_ARCH_LIBS=-lcam
16 LIBBURNIA_PKGCONFDIR=$(echo "$libdir" | sed 's/\/lib$/\/libdata/')/pkgconfig
1417 ;;
1518 *)
1619 ARCH=
2124
2225 AC_MSG_RESULT([$ARCH])
2326 ])
27
28
29 dnl LIBBURNIA_SET_PKGCONFIG determines the install directory for the *.pc file.
30 dnl Important: Must be performed _after_ TARGET_SHIZZLE
31 dnl
32 AC_DEFUN([LIBBURNIA_SET_PKGCONFIG],
33 [
34 ### for testing --enable-libdir-pkgconfig on Linux
35 ### LIBBURNIA_PKGCONFDIR="$libdir"data/pkgconfig
36
37 if test "x$LIBBURNIA_PKGCONFDIR" = "x$libdir"/pkgconfig
38 then
39 dummy=dummy
40 else
41 AC_ARG_ENABLE(libdir-pkgconfig,
42 [ --enable-libdir-pkgconfig Install to $libdir/pkgconfig on any OS, default=no],
43 , enable_libdir_pkgconfig="no")
44 AC_MSG_CHECKING([for --enable-libdir-pkgconfig])
45 if test "x$enable_libdir_pkgconfig" = xyes
46 then
47 LIBBURNIA_PKGCONFDIR="$libdir"/pkgconfig
48 fi
49 AC_MSG_RESULT([$enable_libdir_pkgconfig])
50 fi
51
52 libburnia_pkgconfig_override="no"
53 AC_ARG_ENABLE(pkgconfig-path,
54 [ --enable-pkgconfig-path=DIR Absolute path of directory for libisofs-*.pc],
55 libburnia_pkgconfig_override="yes" , enable_pkgconfig_path="none")
56 AC_MSG_CHECKING([for overridden pkgconfig directory path])
57 if test "x$enable_pkgconfig_path" = xno
58 then
59 libburnia_pkgconfig_override="no"
60 fi
61 if test "x$enable_pkgconfig_path" = x -o "x$enable_pkgconfig_path" = xyes
62 then
63 libburnia_pkgconfig_override="invalid argument"
64 fi
65 if test "x$libburnia_pkgconfig_override" = xyes
66 then
67 LIBBURNIA_PKGCONFDIR="$enable_pkgconfig_path"
68 AC_MSG_RESULT([$LIBBURNIA_PKGCONFDIR])
69 else
70 AC_MSG_RESULT([$libburnia_pkgconfig_override])
71 fi
72 AC_SUBST(LIBBURNIA_PKGCONFDIR)
73
74 dnl For debugging only
75 ### AC_MSG_RESULT([LIBBURNIA_PKGCONFDIR = $LIBBURNIA_PKGCONFDIR])
76
77 ])
78
33 cdrskin. By Thomas Schmitt <scdbackup@gmx.net>
44 Integrated sub project of libburnia-project.org but also published via:
55 http://scdbackup.sourceforge.net/cdrskin_eng.html
6 http://scdbackup.sourceforge.net/cdrskin-0.6.4.pl00.tar.gz
6 http://scdbackup.sourceforge.net/cdrskin-0.7.0.pl00.tar.gz
7
78 Copyright (C) 2006-2009 Thomas Schmitt, provided under GPL version 2.
89 ------------------------------------------------------------------------------
910
1314
1415 Currently it is supported on Linux with kernels >= 2.4 and on FreeBSD versions
1516 with ATAPI/CAM support enabled in the kernel, see atapicam(4).
16 On other X/Open compliant systems there will only be pseudo drives, but no
17 On other X/Open compliant systems there will only be emulated drives, but no
1718 direct MMC operation on real CD/DVD/BD drives.
1819
1920 By using this software you agree to the disclaimer at the end of this text
2223
2324 Compilation, First Glimpse, Installation
2425
25 Obtain cdrskin-0.6.4.pl00.tar.gz, take it to a directory of your choice and do:
26
27 tar xzf cdrskin-0.6.4.pl00.tar.gz
28 cd cdrskin-0.6.4
26 Obtain cdrskin-0.7.0.pl00.tar.gz, take it to a directory of your choice and do:
27
28 tar xzf cdrskin-0.7.0.pl00.tar.gz
29 cd cdrskin-0.7.0
2930
3031 Within that directory execute:
3132
11 .\" First parameter, NAME, should be all caps
22 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
33 .\" other parameters are allowed: see man(7), man(1)
4 .TH CDRSKIN 1 "Jan 07, 2009"
4 .TH CDRSKIN 1 "May 07, 2009"
55 .\" Please adjust this date whenever revising the manpage.
66 .\"
77 .\" Some roff macros, for reference:
6666 .br
6767 Recordable CD Media
6868 .br
69 Sequentially Recordable DVD Media
69 Sequentially Recordable DVD or BD Media
7070 .br
7171 Overwriteable DVD or BD Media
7272 .br
253253 .SS
254254 .B Drive preparation and addressing:
255255 .br
256 The drives, either CD burners or DVD burners, are accessed via addresses which
256 The drives, CD, DVD, or BD burners, are accessed via addresses which
257257 are specific to libburn and the operating system. Those addresses get listed
258258 by a run of \fBcdrskin --devices\fP.
259259 .br
637637 accompanied by option --grow_overwriteable_iso.
638638 .TP
639639 .BI \-multi
640 This option keeps the CD or unformatted DVD-R[W] appendable after the current
641 session has been written.
640 This option keeps CD, unformatted DVD-R[W], DVD+R, or BD-R appendable
641 after the current session has been written.
642642 Without it the disc gets closed and may not be written any more - unless it
643643 is a -RW and gets blanked which causes loss of its content.
644644 .br
686686 One should use it only if inavoidable.
687687 .TP
688688 .BI \-sao
689 Write CD in Session At Once mode, a sequential DVD-R[W] in Disc-at-once
690 (DAO) mode, or a DVD+R[/DL].
689 Write CD in Session At Once mode or sequential DVD-R[W] in Disc-at-once
690 (DAO) mode.
691691 .br
692692 With CD this mode is able to put several audio tracks on media without
693693 producing audible gaps between them.
695695 With DVD-R[W] this mode can only write a single track.
696696 No -multi is allowed with DVD-R[W] -sao.
697697 .br
698 -sao is permissible with overwriteable DVD, BD or DVD+R[/DL] but actually
698 -sao is permissible with overwriteable DVD, or DVD+R[/DL], or BD but actually
699699 only imposes restrictions without providing known advantages.
700700 .br
701701 -sao can only be used for tracks of fixely predicted size. This implies that
12381238 .br
12391239 blank=as_needed padsize=300k -
12401240 .SS
1241 .B Write multi-session to the same CD, DVD-R[W] or DVD+R[/DL]:
1242 .br
1243 cdrskin dev=/dev/hdc -v padsize=300k -multi 1.iso
1244 .br
1245 cdrskin dev=/dev/hdc -v padsize=300k -multi 2.iso
1246 .br
1247 cdrskin dev=/dev/hdc -v padsize=300k -multi 3.iso
1248 .br
1249 cdrskin dev=/dev/hdc -v padsize=300k 4.iso
1241 .B Write multi-session to the same CD, DVD-R[W], DVD+R[/DL], or BD-R:
1242 .br
1243 cdrskin dev=/dev/sr0 -v padsize=300k -multi 1.iso
1244 .br
1245 cdrskin dev=/dev/sr0 -v padsize=300k -multi 2.iso
1246 .br
1247 cdrskin dev=/dev/sr0 -v padsize=300k -multi 3.iso
1248 .br
1249 cdrskin dev=/dev/sr0 -v padsize=300k 4.iso
12501250 .SS
12511251 .B Get multi-session info for option -C of program mkisofs:
12521252 .br
8787
8888 /** The official program version */
8989 #ifndef Cdrskin_prog_versioN
90 #define Cdrskin_prog_versioN "0.6.4"
90 #define Cdrskin_prog_versioN "0.7.0"
9191 #endif
9292
9393 /** The official libburn interface revision to use.
9797 #define Cdrskin_libburn_majoR 0
9898 #endif
9999 #ifndef Cdrskin_libburn_minoR
100 #define Cdrskin_libburn_minoR 6
100 #define Cdrskin_libburn_minoR 7
101101 #endif
102102 #ifndef Cdrskin_libburn_micrO
103 #define Cdrskin_libburn_micrO 4
103 #define Cdrskin_libburn_micrO 0
104104 #endif
105105
106106
134134 #endif /* Cdrskin_libburn_cvs_A60220_tS */
135135
136136
137 #ifdef Cdrskin_libburn_0_6_4
138 #define Cdrskin_libburn_versioN "0.6.4"
137 #ifdef Cdrskin_libburn_0_7_0
138 #define Cdrskin_libburn_versioN "0.7.0"
139139 #define Cdrskin_libburn_from_pykix_svN 1
140 #endif /* Cdrskin_libburn_0_6_4 */
141
142 #ifdef Cdrskin_libburn_0_6_5
143 #define Cdrskin_libburn_versioN "0.6.5"
140 #endif /* Cdrskin_libburn_0_7_0 */
141
142 #ifdef Cdrskin_libburn_0_7_1
143 #define Cdrskin_libburn_versioN "0.7.1"
144144 #define Cdrskin_libburn_from_pykix_svN 1
145145
146146 /* Place novelty switch macros here.
147147 Move them down to Cdrskin_libburn_from_pykix_svN on version leap
148148 */
149149
150 /* there are no libburn novelties in 0.6.5 yet */
151
152 #endif /* Cdrskin_libburn_0_6_5 */
150
151 #endif /* Cdrskin_libburn_0_7_1 */
153152
154153 #ifndef Cdrskin_libburn_versioN
155 #define Cdrskin_libburn_0_6_4
156 #define Cdrskin_libburn_versioN "0.6.4"
154 #define Cdrskin_libburn_0_7_0
155 #define Cdrskin_libburn_versioN "0.7.0"
157156 #define Cdrskin_libburn_from_pykix_svN 1
158157 #endif
159158
160 #ifdef Cdrskin_libburn_0_6_4
159 #ifdef Cdrskin_libburn_0_7_0
161160 #undef Cdrskin_libburn_majoR
162161 #undef Cdrskin_libburn_minoR
163162 #undef Cdrskin_libburn_micrO
164163 #define Cdrskin_libburn_majoR 0
165 #define Cdrskin_libburn_minoR 6
166 #define Cdrskin_libburn_micrO 4
167 #endif
168 #ifdef Cdrskin_libburn_0_6_5
164 #define Cdrskin_libburn_minoR 7
165 #define Cdrskin_libburn_micrO 0
166 #endif
167 #ifdef Cdrskin_libburn_0_7_1
169168 #undef Cdrskin_libburn_majoR
170169 #undef Cdrskin_libburn_minoR
171170 #undef Cdrskin_libburn_micrO
172171 #define Cdrskin_libburn_majoR 0
173 #define Cdrskin_libburn_minoR 6
174 #define Cdrskin_libburn_micrO 5
172 #define Cdrskin_libburn_minoR 7
173 #define Cdrskin_libburn_micrO 1
175174 #endif
176175
177176
44074406 int Cdrskin_scanbus(struct CdrskiN *skin, int flag)
44084407 {
44094408 int ret,i,busno,first_on_bus,pseudo_transport_group= 0,skipped_devices= 0;
4410 int busmax= 16;
4409 int busmax= 16, busidx;
44114410 char shellsafe[5*Cdrskin_strleN+2],perms[40],btldev[Cdrskin_adrleN];
44124411 char adr[Cdrskin_adrleN],*raw_dev,*drives_shown= NULL;
4412 int *drives_busses= NULL;
44134413 struct stat stbuf;
44144414
44154415 drives_shown= malloc(skin->n_drives+1);
4416 if(drives_shown==NULL)
4416 drives_busses= malloc((skin->n_drives+1) * sizeof(int));
4417 if(drives_shown == NULL || drives_busses == NULL)
44174418 {ret= -1; goto ex;}
44184419 for(i=0;i<skin->n_drives;i++)
44194420 drives_shown[i]= 0;
44714472 if(skin->preskin->old_pseudo_scsi_adr)
44724473 printf("cdrskin: NOTE : The printed addresses are not cdrecord compatible !\n");
44734474
4474 for(busno= 0;busno<=busmax;busno++) {
4475 for(i=0;i<skin->n_drives;i++) {
4476 drives_busses[i]= -1;
4477 ret= Cdrskin_driveno_to_btldev(skin,i,btldev,1);
4478 if(ret >= pseudo_transport_group &&
4479 ret < pseudo_transport_group + 1000000) {
4480 drives_busses[i]= ret - pseudo_transport_group;
4481 if(ret > pseudo_transport_group + busmax)
4482 busmax= 1 + ret - pseudo_transport_group;
4483 }
4484 }
4485 for(busidx= 0; busidx < skin->n_drives + 1; busidx++) {
4486 if(busidx < skin->n_drives)
4487 busno= drives_busses[busidx];
4488 else
4489 busno= busmax;
4490 if(busno < 0)
4491 continue;
4492 for(i= 0; i < busidx; i++)
4493 if(drives_busses[i] == busno)
4494 break;
4495 if(i < busidx)
4496 continue;
44754497 first_on_bus= 1;
44764498 for(i=0;i<skin->n_drives;i++) {
44774499 ret= Cdrskin_driveno_to_btldev(skin,i,btldev,1);
45094531 ex:;
45104532 if(drives_shown!=NULL)
45114533 free((char *) drives_shown);
4534 if(drives_busses!=NULL)
4535 free((char *) drives_busses);
45124536 return(ret);
45134537 }
45144538
47354759 return(0);
47364760 }
47374761
4762 int Cdrskin_print_all_profiles(struct CdrskiN *skin, struct burn_drive *drive,
4763 int flag)
4764 {
4765 int num_profiles, profiles[64], i, ret;
4766 char is_current[64], profile_name[80];
4767
4768 burn_drive_get_all_profiles(drive, &num_profiles, profiles, is_current);
4769 for(i= 0; i < num_profiles; i++) {
4770 ret= burn_obtain_profile_name(profiles[i], profile_name);
4771 if(ret <= 0)
4772 strcpy(profile_name, "unknown");
4773 printf("Profile: 0x%4.4X (%s)%s\n", (unsigned int) profiles[i],
4774 profile_name, is_current[i] ? " (current)" : "");
4775 }
4776 return(1);
4777 }
4778
47384779
47394780 /** Perform -atip .
47404781 @param flag Bitfield for control purposes:
47604801 if(s==BURN_DISC_APPENDABLE && skin->no_blank_appendable) {
47614802 is_not_really_erasable= 1;
47624803 } else if(s==BURN_DISC_EMPTY) {
4763 if(skin->verbosity>=Cdrskin_verbose_progresS)
4804 if(skin->verbosity>=Cdrskin_verbose_progresS) {
47644805 printf("Current: none\n");
4806 Cdrskin_print_all_profiles(skin, drive, 0);
4807 }
47654808 ret= 0; goto ex;
47664809 }
47674810
48714914 printf("Current: CD-RW\n");
48724915 else
48734916 printf("Current: CD-R\n");
4874 }
4917 Cdrskin_print_all_profiles(skin, drive, 0);
4918 }
4919
48754920 if(strstr(profile_name,"DVD")==profile_name) {
48764921 /* These are dummy messages for project scdbackup, so its media recognition
48774922 gets a hint that the media is suitable and not in need of blanking.
3333
3434 <P>
3535 <H2>Hardware requirements:</H2>
36 A CD/DVD/BD recorder suitable for
37 <A HREF="http://libburnia-project.org">http://libburnia-project.org</A> <BR>
38 (SCSI , ATA , USB , or SATA writers compliant to standard MMC-3 for CD
39 and to MMC-5 for DVD or BD).
36 About any CD, DVD, or BD recorder produced in the recent ten years.
37 <BR>
38 <A HREF="http://libburnia-project.org">libburn</A>
39 supports recorders which are compliant to standards MMC-1 for CD and
40 MMC-5 for DVD or BD. Linux and FreeBSD allow to access drives connected
41 via SCSI, PATA (aka IDE, ATA), USB, or SATA.
4042 <BR>
4143 </P>
4244
5860 GPL software included:<BR>
5961 </H2>
6062 <DL>
61 <DT>libburn-0.6.4</DT>
63 <DT>libburn-0.7.0</DT>
6264 <DD>(founded by Derek Foreman and Ben Jansens,
6365 developed and maintained since August 2006 by
6466 Thomas Schmitt from team of libburnia-project.org)
176178 <DL>
177179 <DT>Learn to know a more versatile way to burn ISO 9660 formatted data</DT>
178180 <DD>
179 Standalone ISO 9660 multi-session CD/DVD tool
181 Standalone ISO 9660 multi-session CD/DVD/BD tool
180182 <A HREF="http://scdbackup.sourceforge.net/xorriso_eng.html">xorriso</A>.
181183 </DD>
182184 </DL>
183185
184 Testers wanted who are willing to risk some DVD-R DL media
185 or to do experiments on BD-R media.
186
187186 </P>
188187
189188 <HR>
193192 <P>
194193 <DL>
195194 <DT>Download as source code (see README):</DT>
196 <DD><A HREF="cdrskin-0.6.4.pl00.tar.gz">cdrskin-0.6.4.pl00.tar.gz</A>
197 (750 KB).
195 <DD><A HREF="cdrskin-0.7.0.pl00.tar.gz">cdrskin-0.7.0.pl00.tar.gz</A>
196 (820 KB).
198197 </DD>
199198 <DD>
200199 The cdrskin tarballs are source code identical with libburn releases
243242 <HR>
244243
245244 <P>
246 Enhancements towards previous stable version cdrskin-0.6.2.pl00:
245 Enhancements towards previous stable version cdrskin-0.6.8.pl00:
247246 <UL>
248 <LI>New operating system adapter "dummy" for stdio on general X/Open systems
249 </LI>
250 <LI>New stream recording mode with start address</LI>
251 <LI></LI>
247 <LI>Adapted to pitfalls of U3 memory sticks which appear as CD-ROM drives</LI>
248 <LI>Listing all supported profiles with option -atip -v</LI>
252249 <!--
253250 <LI>none</LI>
254251 -->
255252 </UL>
256253
257 Bug fixes towards cdrskin-0.6.2.pl00:
254 Bug fixes towards cdrskin-0.6.8.pl00:
258255 <UL>
259256 <LI>none</LI>
260257 <!--
261 <LI>none</LI>
262258 -->
263259 </UL>
264260
266262
267263 <P>
268264 <DL>
269 <DT><H3>Development snapshot, version 0.6.5 :</H3></DT>
270 <DD>Enhancements towards current stable version 0.6.4.pl00:
265 <DT><H3>Development snapshot, version 0.7.1 :</H3></DT>
266 <DD>Enhancements towards current stable version 0.7.0.pl00:
271267 <UL>
272268 <LI>none yet</LI>
273269 <!--
275271
276272 </UL>
277273 </DD>
274
275 <DD>Bug fixes towards cdrskin-0.7.0.pl00:
276 <UL>
277 <LI>none yet</LI>
278 <!--
279 -->
280 </UL>
281 </DD>
282
278283 <DD>&nbsp;</DD>
279 <DD><A HREF="README_cdrskin_devel">README 0.6.5</A>
280 <DD><A HREF="cdrskin__help_devel">cdrskin_0.6.5 --help</A></DD>
281 <DD><A HREF="cdrskin_help_devel">cdrskin_0.6.5 -help</A></DD>
282 <DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 0.6.5)</A></DD>
284 <DD><A HREF="README_cdrskin_devel">README 0.7.1</A>
285 <DD><A HREF="cdrskin__help_devel">cdrskin_0.7.1 --help</A></DD>
286 <DD><A HREF="cdrskin_help_devel">cdrskin_0.7.1 -help</A></DD>
287 <DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 0.7.1)</A></DD>
283288 <DD>&nbsp;</DD>
284289 <DT>Maintainers of cdrskin unstable packages please use SVN of
285290 <A HREF="http://libburnia-project.org"> libburnia-project.org</A></DT>
299304 <A HREF="README_cdrskin_devel">upcoming README</A> ):
300305 </DD>
301306 <DD>
302 <A HREF="cdrskin-0.6.5.tar.gz">cdrskin-0.6.5.tar.gz</A>
303 (750 KB).
307 <A HREF="cdrskin-0.7.1.tar.gz">cdrskin-0.7.1.tar.gz</A>
308 (820 KB).
304309 </DD>
305310
306311 <!-- This is not offered any more since spring 2008
333338 <BR>
334339 Very special thanks to Andy Polyakov whose
335340 <A HREF="http://fy.chalmers.se/~appro/linux/DVD+RW/tools">dvd+rw-tools</A>
336 provide libburn with invaluable examples on how to deal with DVD media.
341 provide libburn with invaluable examples on how to deal with DVD and BD media.
337342 </P>
338343
339344 <HR>
495500 <A href="http://sourceforge.net">
496501 <IMG src="sflogo-88-1.png" BORDER="0" ALT="SourceForge Logo"></A>
497502 <!-- on sourceforge use : <IMG src="http://sourceforge.net/sflogo.php?group_id=16010" width="88" height="31" border="0" alt="SourceForge Logo"></A> -->
503 <P>
504 Enjoying a FreeBSD shell account with the opportunity to
505 build and install cdrskin at<BR>
506 <A HREF="http://www.en.free-shells.com.ar">free-shells.com.ar</A>
507 </P>
498508 </FONT></CENTER>
499509 <HR>
500510 <DL>
501511 <DT>Links to my other published software projects :
502512 <DD><A HREF="http://scdbackup.webframe.org/xorriso_eng.html">
503 xorriso, a standalone ISO 9660 multi-session CD/DVD burn tool.
513 xorriso, a standalone ISO 9660 multi-session CD/DVD/BD burn tool.
504514 No mkisofs needed.
505515 <DL>
506516 <DD>
0 #define Cdrskin_timestamP "2009.03.13.080001"
0 #define Cdrskin_timestamP "2009.08.27.123001"
62436243 * Formatting and writing of BD-R media
62446244 * New API function burn_get_read_capacity()
62456245
6246 03 Jan 2009 []
6246 2009.01.04.112716 [2351]
62476247 COPYRIGHT
62486248 libburn/libdax_msgs.c
62496249 libburn/libdax_msgs.h
62506250 test/libburner.c
62516251 Updated copyright claims to year 2009
62526252
6253 []
6253 2009.01.04.113401 [2352]
62546254 Makefile.am
62556255 configure.ac
62566256 README
62606260 cdrskin/compile_cdrskin.sh
62616261 cdrskin/cdrskin_timestamp.h
62626262 cdrskin/cdrskin_eng.html
6263 Made number transition to 0.6.0
6264
6265 03 Jan 2009 []
6263 Made number transition to 0.6.1
6264
6265 04 Jan 2009 [2353]
62666266 - cdrskin/add_ts_changes_to_libburn_0_5_8
62676267 - cdrskin/add_ts_changes_to_libburn_0_5_9
62686268 + cdrskin/add_ts_changes_to_libburn_0_6_0
62696269 + cdrskin/add_ts_changes_to_libburn_0_6_1
62706270 Updated cdrskin tarball generator
62716271
6272 03 Jan 2009 []
6272 03 Jan 2009 [2354]
62736273 cdrskin/changelog.txt
62746274 Documented changes and release timestamp
62756275
6276
6277 ------------------------------------ cycle - cdrskin-0.6.1 -
6278 ------------------------------------ cycle - cdrskin-0.6.1 -
6279
6280
6281 []
6276 ------------------------------------ cycle - cdrskin-0.6.1 - 2009.01.04.113401
6277
6278 04 Jan 2009 [2356]
6279 svn move
6280 http://svn.libburnia-project.org/libburn/branches/ZeroSixZero
6281 http://svn.libburnia-project.org/libburn/tags/ZeroSixZero
6282 libburn release 0.6.0 is ready
6283
6284 2009.01.06.122534 [2366]
62826285 libburn/spc.c
62836286 Error texts for ASC 73 : power calibration and program memory
62846287
6288 2009.01.06.122808 [2367] [2369]
6289 libburn/async.c
6290 libburn/libdax_msgs.h
6291 Complaining and refusing more early with unformatted BD-RE
6292
6293 7 Jan 2009 [2370]
6294 cdrskin/cdrskin.1
6295 Clarification about one-time DVD and BD media
6296
6297 2009.01.07.154414 [2371]
6298 libburn/write.c
6299 Bug fix: BD-R were not correctly finalized
6300
6301 7 Jan 2009 [2372]
6302 cdrskin/cdrskin_eng.html
6303 Mentioned bug fix and pl01
6304
6305 ------------------------------------ cycle - cdrskin-0.6.1 - 2009.01.07.154414
6306
6307 7 Jan 2009 [2373]
6308 svn copy -m "Branching for libburn bugfix release 0.6.0.pl01" \
6309 http://svn.libburnia-project.org/libburn/ \
6310 http://svn.libburnia-project.org/libburn/
6311
6312 7 Jan 2009 [2374]
6313 svn rm -m 'Removing falsly copied tag' \
6314 http://svn.libburnia-project.org/libburn/libburn
6315
6316 7 Jan 2009 [2375]
6317 svn copy -m "Branching for libburn bugfix release 0.6.0.pl01" \
6318 http://svn.libburnia-project.org/libburn/tags/ZeroSixZero \
6319 http://svn.libburnia-project.org/libburn/branches/ZeroSixZeroPl01
6320
6321 2009.01.07.140001 [branch 2376]
6322 README
6323 cdrskin/README
6324 cdrskin/cdrskin_eng.html
6325 cdrskin/cdrskin_timestamp.h
6326 Mentioned bug fix and pl01
6327
6328 2009.01.07.140001 [branch 2377]
6329 libburn/write.c
6330 Bug fix: BD-R were not correctly finalized
6331
6332 7 Jan 2009 [2378]
6333 svn move -m 'libburn bugfix release 0.6.0.pl01 is ready' \
6334 http://svn.libburnia-project.org/libburn/branches/ZeroSixZeroPl01 \
6335 http://svn.libburnia-project.org/libburn/tags/ZeroSixZeroPl01
6336
6337 ------------------------------------ cycle - cdrskin-0.6.1 - 2009.01.07.154414
6338
6339 2009.01.09.095943 [2381]
6340 libburn/transport.h
6341 libburn/write.c
6342 libburn/mmc.c
6343 libburn/libdax_msgs.h
6344 Recognizing BD-R media spoiled by the close bug and handling them as appendable
6345
6346 ------------------------------------ cycle - cdrskin-0.6.1 - 2009.01.09.100210
6347
6348 2009.01.09.161704 [2383]
6349 libburn/write.c
6350 Preventing a possible bug with a burn run of more than one session at once
6351
6352 2009.01.11.102711 [2390]
6353 libburn/write.c
6354 libburn/libdax_msgs.h
6355 Prepared eventual closing of spoiled BD-R media by a pseudo write run
6356
6357 11 Jan 2009 [2391]
6358 doc/cookbook.txt
6359 Updated cookbook about BD-R media
6360
6361 27 Jan 2009 [2431]
6362 README
6363 libburn/libburn.h
6364 Mentioned the need for 64 bit file i/o
6365
6366 2009.02.04.102822 [2447]
6367 Makefile.am
6368 Linking with $LIBBURN_ARCH_LIBS to get -lcam on FreeBSD
6369
6370 4 Feb 2009 [2448]
6371 README
6372 cdrskin/README
6373 Mentioned hald as possibly conflicting service
6374
6375 2009.02.19.192801 [2479]
6376 libburn/spc.c
6377 Human readable error messages with asynchronous SCSI errors
6378
6379 20 Feb 2009 [2482]
6380 svn copy http://svn.libburnia-project.org/libburn/trunk
6381 http://svn.libburnia-project.org/libburn/branches/ZeroSixZero
6382 Preparing for libburn-0.6.0
6383
6384 2009.02.20.090001 [2483]
6385 Makefile.am
6386 configure.ac
6387 README
6388 libburn/libburn.h
6389 cdrskin/cdrskin.c
6390 cdrskin/README
6391 cdrskin/compile_cdrskin.sh
6392 cdrskin/cdrskin_timestamp.h
6393 cdrskin/cdrskin_eng.html
6394 Made number transition to 0.6.2
6395
6396 20 Feb 2009 [2484]
6397 - cdrskin/add_ts_changes_to_libburn_0_6_0
6398 - cdrskin/add_ts_changes_to_libburn_0_6_1
6399 + cdrskin/add_ts_changes_to_libburn_0_6_2
6400 + cdrskin/add_ts_changes_to_libburn_0_6_3
6401 Updated cdrskin tarball generator
6402
6403 ------------------------------ release - cdrskin-0.6.2.pl00 - 2009.02.20.090001
6404 * Improvements with build system for FreeBSD
6405
6406 2009.02.20.124909 [2485]
6407 Makefile.am
6408 configure.ac
6409 README
6410 libburn/libburn.h
6411 cdrskin/cdrskin.c
6412 cdrskin/README
6413 cdrskin/compile_cdrskin.sh
6414 cdrskin/cdrskin_timestamp.h
6415 cdrskin/cdrskin_eng.html
6416 Made number transition to 0.6.3
6417
6418 20 Feb 2009 [2486]
6419 - cdrskin/add_ts_changes_to_libburn_0_6_0
6420 - cdrskin/add_ts_changes_to_libburn_0_6_1
6421 + cdrskin/add_ts_changes_to_libburn_0_6_2
6422 + cdrskin/add_ts_changes_to_libburn_0_6_3
6423 Updated cdrskin tarball generator
6424
6425 ------------------------------------ cycle - cdrskin-0.6.3 - 2009.02.20.132535
6426
6427 20 Feb 2009 [2489]
6428 svn move -m libburn release 0.6.2 is ready
6429 http://svn.libburnia-project.org/libburn/branches/ZeroSixTwo
6430 http://svn.libburnia-project.org/libburn/tags/ZeroSixTwo
6431
6432 2009.02.27.143100 [2500]
6433 libburn/libburn.h
6434 libburn/transport.h
6435 libburn/drive.c
6436 libburn/options.c
6437 libburn/write.c
6438 libburn/mmc.c
6439 New API function burn_drive_set_stream_recording()
6440
6441 2009.02.27.211707 [2501]
6442 cdrskin/cdrskin.c
6443 cdrskin/cdrskin.1
6444 New stream_recording mode with start number
6445
6446 2009.03.02.170126 [2513]
6447 libburn/os.h
6448 libburn/libdax_msgs.h
6449 libburn/sg.c
6450 + libburn/os-dummy.h
6451 + libburn/sg-dummy.c
6452 New operating system adapter "dummy" for stdio on POSIX-like systems
6453
6454 2009.03.02.193353 [2514]
6455 libburn/drive.c
6456 Fixed a race condition on abort with stdio writing which could cause SIGSEGV
6457
6458 2009.03.02.200132 [2515]
6459 libburn/sg.c
6460 Added a dummy function with loud compiler warning to sg.c dummy case
6461
6462 2009.03.03.092057 [2516]
6463 configure.ac
6464 libburn/sg-dummy.c
6465 Making optional use of statvfs() in sg-dummy
6466
6467 ------------------------------------ cycle - cdrskin-0.6.3 - 2009.03.03.092057
6468 * New API function burn_drive_set_stream_recording()
6469 * New stream recording mode with start number
6470
6471
6472 2009.03.05.145309 [2520]
6473 acinclude.m4
6474 Lifted the ban on operating systems other than Linux and FreeBSD
6475
6476 ------------------------------------ cycle - cdrskin-0.6.3 - 2009.03.05.145309
6477 * New operating system adapter "dummy" for stdio on POSIX-like systems
6478
6479
6480 2009.03.08.140120 [2522]
6481 libburn/cleanup.c
6482 Reacted on compiler warnings of SchilliX-0.6.7 (based on Solaris 5.11)
6483
6484 13 Mar 2009 [2529]
6485 svn copy -m "Branching for libburn release 0.6.4" \
6486 http://svn.libburnia-project.org/libburn/trunk \
6487 http://svn.libburnia-project.org/libburn/branches/ZeroSixFour
6488
6489 2009.03.13.080001 [2530]
6490 Makefile.am
6491 configure.ac
6492 README
6493 libburn/libburn.h
6494 cdrskin/cdrskin.c
6495 cdrskin/README
6496 cdrskin/compile_cdrskin.sh
6497 cdrskin/cdrskin_timestamp.h
6498 cdrskin/cdrskin_eng.html
6499 Made libburn number transition to 0.6.4
6500
6501 13 Mar 2009 [2531]
6502 - cdrskin/add_ts_changes_to_libburn_0_6_2
6503 - cdrskin/add_ts_changes_to_libburn_0_6_3
6504 + cdrskin/add_ts_changes_to_libburn_0_6_4
6505 + cdrskin/add_ts_changes_to_libburn_0_6_5
6506 Updated cdrskin tarball generator
6507
6508 13 Mar 2009 [2534]
6509 cdrskin/changelog.txt
6510 Documented changes and release timestamp
6511
6512 ------------------------------ release - cdrskin-0.6.4.pl00 - 2009.03.13.080001
6513 * New operating system adapter "dummy" for stdio on general X/Open systems
6514 * New API function burn_drive_set_stream_recording()
6515 * New stream recording mode with start address
6516
6517
6518 2009.03.13.135818 [2532]
6519 Makefile.am
6520 configure.ac
6521 README
6522 libburn/libburn.h
6523 cdrskin/cdrskin.c
6524 cdrskin/README
6525 cdrskin/compile_cdrskin.sh
6526 cdrskin/cdrskin_timestamp.h
6527 cdrskin/cdrskin_eng.html
6528 Made libburn number transition to 0.6.5
6529
6530 13 Mar 2009 [2533]
6531 - cdrskin/add_ts_changes_to_libburn_0_6_2
6532 - cdrskin/add_ts_changes_to_libburn_0_6_3
6533 + cdrskin/add_ts_changes_to_libburn_0_6_4
6534 + cdrskin/add_ts_changes_to_libburn_0_6_5
6535 Updated cdrskin tarball generator
6536
6537 13 Mar 2009 [2535]
6538 cdrskin/changelog.txt
6539 Documented changes and release timestamp
6540
6541 ------------------------------------ cycle - cdrskin-0.6.5 - 2009.03.13.162355
6542
6543 13 Mar 2009 [2538]
6544 svn move -m "libburn release 0.6.4 is ready" \
6545 http://svn.libburnia-project.org/libburn/branches/ZeroSixFour \
6546 http://svn.libburnia-project.org/libburn/tags/ZeroSixFour
6547
6548 2009.03.16.190745 [2547]
6549 configure.ac
6550 acinclude.m4
6551 Makefile.am
6552 Get on FreeBSD pkgconfigdir=.../libdata , on Linux and others: .../lib
6553
6554 2009.03.18.124558 [2553]
6555 libburn/spc.c
6556 Human readable error messages for asc=08 "Logical unit communication failure"
6557
6558 2009.03.18.172512 [2554]
6559 libburn/drive.c
6560 Bug fix: burn_abort() did not work with broken output pipe (since rev 2514)
6561
6562 2009.04.30.065653 [2623]
6563 libburn/write.c
6564 Marked alleged use of uninitialized memory reported by valgrind
6565
6566 2009.04.30.065918 [2624]
6567 libburn/write.c
6568 Replaced 8 blanks by a tab
6569
6570 2009.04.30.070813 [2625]
6571 libburn/sg-freebsd.c
6572 Bug fix: Device scan stalled on FreeBSD. Ticket 148 jwehle
6573
6574 ------------------------------------ cycle - cdrskin-0.6.5 - 2009.04.30.070813
6575 Bug fix: burn_abort() did not work with broken output pipe (since rev 2514)
6576 Bug fix: Device scan stalled on FreeBSD. Ticket 148 jwehle
6577
6578 7 May 2009 [2628]
6579 svn copy -m "Branching for libburn release 0.6.6"
6580 http://svn.libburnia-project.org/libburn/trunk
6581 http://svn.libburnia-project.org/libburn/branches/ZeroSixSix
6582
6583 7 May 2009 [2629]
6584 cdrskin/cdrskin.1
6585 Mentioned BD were it was missing
6586
6587 2009.05.07.100001 [2630]
6588 Makefile.am
6589 configure.ac
6590 README
6591 libburn/libburn.h
6592 cdrskin/cdrskin.c
6593 cdrskin/README
6594 cdrskin/compile_cdrskin.sh
6595 cdrskin/cdrskin_timestamp.h
6596 cdrskin/cdrskin_eng.html
6597 Made number transition and activated development documentation
6598
6599 7 May 2009 [2631]
6600 - cdrskin/add_ts_changes_to_libburn_0_6_4
6601 - cdrskin/add_ts_changes_to_libburn_0_6_5
6602 + cdrskin/add_ts_changes_to_libburn_0_6_6
6603 + cdrskin/add_ts_changes_to_libburn_0_6_7
6604 Updated cdrskin tarball generator
6605
6606 7 May 2009 [2632]
6607 cdrskin/changelog.txt
6608 Documented changes and release timestamp
6609
6610 ------------------------------ release - cdrskin-0.6.6.pl00 - 2009.05.07.100001
6611 Bug fix: burn_abort() did not work with broken output pipe (since rev 2514)
6612 Bug fix: Device scan stalled on FreeBSD. Ticket 148 jwehle
6613
6614
6615 7 May 2009 [2633]
6616 cdrskin/cdrskin.1
6617 Mentioned BD were it was missing
6618
6619 2009.05.07.181034 [2634]
6620 Makefile.am
6621 configure.ac
6622 README
6623 libburn/libburn.h
6624 cdrskin/cdrskin.c
6625 cdrskin/README
6626 cdrskin/compile_cdrskin.sh
6627 cdrskin/cdrskin_timestamp.h
6628 cdrskin/cdrskin_eng.html
6629 Made number transition and activated development documentation
6630
6631 7 May 2009 [2635]
6632 - cdrskin/add_ts_changes_to_libburn_0_6_4
6633 - cdrskin/add_ts_changes_to_libburn_0_6_5
6634 + cdrskin/add_ts_changes_to_libburn_0_6_6
6635 + cdrskin/add_ts_changes_to_libburn_0_6_7
6636 Updated cdrskin tarball generator
6637
6638 7 May 2009 [2636]
6639 cdrskin/changelog.txt
6640 Documented changes and release timestamp
6641
6642 ------------------------------------ cycle - cdrskin-0.6.7 - 2009.05.07.181034
6643
6644 8 May 2009 [2637]
6645 svn move -m libburn release 0.6.6 is ready
6646 http://svn.libburnia-project.org/libburn/branches/ZeroSixSix
6647 http://svn.libburnia-project.org/libburn/tags/ZeroSixSix
6648
6649 2009.05.17.144304 [2645]
6650 cdrskin/cdrskin.c
6651 Made -scanbus work with SCSI bus numbers like 85 (USB, kernel 2.6.18.2)
6652
6653 2009.06.02.162841 [2655]
6654 libburn/drive.c
6655 libburn/async.c
6656 libburn/options.c
6657 libburn/spc.c
6658 libburn/libdax_msgs.h
6659 Rectified use of burn_drive.mdata->valid
6660
6661 2 Jun 2009 [2656]
6662 test/libburner.c
6663 Avoided SIGSEGV if no drives were found by scan
6664
6665 2009.06.02.172201 [2657]
6666 libburn/drive.c
6667 Avoided to enumerate faulty drive objects
6668
6669 2009.06.03.085637 [2658]
6670 libburn/spc.c
6671 Bug fix: Old MMC-1 drives were rejected because of mode page 2Ah length
6672
6673 2009.06.03.185118 [2659]
6674 libburn/transport.h
6675 libburn/drive.c
6676 libburn/spc.c
6677 libburn/mmc.c
6678 Bug fix: No usable media was detected with old MMC-1 drives
6679
6680 2009.06.14.095004 [2669]
6681 libburn/sg-linux.c
6682 Retrying 3 times on EBUSY drives with generous usleep intervals
6683
6684 ------------------------------------ cycle - cdrskin-0.6.7 - 2009.06.14.095833
6685 Made -scanbus work with high SCSI bus numbers
6686 Bug fix: Old MMC-1 drives were rejected because of mode page 2Ah length
6687 Bug fix: No usable media was detected with old MMC-1 drives
6688
6689
6690 7 Jul 2009 [2691]
6691 acinclude.m4
6692 configure.ac
6693 configure options --enable-libdir-pkgconfig and --enable-pkgconfig-path=DIR
6694
6695 2009.07.07.191134 [2692]
6696 Timestamp for revision 2691
6697
6698 14 Jul 2009 [2894]
6699 svn copy -m "Branching for libburn release 0.6.8"
6700 http://svn.libburnia-project.org/libburn/trunk
6701 http://svn.libburnia-project.org/libburn/branches/ZeroSixEight
6702
6703 2009.07.14.100001 [2695]
6704 Makefile.am
6705 configure.ac
6706 README
6707 libburn/libburn.h
6708 cdrskin/cdrskin.c
6709 cdrskin/README
6710 cdrskin/compile_cdrskin.sh
6711 cdrskin/cdrskin_timestamp.h
6712 cdrskin/cdrskin_eng.html
6713 Made number transition and activated development documentation
6714
6715 14 Jul 2009 [2696]
6716 - cdrskin/add_ts_changes_to_libburn_0_6_6
6717 - cdrskin/add_ts_changes_to_libburn_0_6_7
6718 + cdrskin/add_ts_changes_to_libburn_0_6_8
6719 + cdrskin/add_ts_changes_to_libburn_0_6_9
6720 Updated cdrskin tarball generator
6721
6722 14 Jul 2009 [2697]
6723 cdrskin/changelog.txt
6724 Documented changes and release timestamp
6725
6726 ------------------------------ release - cdrskin-0.6.8.pl00 - 2009.07.14.100001
6727 Made -scanbus work with high SCSI bus numbers
6728 Bug fix: Old MMC-1 drives were rejected because of mode page 2Ah length
6729 Bug fix: No usable media was detected with old MMC-1 drives
6730
6731
6732 2009.07.14.133159 [2698]
6733 Makefile.am
6734 configure.ac
6735 README
6736 libburn/libburn.h
6737 cdrskin/cdrskin.c
6738 cdrskin/README
6739 cdrskin/compile_cdrskin.sh
6740 cdrskin/cdrskin_timestamp.h
6741 cdrskin/cdrskin_eng.html
6742 Made number transition and activated development documentation
6743
6744 14 Jul 2009 [2699]
6745 - cdrskin/add_ts_changes_to_libburn_0_6_6
6746 - cdrskin/add_ts_changes_to_libburn_0_6_7
6747 + cdrskin/add_ts_changes_to_libburn_0_6_8
6748 + cdrskin/add_ts_changes_to_libburn_0_6_9
6749 Updated cdrskin tarball generator
6750
6751 14 Jul 2009 []
6752 cdrskin/changelog.txt
6753 Documented changes and release timestamp
6754
6755 ------------------------------------ cycle - cdrskin-0.6.9 - 2009.07.14.133159
6756
6757
6758 ------------------------------------ cycle - cdrskin-0.6.9 -
6759 ------------------------------------ cycle - cdrskin-0.6.9 -
62856760
62866761 ===============================================================================
62876762 TODO
62906765
62916766 --------------------------------- bugs -------------------------------------
62926767
6293 - Needed is a system dependend facility: dev_t <-> major, minor
62946768
62956769 - Do something about drive->buffer asynchronous race conditions
62966770 and dangerous use of local heap memory.
63286802
63296803 What about cdrskin rc files ? Forward with fallback runs ?
63306804
6331 cdrskin/README
6332 Thin out
6333
63346805
63356806 []
63366807 Emulate -dummy on overwriteables ?
00 #!/bin/sh
11
22 # compile_cdrskin.sh
3 # Copyright 2005 - 2008 Thomas Schmitt, scdbackup@gmx.net, GPL version 2
3 # Copyright 2005 - 2009 Thomas Schmitt, scdbackup@gmx.net, GPL version 2
44 # to be executed within ./libburn-* resp ./cdrskin-*
55
66 debug_opts="-O2"
77 def_opts=
88 largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1"
9 libvers="-DCdrskin_libburn_0_6_4"
9 libvers="-DCdrskin_libburn_0_7_0"
1010 cleanup_src_or_obj="libburn/cleanup.o"
1111 libdax_msgs_o="libburn/libdax_msgs.o"
1212 libdax_audioxtr_o="libburn/libdax_audioxtr.o"
3232 libdax_audioxtr_o=
3333 libdax_msgs_o="libburn/message.o"
3434 cleanup_src_or_obj="-DCleanup_has_no_libburn_os_H cdrskin/cleanup.c"
35 elif test "$i" = "-libburn_0_6_4"
36 then
37 libvers="-DCdrskin_libburn_0_6_4"
35 elif test "$i" = "-libburn_0_7_0"
36 then
37 libvers="-DCdrskin_libburn_0_7_0"
3838 libdax_audioxtr_o="libburn/libdax_audioxtr.o"
3939 libdax_msgs_o="libburn/libdax_msgs.o"
4040 cleanup_src_or_obj="libburn/cleanup.o"
4141 elif test "$i" = "-libburn_svn"
4242 then
43 libvers="-DCdrskin_libburn_0_6_5"
43 libvers="-DCdrskin_libburn_0_7_1"
4444 libdax_audioxtr_o="libburn/libdax_audioxtr.o"
4545 libdax_msgs_o="libburn/libdax_msgs.o"
4646 cleanup_src_or_obj="libburn/cleanup.o"
7474 echo "Options:"
7575 echo " -compile_cdrfifo compile program cdrskin/cdrfifo."
7676 echo " -compile_dewav compile program test/dewav without libburn."
77 echo " -libburn_0_6_4 set macro to match libburn-0.6.4"
77 echo " -libburn_0_7_0 set macro to match libburn-0.7.0"
7878 echo " -libburn_svn set macro to match current libburn-SVN."
7979 echo " -do_not_compile_cdrskin omit compilation of cdrskin/cdrskin."
8080 echo " -experimental use newly introduced libburn features."
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.60 for libburn 0.6.4.
2 # Generated by GNU Autoconf 2.60 for libburn 0.7.0.
33 #
44 # Report bugs to <http://libburnia-project.org>.
55 #
712712 # Identity of this package.
713713 PACKAGE_NAME='libburn'
714714 PACKAGE_TARNAME='libburn'
715 PACKAGE_VERSION='0.6.4'
716 PACKAGE_STRING='libburn 0.6.4'
715 PACKAGE_VERSION='0.7.0'
716 PACKAGE_STRING='libburn 0.7.0'
717717 PACKAGE_BUGREPORT='http://libburnia-project.org'
718718
719719 ac_default_prefix=/usr/local
874874 LIBTOOL_DEPS
875875 THREAD_LIBS
876876 ARCH
877 LIBBURNIA_PKGCONFDIR
877878 LIBBURN_ARCH_LIBS
878879 LIBOBJS
879880 LTLIBOBJS'
13941395 # Omit some internal or obsolete options to make the list less imposing.
13951396 # This message is too long to be a string in the A/UX 3.1 sh.
13961397 cat <<_ACEOF
1397 \`configure' configures libburn 0.6.4 to adapt to many kinds of systems.
1398 \`configure' configures libburn 0.7.0 to adapt to many kinds of systems.
13981399
13991400 Usage: $0 [OPTION]... [VAR=VALUE]...
14001401
14651466
14661467 if test -n "$ac_init_help"; then
14671468 case $ac_init_help in
1468 short | recursive ) echo "Configuration of libburn 0.6.4:";;
1469 short | recursive ) echo "Configuration of libburn 0.7.0:";;
14691470 esac
14701471 cat <<\_ACEOF
14711472
14831484 optimize for fast installation [default=yes]
14841485 --disable-libtool-lock avoid locking (might break parallel builds)
14851486 --enable-debug Disable aggressive optimizations default=yes
1487 --enable-libdir-pkgconfig Install to $libdir/pkgconfig on any OS, default=no
1488 --enable-pkgconfig-path=DIR Absolute path of directory for libisofs-*.pc
14861489
14871490 Optional Packages:
14881491 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
15701573 test -n "$ac_init_help" && exit $ac_status
15711574 if $ac_init_version; then
15721575 cat <<\_ACEOF
1573 libburn configure 0.6.4
1576 libburn configure 0.7.0
15741577 generated by GNU Autoconf 2.60
15751578
15761579 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
15841587 This file contains any messages produced by compilers while
15851588 running configure, to aid debugging if configure makes a mistake.
15861589
1587 It was created by libburn $as_me 0.6.4, which was
1590 It was created by libburn $as_me 0.7.0, which was
15881591 generated by GNU Autoconf 2.60. Invocation command line was
15891592
15901593 $ $0 $@
23832386
23842387 # Define the identity of the package.
23852388 PACKAGE='libburn'
2386 VERSION='0.6.4'
2389 VERSION='0.7.0'
23872390
23882391
23892392 cat >>confdefs.h <<_ACEOF
25312534
25322535
25332536 BURN_MAJOR_VERSION=0
2534 BURN_MINOR_VERSION=6
2535 BURN_MICRO_VERSION=4
2537 BURN_MINOR_VERSION=7
2538 BURN_MICRO_VERSION=0
25362539 BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
25372540
25382541
25412544
25422545
25432546 LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
2544 LT_CURRENT=33
2545 LT_AGE=29
2547 LT_CURRENT=39
2548 LT_AGE=35
25462549 LT_REVISION=0
25472550 LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
25482551
63976400 ;;
63986401 *-*-irix6*)
63996402 # Find out which ABI we are using.
6400 echo '#line 6401 "configure"' > conftest.$ac_ext
6403 echo '#line 6404 "configure"' > conftest.$ac_ext
64016404 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
64026405 (eval $ac_compile) 2>&5
64036406 ac_status=$?
88258828 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
88268829 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
88278830 -e 's:$: $lt_compiler_flag:'`
8828 (eval echo "\"\$as_me:8829: $lt_compile\"" >&5)
8831 (eval echo "\"\$as_me:8832: $lt_compile\"" >&5)
88298832 (eval "$lt_compile" 2>conftest.err)
88308833 ac_status=$?
88318834 cat conftest.err >&5
8832 echo "$as_me:8833: \$? = $ac_status" >&5
8835 echo "$as_me:8836: \$? = $ac_status" >&5
88338836 if (exit $ac_status) && test -s "$ac_outfile"; then
88348837 # The compiler can only warn and ignore the option if not recognized
88358838 # So say no if there are warnings other than the usual output.
90939096 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
90949097 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
90959098 -e 's:$: $lt_compiler_flag:'`
9096 (eval echo "\"\$as_me:9097: $lt_compile\"" >&5)
9099 (eval echo "\"\$as_me:9100: $lt_compile\"" >&5)
90979100 (eval "$lt_compile" 2>conftest.err)
90989101 ac_status=$?
90999102 cat conftest.err >&5
9100 echo "$as_me:9101: \$? = $ac_status" >&5
9103 echo "$as_me:9104: \$? = $ac_status" >&5
91019104 if (exit $ac_status) && test -s "$ac_outfile"; then
91029105 # The compiler can only warn and ignore the option if not recognized
91039106 # So say no if there are warnings other than the usual output.
91979200 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
91989201 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
91999202 -e 's:$: $lt_compiler_flag:'`
9200 (eval echo "\"\$as_me:9201: $lt_compile\"" >&5)
9203 (eval echo "\"\$as_me:9204: $lt_compile\"" >&5)
92019204 (eval "$lt_compile" 2>out/conftest.err)
92029205 ac_status=$?
92039206 cat out/conftest.err >&5
9204 echo "$as_me:9205: \$? = $ac_status" >&5
9207 echo "$as_me:9208: \$? = $ac_status" >&5
92059208 if (exit $ac_status) && test -s out/conftest2.$ac_objext
92069209 then
92079210 # The compiler can only warn and ignore the option if not recognized
1164911652 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1165011653 lt_status=$lt_dlunknown
1165111654 cat > conftest.$ac_ext <<EOF
11652 #line 11653 "configure"
11655 #line 11656 "configure"
1165311656 #include "confdefs.h"
1165411657
1165511658 #if HAVE_DLFCN_H
1174911752 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1175011753 lt_status=$lt_dlunknown
1175111754 cat > conftest.$ac_ext <<EOF
11752 #line 11753 "configure"
11755 #line 11756 "configure"
1175311756 #include "confdefs.h"
1175411757
1175511758 #if HAVE_DLFCN_H
1411714120 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1411814121 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1411914122 -e 's:$: $lt_compiler_flag:'`
14120 (eval echo "\"\$as_me:14121: $lt_compile\"" >&5)
14123 (eval echo "\"\$as_me:14124: $lt_compile\"" >&5)
1412114124 (eval "$lt_compile" 2>conftest.err)
1412214125 ac_status=$?
1412314126 cat conftest.err >&5
14124 echo "$as_me:14125: \$? = $ac_status" >&5
14127 echo "$as_me:14128: \$? = $ac_status" >&5
1412514128 if (exit $ac_status) && test -s "$ac_outfile"; then
1412614129 # The compiler can only warn and ignore the option if not recognized
1412714130 # So say no if there are warnings other than the usual output.
1422114224 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1422214225 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1422314226 -e 's:$: $lt_compiler_flag:'`
14224 (eval echo "\"\$as_me:14225: $lt_compile\"" >&5)
14227 (eval echo "\"\$as_me:14228: $lt_compile\"" >&5)
1422514228 (eval "$lt_compile" 2>out/conftest.err)
1422614229 ac_status=$?
1422714230 cat out/conftest.err >&5
14228 echo "$as_me:14229: \$? = $ac_status" >&5
14231 echo "$as_me:14232: \$? = $ac_status" >&5
1422914232 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1423014233 then
1423114234 # The compiler can only warn and ignore the option if not recognized
1579115794 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1579215795 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1579315796 -e 's:$: $lt_compiler_flag:'`
15794 (eval echo "\"\$as_me:15795: $lt_compile\"" >&5)
15797 (eval echo "\"\$as_me:15798: $lt_compile\"" >&5)
1579515798 (eval "$lt_compile" 2>conftest.err)
1579615799 ac_status=$?
1579715800 cat conftest.err >&5
15798 echo "$as_me:15799: \$? = $ac_status" >&5
15801 echo "$as_me:15802: \$? = $ac_status" >&5
1579915802 if (exit $ac_status) && test -s "$ac_outfile"; then
1580015803 # The compiler can only warn and ignore the option if not recognized
1580115804 # So say no if there are warnings other than the usual output.
1589515898 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1589615899 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1589715900 -e 's:$: $lt_compiler_flag:'`
15898 (eval echo "\"\$as_me:15899: $lt_compile\"" >&5)
15901 (eval echo "\"\$as_me:15902: $lt_compile\"" >&5)
1589915902 (eval "$lt_compile" 2>out/conftest.err)
1590015903 ac_status=$?
1590115904 cat out/conftest.err >&5
15902 echo "$as_me:15903: \$? = $ac_status" >&5
15905 echo "$as_me:15906: \$? = $ac_status" >&5
1590315906 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1590415907 then
1590515908 # The compiler can only warn and ignore the option if not recognized
1812518128 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1812618129 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1812718130 -e 's:$: $lt_compiler_flag:'`
18128 (eval echo "\"\$as_me:18129: $lt_compile\"" >&5)
18131 (eval echo "\"\$as_me:18132: $lt_compile\"" >&5)
1812918132 (eval "$lt_compile" 2>conftest.err)
1813018133 ac_status=$?
1813118134 cat conftest.err >&5
18132 echo "$as_me:18133: \$? = $ac_status" >&5
18135 echo "$as_me:18136: \$? = $ac_status" >&5
1813318136 if (exit $ac_status) && test -s "$ac_outfile"; then
1813418137 # The compiler can only warn and ignore the option if not recognized
1813518138 # So say no if there are warnings other than the usual output.
1839318396 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1839418397 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1839518398 -e 's:$: $lt_compiler_flag:'`
18396 (eval echo "\"\$as_me:18397: $lt_compile\"" >&5)
18399 (eval echo "\"\$as_me:18400: $lt_compile\"" >&5)
1839718400 (eval "$lt_compile" 2>conftest.err)
1839818401 ac_status=$?
1839918402 cat conftest.err >&5
18400 echo "$as_me:18401: \$? = $ac_status" >&5
18403 echo "$as_me:18404: \$? = $ac_status" >&5
1840118404 if (exit $ac_status) && test -s "$ac_outfile"; then
1840218405 # The compiler can only warn and ignore the option if not recognized
1840318406 # So say no if there are warnings other than the usual output.
1849718500 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1849818501 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1849918502 -e 's:$: $lt_compiler_flag:'`
18500 (eval echo "\"\$as_me:18501: $lt_compile\"" >&5)
18503 (eval echo "\"\$as_me:18504: $lt_compile\"" >&5)
1850118504 (eval "$lt_compile" 2>out/conftest.err)
1850218505 ac_status=$?
1850318506 cat out/conftest.err >&5
18504 echo "$as_me:18505: \$? = $ac_status" >&5
18507 echo "$as_me:18508: \$? = $ac_status" >&5
1850518508 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1850618509 then
1850718510 # The compiler can only warn and ignore the option if not recognized
2144921452
2145021453
2145121454 ARCH=""
21455 LIBBURNIA_PKGCONFDIR="$libdir"/pkgconfig
2145221456
2145321457 { echo "$as_me:$LINENO: checking target operating system" >&5
2145421458 echo $ECHO_N "checking target operating system... $ECHO_C" >&6; }
21459
2145521460
2145621461 case $target in
2145721462 *-*-linux*)
2146121466 *-*-freebsd*)
2146221467 ARCH=freebsd
2146321468 LIBBURN_ARCH_LIBS=-lcam
21469 LIBBURNIA_PKGCONFDIR=$(echo "$libdir" | sed 's/\/lib$/\/libdata/')/pkgconfig
2146421470 ;;
2146521471 *)
2146621472 ARCH=
2147121477
2147221478 { echo "$as_me:$LINENO: result: $ARCH" >&5
2147321479 echo "${ECHO_T}$ARCH" >&6; }
21480
2147421481
2147521482
2147621483
2176221769 fi
2176321770 CFLAGS="$CFLAGS -DDEBUG"
2176421771 fi
21772
21773
21774
21775 ### for testing --enable-libdir-pkgconfig on Linux
21776 ### LIBBURNIA_PKGCONFDIR="$libdir"data/pkgconfig
21777
21778 if test "x$LIBBURNIA_PKGCONFDIR" = "x$libdir"/pkgconfig
21779 then
21780 dummy=dummy
21781 else
21782 # Check whether --enable-libdir-pkgconfig was given.
21783 if test "${enable_libdir_pkgconfig+set}" = set; then
21784 enableval=$enable_libdir_pkgconfig;
21785 else
21786 enable_libdir_pkgconfig="no"
21787 fi
21788
21789 { echo "$as_me:$LINENO: checking for --enable-libdir-pkgconfig" >&5
21790 echo $ECHO_N "checking for --enable-libdir-pkgconfig... $ECHO_C" >&6; }
21791 if test "x$enable_libdir_pkgconfig" = xyes
21792 then
21793 LIBBURNIA_PKGCONFDIR="$libdir"/pkgconfig
21794 fi
21795 { echo "$as_me:$LINENO: result: $enable_libdir_pkgconfig" >&5
21796 echo "${ECHO_T}$enable_libdir_pkgconfig" >&6; }
21797 fi
21798
21799 libburnia_pkgconfig_override="no"
21800 # Check whether --enable-pkgconfig-path was given.
21801 if test "${enable_pkgconfig_path+set}" = set; then
21802 enableval=$enable_pkgconfig_path; libburnia_pkgconfig_override="yes"
21803 else
21804 enable_pkgconfig_path="none"
21805 fi
21806
21807 { echo "$as_me:$LINENO: checking for overridden pkgconfig directory path" >&5
21808 echo $ECHO_N "checking for overridden pkgconfig directory path... $ECHO_C" >&6; }
21809 if test "x$enable_pkgconfig_path" = xno
21810 then
21811 libburnia_pkgconfig_override="no"
21812 fi
21813 if test "x$enable_pkgconfig_path" = x -o "x$enable_pkgconfig_path" = xyes
21814 then
21815 libburnia_pkgconfig_override="invalid argument"
21816 fi
21817 if test "x$libburnia_pkgconfig_override" = xyes
21818 then
21819 LIBBURNIA_PKGCONFDIR="$enable_pkgconfig_path"
21820 { echo "$as_me:$LINENO: result: $LIBBURNIA_PKGCONFDIR" >&5
21821 echo "${ECHO_T}$LIBBURNIA_PKGCONFDIR" >&6; }
21822 else
21823 { echo "$as_me:$LINENO: result: $libburnia_pkgconfig_override" >&5
21824 echo "${ECHO_T}$libburnia_pkgconfig_override" >&6; }
21825 fi
21826
21827
21828 ### AC_MSG_RESULT([LIBBURNIA_PKGCONFDIR = $LIBBURNIA_PKGCONFDIR])
21829
21830
21831
2176521832
2176621833 ac_config_files="$ac_config_files Makefile doc/doxygen.conf version.h libburn-1.pc"
2176721834
2220622273 # report actual input values of CONFIG_FILES etc. instead of their
2220722274 # values after options handling.
2220822275 ac_log="
22209 This file was extended by libburn $as_me 0.6.4, which was
22276 This file was extended by libburn $as_me 0.7.0, which was
2221022277 generated by GNU Autoconf 2.60. Invocation command line was
2221122278
2221222279 CONFIG_FILES = $CONFIG_FILES
2225322320 _ACEOF
2225422321 cat >>$CONFIG_STATUS <<_ACEOF
2225522322 ac_cs_version="\\
22256 libburn config.status 0.6.4
22323 libburn config.status 0.7.0
2225722324 configured by $0, generated by GNU Autoconf 2.60,
2225822325 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
2225922326
2258522652 LIBTOOL_DEPS!$LIBTOOL_DEPS$ac_delim
2258622653 THREAD_LIBS!$THREAD_LIBS$ac_delim
2258722654 ARCH!$ARCH$ac_delim
22655 LIBBURNIA_PKGCONFDIR!$LIBBURNIA_PKGCONFDIR$ac_delim
2258822656 LIBBURN_ARCH_LIBS!$LIBBURN_ARCH_LIBS$ac_delim
2258922657 LIBOBJS!$LIBOBJS$ac_delim
2259022658 LTLIBOBJS!$LTLIBOBJS$ac_delim
2259122659 _ACEOF
2259222660
22593 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
22661 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then
2259422662 break
2259522663 elif $ac_last_try; then
2259622664 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
0 AC_INIT([libburn], [0.6.4], [http://libburnia-project.org])
0 AC_INIT([libburn], [0.7.0], [http://libburnia-project.org])
11 AC_PREREQ([2.50])
22 dnl AC_CONFIG_HEADER([config.h])
33
66
77 AM_INIT_AUTOMAKE([subdir-objects])
88
9 dnl Notes by ts A71207 - A81111 :
9 dnl Notes by ts A71207 - A90827 :
1010 dnl
1111 dnl Regrettably the meaning of the various version types was misunderstood
1212 dnl before version 0.4.1.
7070 dnl 0.6.0 = libburn.so.4.25.0
7171 dnl 0.6.2 = libburn.so.4.27.0
7272 dnl 0.6.4 = libburn.so.4.29.0
73 dnl 0.6.6 = libburn.so.4.31.0
74 dnl 0.6.8 = libburn.so.4.33.0
75 dnl 0.7.0 = libburn.so.4.35.0
7376 dnl
7477 dnl So LT_CURRENT, LT_REVISION and LT_AGE get set directly here.
7578 dnl SONAME of the emerging library is LT_CURRENT - LT_AGE.
9497 dnl
9598 dnl As said: Only copies. Original in libburn/libburn.h : burn_header_version_*
9699 BURN_MAJOR_VERSION=0
97 BURN_MINOR_VERSION=6
98 BURN_MICRO_VERSION=4
100 BURN_MINOR_VERSION=7
101 BURN_MICRO_VERSION=0
99102 BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
100103
101104 AC_SUBST(BURN_MAJOR_VERSION)
106109 dnl Libtool versioning
107110 LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
108111 dnl
109 dnl ts A90313
110 dnl This is the release version libburn-0.6.4 = libburn.so.4.29.0
112 dnl ts A90827
113 dnl This is the release version libburn-0.7.0 = libburn.so.4.35.0
111114 dnl ### This is the development version after above release version
112115 dnl LT_CURRENT++, LT_AGE++ has not yet happened.
113116 dnl ### LT_CURRENT++, LT_AGE++ has happened meanwhile.
114117 dnl
115 dnl SONAME = 33 - 29 = 4 . Linux library name = libburn.so.4.29.0
116 LT_CURRENT=33
117 LT_AGE=29
118 dnl SONAME = 39 - 35 = 4 . Linux library name = libburn.so.4.35.0
119 LT_CURRENT=39
120 LT_AGE=35
118121 LT_REVISION=0
119122 LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
120123
161164
162165 TARGET_SHIZZLE
163166 AC_SUBST(ARCH)
167 AC_SUBST(LIBBURNIA_PKGCONFDIR)
164168 AC_SUBST(LIBBURN_ARCH_LIBS)
165169
166170 dnl ts A90303
192196 CFLAGS="$CFLAGS -DDEBUG"
193197 fi
194198
199
200 dnl Determine target directory for libburn-*.pc
201 dnl Important: Must be performed _after_ TARGET_SHIZZLE
202 dnl
203 LIBBURNIA_SET_PKGCONFIG
204
205
195206 AC_CONFIG_FILES([
196207 Makefile
197208 doc/doxygen.conf
558558 }
559559
560560 /* ts A61007 : obsolete Assert in spc_select_write_params() */
561 if (d->drive_role == 1 && !d->mdata->valid) {
561 if (d->drive_role == 1 && d->mdata->valid <= 0) {
562562 libdax_msgs_submit(libdax_messenger,
563563 d->global_index, 0x00020113,
564564 LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
3939 /* A70903 : for burn_scsi_setup_drive() */
4040 #include "spc.h"
4141
42 /* A90815 : for mmc_obtain_profile_name() */
43 #include "mmc.h"
44
4245 #include "libdax_msgs.h"
4346 extern struct libdax_msgs *libdax_messenger;
4447
231234 /* ts A61020 : d->status was set to BURN_DISC_BLANK as pure guess */
232235
233236 /* ts A71128 : run read_disc_info() for any recognizeable profile */
234 if (d->current_profile > 0 ||
237 if (d->current_profile > 0 || d->current_is_guessed_profile ||
235238 d->mdata->cdr_write || d->mdata->cdrw_write ||
236239 d->mdata->dvdr_write || d->mdata->dvdram_write) {
237240
417420 struct burn_drive *burn_drive_finish_enum(struct burn_drive *d)
418421 {
419422 struct burn_drive *t;
423 char msg[BURN_DRIVE_ADR_LEN + 160];
424 int ret;
425
420426 /* ts A60821
421427 <<< debug: for tracing calls which might use open drive fds */
422428 int mmc_function_spy(struct burn_drive *d, char * text);
429435 mmc_function_spy(NULL, "enumerate_common : -------- doing grab");
430436
431437 /* try to get the drive info */
432 if (t->grab(t)) {
438 ret = t->grab(t);
439 if (ret) {
433440 burn_print(2, "getting drive info\n");
434441 t->getcaps(t);
435442 t->unlock(t);
436443 t->released = 1;
437444 } else {
438 burn_print(2, "unable to grab new located drive\n");
445 /* ts A90602 */
446 d->mdata->valid = -1;
447 sprintf(msg, "Unable to grab scanned drive %s", d->devname);
448 libdax_msgs_submit(libdax_messenger, d->global_index,
449 0x0002016f, LIBDAX_MSGS_SEV_DEBUG,
450 LIBDAX_MSGS_PRIO_LOW, msg, 0, 0);
439451 burn_drive_unregister(t);
440452 t = NULL;
441453 }
516528
517529 /* ts A61125 : outsourced model aspects */
518530 burn_drive_mark_unready(d);
531 return 1;
532 }
533
534
535 /* API */
536 /* ts A90824
537 @param flag bit0= wake up (else start snoozing)
538 */
539 int burn_drive_snooze(struct burn_drive *d, int flag)
540 {
541 if (d->drive_role != 1)
542 return 0;
543 if (flag & 1)
544 d->start_unit(d);
545 else
546 d->stop_unit(d);
519547 return 1;
520548 }
521549
854882 a ssert(d->mdata);
855883 #endif
856884
857 if (!d->idata->valid || !d->mdata->valid)
885 if(d->idata->valid <= 0 || d->mdata->valid <= 0)
858886 return 0;
859887
860888 id = (struct burn_scsi_inquiry_data *)d->idata;
920948 */
921949 unsigned char scanned[32];
922950 unsigned count = 0;
923 int i;
951 int i, ret;
924952
925953 /* ts A61007 : moved up to burn_drive_scan() */
926954 /* a ssert(burn_running); */
9771005 if (drive_array[i].global_index < 0)
9781006 continue; /* invalid device */
9791007
980 while (!drive_getcaps(&drive_array[i],
981 &(*drives)[*n_drives])) {
1008 /* ts A90602 : This old loop is not plausible. See A70907.
1009 while (!drive_getcaps(&drive_array[i],
1010 &(*drives)[*n_drives])) {
9821011 sleep(1);
983 }
984 (*n_drives)++;
1012 }
1013 */
1014 /* ts A90602 : A single call shall do (rather than a loop) */
1015 ret = drive_getcaps(&drive_array[i], &(*drives)[*n_drives]);
1016 if (ret > 0)
1017 (*n_drives)++;
9851018 scanned[i / 8] |= 1 << (i % 8);
1019 }
1020 if (*drives != NULL && *n_drives == 0) {
1021 free ((char *) *drives);
1022 *drives = NULL;
9861023 }
9871024
9881025 return(1);
11391176
11401177 int burn_drive_get_read_speed(struct burn_drive *d)
11411178 {
1142 if(!d->mdata->valid)
1179 if(d->mdata->valid <= 0)
11431180 return 0;
11441181 return d->mdata->max_read_speed;
11451182 }
11461183
11471184 int burn_drive_get_write_speed(struct burn_drive *d)
11481185 {
1149 if(!d->mdata->valid)
1186 if(d->mdata->valid <= 0)
11501187 return 0;
11511188 return d->mdata->max_write_speed;
11521189 }
11541191 /* ts A61021 : New API function */
11551192 int burn_drive_get_min_write_speed(struct burn_drive *d)
11561193 {
1157 if(!d->mdata->valid)
1194 if(d->mdata->valid <= 0)
11581195 return 0;
11591196 return d->mdata->min_write_speed;
11601197 }
17411778 unsigned long wait_grain= 100000;
17421779 time_t start_time, current_time, pacifier_time, end_time;
17431780
1781 #ifndef NIX
1782 time_t stdio_patience = 3;
1783 #endif
1784
17441785 current_time = start_time = pacifier_time = time(0);
17451786 end_time = start_time + patience;
17461787
17571798 if(occup == -2)
17581799 continue;
17591800
1801 if(drive_array[i].drive_role != 1) {
1802
17601803 #ifdef NIX
1761 /* <<< this causes a race condition with drive usage
1762 and drive disposal
1763 */
1764 if(drive_array[i].drive_role != 1) {
1804
1805 /* ts A90302
1806 <<< this causes a race condition with drive
1807 usage and drive disposal.
1808 */
17651809 drive_array[i].busy = BURN_DRIVE_IDLE;
17661810 burn_drive_forget(&(drive_array[i]), 1);
1767 } else
1768 #endif /* NIX */
1811 continue;
1812
1813 #else /* NIX */
1814
1815 /* ts A90318
1816 >>> but if a pipe breaks then the drive
1817 never gets idle.
1818 So for now with a short patience timespan
1819 and eventually a deliberate memory leak.
1820 */
1821 if (current_time - start_time >
1822 stdio_patience) {
1823 drive_array[i].global_index = -1;
1824 continue;
1825 }
1826
1827 #endif /* ! NIX */
1828
1829 }
17691830
17701831 if(occup <= 10) {
17711832 burn_drive_forget(&(drive_array[i]), 1);
18461907 }
18471908 if(d->drive_role != 1)
18481909 return 0;
1849 if (d->current_profile == -1 || d->current_is_cd_profile) {
1910 if ((d->current_profile == -1 || d->current_is_cd_profile)
1911 && (d->mdata->cdrw_write || d->current_profile != 0x08)) {
18501912 d->read_atip(d);
18511913 /* >>> some control of success would be nice :) */
18521914 } else {
1853 /* mmc5r03c.pdf 6.26.3.6.3 : ATIP is undefined for non-CD */;
1915 /* mmc5r03c.pdf 6.26.3.6.3 : ATIP is undefined for non-CD
1916 (and it seems meaningless for non-burners).
1917 ts A90823: Pseudo-CD U3 memory stick stalls with ATIP.
1918 It is !cdrw_write and profile is 0x08.
1919 */
18541920 return 0;
18551921 }
18561922 return 1;
19552021 *pno = d->current_profile;
19562022 strcpy(name,d->current_profile_text);
19572023 return *pno >= 0;
2024 }
2025
2026
2027 /* ts A90815 : New API function */
2028 int burn_drive_get_all_profiles(struct burn_drive *d, int *num_profiles,
2029 int profiles[64], char is_current[64])
2030 {
2031 int i;
2032
2033 *num_profiles = d->num_profiles;
2034 for (i = 0; i < d->num_profiles; i++) {
2035 profiles[i] = (d->all_profiles[i * 4] << 8) |
2036 d->all_profiles[i * 4 + 1];
2037 is_current[i] = d->all_profiles[i * 4 + 2] & 1;
2038 }
2039 return 1;
2040 }
2041
2042
2043 /* ts A90815 : New API function */
2044 int burn_obtain_profile_name(int profile_number, char name[80])
2045 {
2046 strcpy(name, mmc_obtain_profile_name(profile_number));
2047 return(name[0] != 0);
19582048 }
19592049
19602050
20572147 struct burn_speed_descriptor *sd, *csd = NULL;
20582148
20592149 (*speed_list) = NULL;
2060 if(!d->mdata->valid)
2150 if(d->mdata->valid <= 0)
20612151 return 0;
20622152 for (sd = d->mdata->speed_descriptors; sd != NULL; sd = sd->next) {
20632153 ret = burn_speed_descriptor_new(&csd, NULL, csd, 0);
20822172 if (speed_goal < 0)
20832173 best_speed = 2000000000;
20842174 *best_descr = NULL;
2085 if(!d->mdata->valid)
2175 if(d->mdata->valid <= 0)
20862176 return 0;
20872177 for (sd = d->mdata->speed_descriptors; sd != NULL; sd = sd->next) {
20882178 if (flag & 1)
10261026 @return 1 if it was possible to grab the drive, else 0
10271027 */
10281028 int burn_drive_grab(struct burn_drive *drive, int load);
1029
1030
1031 /* ts A90824 */
1032 /** Calm down or alert a drive. Some drives stay alert after reading for
1033 quite some time. This saves time with the startup for the next read
1034 operation but also causes noise and consumes extra energy. It makes
1035 sense to calm down the drive if no read operation is expected for the
1036 next few seconds. The drive will get alert automatically if operations
1037 are required.
1038 @param drive The drive to influence.
1039 @param flag Bitfield for control purposes
1040 bit0= become alert (else start snoozing)
1041 This is not mandatory to allow further drive operations
1042 @return 1= success , 0= drive role not suitable for calming
1043 @since 0.7.0
1044 */
1045 int burn_drive_snooze(struct burn_drive *d, int flag);
10291046
10301047
10311048 /** Release a drive. This should not be done until the drive is no longer
19972014 void burn_read_opts_set_hardware_error_retries(struct burn_read_opts *opts,
19982015 unsigned char hardware_error_retries);
19992016
2017
2018 /* ts A90815 */
2019 /** Gets the list of profile codes supported by the drive.
2020 Profiles depict the feature sets which constitute media types. For
2021 known profile codes and names see burn_disc_get_profile().
2022 @param d is the drive to query
2023 @param num_profiles returns the number of supported profiles
2024 @param profiles returns the profile codes
2025 @param is_current returns the status of the corresponding profile code:
2026 1= current, i.e. the matching media is loaded
2027 0= not current, i.e. the matching media is not loaded
2028 @return always 1 for now
2029 @since 0.7.0
2030 */
2031 int burn_drive_get_all_profiles(struct burn_drive *d, int *num_profiles,
2032 int profiles[64], char is_current[64]);
2033
2034
2035 /* ts A90815 */
2036 /** Obtains the profile name associated with a profile code.
2037 @param profile_code the profile code to be translated
2038 @param name returns the profile name (e.g. "DVD+RW")
2039 @return 1= known profile code , 0= unknown profile code
2040 @since 0.7.0
2041 */
2042 int burn_obtain_profile_name(int profile_code, char name[80]);
2043
2044
20002045 /** Gets the maximum write speed for a drive and eventually loaded media.
20012046 The return value might change by the media type of already loaded media,
20022047 again by call burn_drive_grab() and again by call burn_disc_read_atip().
22582303
22592304 */
22602305 #define burn_header_version_major 0
2261 #define burn_header_version_minor 6
2262 #define burn_header_version_micro 4
2306 #define burn_header_version_minor 7
2307 #define burn_header_version_micro 0
22632308 /** Note:
22642309 Above version numbers are also recorded in configure.ac because libtool
22652310 wants them as parameters at build time.
544544 0x0002016a (FAILURE,HIGH) = No MMC transport adapter is present
545545 0x0002016b (WARNING,HIGH) = No MMC transport adapter is present
546546 0x0002016c (DEBUG,HIGH) = No MMC transport adapter is present
547
547 0x0002016e (DEBUG,HIGH) = MODE SENSE page 2A too short
548 0x0002016f (DEBUG,HIGH) = Unable to grab scanned drive
548549 0x00020170 (NOTE,HIGH) = Closing open session before writing new one
549550 0x00020171 (NOTE,HIGH) = Closing BD-R with accidently open session
550551
7575 actually formatting the media.
7676 # define Libburn_do_not_format_dvd_ram_or_bd_rE 1
7777 */
78
79
80 /* ts A90603 : Simulate the command restrictions of an old MMC-1 drive
81 # define Libisofs_simulate_old_mmc1_drivE 1
82 */
83
7884
7985 /* DVD/BD progress report:
8086 ts A61219 : It seems to work with a used (i.e. thoroughly formatted) DVD+RW.
229235 d->cancel = 1;
230236 return 0;
231237 }
238 if (d->is_stopped && strcmp(text, "stop_unit") != 0 &&
239 strcmp(text, "start_unit") != 0) {
240 d->start_unit(d);
241 d->is_stopped = 0;
242 }
232243 return 1;
233244 }
234245
11521163 struct buffer buf;
11531164 struct command c;
11541165 int dlen;
1155 int i, bpl= 12, old_alloc_len, t_idx;
1166 int i, bpl= 12, old_alloc_len, t_idx, ret;
11561167 unsigned char *tdata;
11571168 char msg[321];
11581169
11781189 d->status = BURN_DISC_FULL;
11791190 return 1;
11801191 }
1192
1193 /* ts A90823:
1194 SanDisk Cruzer U3 memory stick stalls on format 2.
1195 Format 0 seems to be more conservative with read-only drives.
1196 */
1197 if (!(d->mdata->cdrw_write || d->current_profile != 0x08)) {
1198 ret = mmc_read_toc_fmt0(d);
1199 return ret;
1200 }
1201
11811202 scsi_init_command(&c, MMC_GET_TOC, sizeof(MMC_GET_TOC));
11821203 /*
11831204 memcpy(c.opcode, MMC_GET_TOC, sizeof(MMC_GET_TOC));
14591480 }
14601481
14611482
1462 static int mmc_read_disc_info_al(struct burn_drive *d, int *alloc_len)
1463 {
1464 struct buffer buf;
1465 unsigned char *data;
1466 struct command c;
1467 char msg[160];
1468 /* ts A70131 : had to move mmc_read_toc() to end of function */
1469 int do_read_toc = 0, disc_status, len, old_alloc_len;
1470 int ret, number_of_sessions = -1;
1471
1472 /* ts A61020 */
1473 d->start_lba = d->end_lba = -2000000000;
1474 d->erasable = 0;
1475 d->last_track_no = 1;
1476
1477 /* ts A70212 - A70215 */
1478 d->media_capacity_remaining = 0;
1479 d->media_lba_limit = 0;
1480
1481 /* ts A81210 */
1482 d->media_read_capacity = 0x7fffffff;
1483
1484 /* ts A61202 */
1485 d->toc_entries = 0;
1486 if (d->status == BURN_DISC_EMPTY)
1487 return 1;
1488
1489 mmc_get_configuration(d);
1490
1491 /* ts A70910 : found this as condition for mmc_function_spy() which went up
1492 if (*alloc_len < 2)
1493 */
1494
1495 scsi_init_command(&c, MMC_GET_DISC_INFO, sizeof(MMC_GET_DISC_INFO));
1496 /*
1497 memcpy(c.opcode, MMC_GET_DISC_INFO, sizeof(MMC_GET_DISC_INFO));
1498 c.oplen = sizeof(MMC_GET_DISC_INFO);
1499 */
1500 c.dxfer_len = *alloc_len;
1501 c.opcode[7]= (c.dxfer_len >> 8) & 0xff;
1502 c.opcode[8]= c.dxfer_len & 0xff;
1503 c.retry = 1;
1504 c.page = &buf;
1505 c.page->sectors = 0;
1506 c.page->bytes = 0;
1507 c.dir = FROM_DRIVE;
1508 d->issue_command(d, &c);
1509
1510 if (c.error) {
1511 d->busy = BURN_DRIVE_IDLE;
1512 return 0;
1513 }
1514
1515 data = c.page->data;
1516 len = (data[0] << 8) | data[1];
1517 old_alloc_len = *alloc_len;
1518 *alloc_len = len + 2;
1519 if (old_alloc_len < 34)
1520 return 1;
1521 if (*alloc_len < 24) /* data[23] is the last byte used here */
1522 return 0;
1523 if (len + 2 > old_alloc_len)
1524 len = old_alloc_len - 2;
1525
1526 d->erasable = !!(data[2] & 16);
1527
1528 disc_status = data[2] & 3;
1529 d->state_of_last_session = (data[2] >> 2) & 3;
1530 number_of_sessions = (data[9] << 8) | data[4];
1531
1532 if (d->current_profile == 0x10 || d->current_profile == 0x40) {
1533 /* DVD-ROM , BD-ROM */
1534 disc_status = 2; /* always full and finalized */
1535 d->erasable = 0; /* never erasable */
1536 }
1537
1538 /* ts A80207 : DVD - R DL can normally be read but not be written */
1539 if(d->current_profile == 0x15 && !burn_support_untested_profiles) {
1540 disc_status = 2; /* always full and finalized */
1541 d->erasable = 0; /* never erasable */
1542 }
1543
1544 #ifdef Libburn_support_bd_r_readonlY
1545 /* <<< For now: declaring BD-R read-only
1546 */
1547 #ifndef Libburn_support_bd_plus_r_srM
1548 if (d->current_profile == 0x41) {
1549 /* BD-R seq as readonly dummy */
1550 disc_status = 2; /* always full and finalized */
1551 d->erasable = 0; /* never erasable */
1552 }
1553 #endif
1554 if (d->current_profile == 0x42) {
1555 /* BD-R rnd */
1556 disc_status = 2; /* always full and finalized */
1557 d->erasable = 0; /* never erasable */
1558 }
1559 #endif /* Libburn_support_bd_r_readonlY */
1560
1561 switch (disc_status) {
1562 case 0:
1563 regard_as_blank:;
1564 d->toc_entries = 0;
1565 d->start_lba = burn_msf_to_lba(data[17], data[18], data[19]);
1566 d->end_lba = burn_msf_to_lba(data[21], data[22], data[23]);
1567
1568 /*
1569 fprintf(stderr, "libburn_experimental: start_lba = %d (%d %d %d) , end_lba = %d (%d %d %d)\n",
1570 d->start_lba, data[17], data[18], data[19],
1571 d->end_lba, data[21], data[22], data[23]);
1572 */
1573
1574 d->status = BURN_DISC_BLANK;
1575 break;
1576 case 1:
1577 d->status = BURN_DISC_APPENDABLE;
1578
1579 case 2:
1580 if (disc_status == 2)
1581 d->status = BURN_DISC_FULL;
1582
1583 /* ts A81210 */
1584 ret = mmc_read_capacity(d);
1585 /* Freshly formatted, unwritten BD-R pretend to be appendable
1586 but in our model they need to be regarded as blank.
1587 Criterion: BD-R seq, read capacity known and 0,
1588 declared appendable, single empty session
1589 */
1590 if (d->current_profile == 0x41 &&
1591 d->status == BURN_DISC_APPENDABLE &&
1592 ret > 0 && d->media_read_capacity == 0 &&
1593 d->state_of_last_session == 0 && number_of_sessions == 1)
1594 goto regard_as_blank;
1595
1596 if (d->current_profile == 0x41 &&
1597 d->status == BURN_DISC_APPENDABLE &&
1598 d->state_of_last_session == 1) {
1599
1600 /* ??? apply this test to other media types ? */
1601
1602 libdax_msgs_submit(libdax_messenger, d->global_index,
1603 0x00020169,
1604 LIBDAX_MSGS_SEV_WARNING, LIBDAX_MSGS_PRIO_HIGH,
1605 "Last session on media is still open.", 0, 0);
1606 }
1607
1608 do_read_toc = 1;
1609 break;
1610 }
1611
1612 if ((d->current_profile != 0 || d->status != BURN_DISC_UNREADY)
1613 && ! d->current_is_supported_profile) {
1614 if (!d->silent_on_scsi_error) {
1615 sprintf(msg,
1616 "Unsuitable media detected. Profile %4.4Xh %s",
1617 d->current_profile, d->current_profile_text);
1618 libdax_msgs_submit(libdax_messenger, d->global_index,
1619 0x0002011e,
1620 LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
1621 msg, 0,0);
1622 }
1623 d->status = BURN_DISC_UNSUITABLE;
1624 return 0;
1625 }
1626
1627 /* >>> ts A61217 : Note for future
1628 growisofs performs OPC if (data[0]<<8)|data[1]<=32
1629 which indicates no OPC entries are attached to the
1630 reply from the drive.
1631 */
1632
1633 /* ts A61219 : mmc5r03c.pdf 6.22.3.1.13 BG Format Status
1634 0=blank (not yet started)
1635 1=started but neither running nor complete
1636 2=in progress
1637 3=completed
1638 */
1639 d->bg_format_status = data[7] & 3;
1640
1641 /* Preliminarily declare blank:
1642 ts A61219 : DVD+RW (is not bg_format_status==0 "blank")
1643 ts A61229 : same for DVD-RW Restricted overwrite
1644 ts A70112 : same for DVD-RAM
1645 */
1646 if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
1647 d->current_profile == 0x12 || d->current_profile == 0x43)
1648 d->status = BURN_DISC_BLANK;
1649
1650 if (d->status == BURN_DISC_BLANK) {
1651 d->last_track_no = 1; /* The "incomplete track" */
1652 d->complete_sessions = 0;
1653 } else {
1654 /* ts A70131 : number of non-empty sessions */
1655 d->complete_sessions = number_of_sessions;
1656 /* mmc5r03c.pdf 6.22.3.1.3 State of Last Session: 3=complete */
1657 if (d->state_of_last_session != 3 && d->complete_sessions >= 1)
1658 d->complete_sessions--;
1659
1660 /* ts A70129 : mmc5r03c.pdf 6.22.3.1.7
1661 This includes the "incomplete track" if the disk is
1662 appendable. I.e number of complete tracks + 1. */
1663 d->last_track_no = (data[11] << 8) | data[6];
1664 }
1665 if (d->current_profile != 0x0a && d->current_profile != 0x13 &&
1666 d->current_profile != 0x14 && d->status != BURN_DISC_FULL)
1667 d->erasable = 0; /* stay in sync with burn_disc_erase() */
1668
1669 if (do_read_toc)
1670 mmc_read_toc(d);
1671 return 1;
1672 }
1673
1674
1675 void mmc_read_disc_info(struct burn_drive *d)
1676 {
1677 int alloc_len = 34, ret;
1678
1679 if (mmc_function_spy(d, "mmc_read_disc_info") <= 0)
1680 return;
1681
1682 ret = mmc_read_disc_info_al(d, &alloc_len);
1683 /*
1684 fprintf(stderr,"LIBBURN_DEBUG: 51h alloc_len = %d , ret = %d\n",
1685 alloc_len, ret);
1686 */
1687 /* for now there is no need to inquire the variable lenght part */
1688 }
1689
1690
1691 void mmc_read_atip(struct burn_drive *d)
1692 {
1693 struct buffer buf;
1694 struct command c;
1695 int alloc_len = 28;
1696
1697 /* ts A61021 */
1698 unsigned char *data;
1699 /* Speed values from A1:
1700 With 4 cdrecord tells "10" or "8" where MMC-1 says "8".
1701 cdrecord "8" appear on 4xCD-RW and thus seem to be quite invalid.
1702 My CD-R (>=24 speed) tell no A1.
1703 The higher non-MMC-1 values are hearsay.
1704 */
1705 /* 0, 2, 4, 6, 10, -, 16, -, */
1706 static int speed_value[16]= { 0, 353, 706, 1059, 1764, -5, 2824, -7,
1707 4234, 5646, 7056, 8468, -12, -13, -14, -15};
1708 /* 24, 32, 40, 48, -, -, -, - */
1709
1710 if (mmc_function_spy(d, "mmc_read_atip") <= 0)
1711 return;
1712
1713 scsi_init_command(&c, MMC_GET_ATIP, sizeof(MMC_GET_ATIP));
1714 /*
1715 memcpy(c.opcode, MMC_GET_ATIP, sizeof(MMC_GET_ATIP));
1716 c.oplen = sizeof(MMC_GET_ATIP);
1717 */
1718 c.dxfer_len = alloc_len;
1719 c.opcode[7]= (c.dxfer_len >> 8) & 0xff;
1720 c.opcode[8]= c.dxfer_len & 0xff;
1721 c.retry = 1;
1722 c.page = &buf;
1723 c.page->bytes = 0;
1724 c.page->sectors = 0;
1725
1726 c.dir = FROM_DRIVE;
1727 d->issue_command(d, &c);
1728 burn_print(1, "atip shit for you\n");
1729
1730
1731 /* ts A61021 */
1732 data = c.page->data;
1733 d->erasable= !!(data[6]&64);
1734 d->start_lba= burn_msf_to_lba(data[8],data[9],data[10]);
1735 d->end_lba= burn_msf_to_lba(data[12],data[13],data[14]);
1736 if (data[6]&4) {
1737 if (speed_value[(data[16]>>4)&7] > 0) {
1738 d->mdata->min_write_speed =
1739 speed_value[(data[16]>>4)&7];
1740 if (speed_value[(data[16])&15] <= 0)
1741 d->mdata->max_write_speed =
1742 speed_value[(data[16]>>4)&7];
1743 }
1744 if (speed_value[(data[16])&15] > 0) {
1745 d->mdata->max_write_speed =
1746 speed_value[(data[16])&15];
1747 if (speed_value[(data[16]>>4)&7] <= 0)
1748 d->mdata->min_write_speed =
1749 speed_value[(data[16])&15];
1750 }
1751 }
1752
1753 #ifdef Burn_mmc_be_verbous_about_atiP
1754 { int i;
1755 fprintf(stderr,"libburn_experimental: Returned ATIP Data\n");
1756 for(i= 0; i<28; i++)
1757 fprintf(stderr,"%3.3d (0x%2.2x)%s",
1758 data[i],data[i],((i+1)%5 ? " ":"\n"));
1759 fprintf(stderr,"\n");
1760
1761 fprintf(stderr,
1762 "libburn_experimental: Indicative Target Writing Power= %d\n",
1763 (data[4]>>4)&7);
1764 fprintf(stderr,
1765 "libburn_experimental: Reference speed= %d ->%d\n",
1766 data[4]&7, speed_value[data[4]&7]);
1767 fprintf(stderr,
1768 "libburn_experimental: Is %sunrestricted\n",
1769 (data[5]&64?"":"not "));
1770 fprintf(stderr,
1771 "libburn_experimental: Is %serasable, sub-type %d\n",
1772 (data[6]&64?"":"not "),(data[6]>>3)&3);
1773 fprintf(stderr,
1774 "libburn_experimental: lead in: %d (%-2.2d:%-2.2d/%-2.2d)\n",
1775 burn_msf_to_lba(data[8],data[9],data[10]),
1776 data[8],data[9],data[10]);
1777 fprintf(stderr,
1778 "libburn_experimental: lead out: %d (%-2.2d:%-2.2d/%-2.2d)\n",
1779 burn_msf_to_lba(data[12],data[13],data[14]),
1780 data[12],data[13],data[14]);
1781 if(data[6]&4)
1782 fprintf(stderr,
1783 "libburn_experimental: A1 speed low %d speed high %d\n",
1784 speed_value[(data[16]>>4)&7], speed_value[(data[16])&7]);
1785 if(data[6]&2)
1786 fprintf(stderr,
1787 "libburn_experimental: A2 speed low %d speed high %d\n",
1788 speed_value[(data[20]>>4)&7], speed_value[(data[20])&7]);
1789 if(data[6]&1)
1790 fprintf(stderr,
1791 "libburn_experimental: A3 speed low %d speed high %d\n",
1792 speed_value[(data[24]>>4)&7], speed_value[(data[24])&7]);
1793 }
1794
1795 #endif /* Burn_mmc_be_verbous_about_atiP */
1796
1797 /* ts A61020
1798 http://www.t10.org/ftp/t10/drafts/mmc/mmc-r10a.pdf , table 77 :
1799
1800 0 ATIP Data Length MSB
1801 1 ATIP Data Length LSB
1802 2 Reserved
1803 3 Reserved
1804 4 bit7=1, bit4-6="Indicative Target Writing Power", bit3=reserved ,
1805 bit0-2="Reference speed"
1806 5 bit7=0, bit6="URU" , bit0-5=reserved
1807 6 bit7=1, bit6="Disc Type", bit3-4="Disc Sub-Type",
1808 bit2="A1", bit1="A2", bit0="A3"
1809 7 reserved
1810 8 ATIP Start Time of lead-in (Min)
1811 9 ATIP Start Time of lead-in (Sec)
1812 10 ATIP Start Time of lead-in (Frame)
1813 11 reserved
1814 12 ATIP Last Possible Start Time of lead-out (Min)
1815 13 ATIP Last Possible Start Time of lead-out (Sec)
1816 14 ATIP Last Possible Start Time of lead-out (Frame)
1817 15 reserved
1818 16 bit7=0, bit4-6="Lowest Usable CLV Recording speed"
1819 bit0-3="Highest Usable CLV Recording speed"
1820 17 bit7=0, bit4-6="Power Multiplication Factor p",
1821 bit1-3="Target y value of the Modulation/Power function", bit0=reserved
1822 18 bit7=1, bit4-6="Recommended Erase/Write Power Ratio (P(inf)/W(inf))"
1823 bit0-3=reserved
1824 19 reserved
1825 20-22 A2 Values
1826 23 reserved
1827 24-26 A3 Values
1828 27 reserved
1829
1830 Disc Type - zero indicates CD-R media; one indicates CD-RW media.
1831
1832 Disc Sub-Type - shall be set to zero.
1833
1834 A1 - when set to one, indicates that bytes 16-18 are valid.
1835
1836 Lowest Usable CLV Recording Speed
1837 000b Reserved
1838 001b 2X
1839 010b - 111b Reserved
1840
1841 Highest CLV Recording Speeds
1842 000b Reserved
1843 001b 2X
1844 010b 4X
1845 011b 6X
1846 100b 8X
1847 101b - 111b Reserved
1848
1849 MMC-3 seems to recommend MODE SENSE (5Ah) page 2Ah rather than A1, A2, A3.
1850 This page is loaded in libburn function spc_sense_caps() .
1851 Speed is given in kbytes/sec there. But i suspect this to be independent
1852 of media. So one would habe to associate the speed descriptor blocks with
1853 the ATIP media characteristics ? How ?
1854
1855 */
1856 }
1857
1858 void mmc_read_sectors(struct burn_drive *d,
1859 int start,
1860 int len,
1861 const struct burn_read_opts *o, struct buffer *buf)
1862 {
1863 int temp;
1864 int errorblock, req;
1865 struct command c;
1866
1867 if (mmc_function_spy(d, "mmc_read_sectors") <= 0)
1868 return;
1869
1870 /* ts A61009 : to be ensured by callers */
1871 /* a ssert(len >= 0); */
1872
1873 /* if the drive isn't busy, why the hell are we here? */
1874 /* ts A61006 : i second that question */
1875 /* a ssert(d->busy); */
1876
1877 burn_print(12, "reading %d from %d\n", len, start);
1878
1879 scsi_init_command(&c, MMC_READ_CD, sizeof(MMC_READ_CD));
1880 /*
1881 memcpy(c.opcode, MMC_READ_CD, sizeof(MMC_READ_CD));
1882 c.oplen = sizeof(MMC_READ_CD);
1883 */
1884 c.retry = 1;
1885 temp = start;
1886 c.opcode[5] = temp & 0xFF;
1887 temp >>= 8;
1888 c.opcode[4] = temp & 0xFF;
1889 temp >>= 8;
1890 c.opcode[3] = temp & 0xFF;
1891 temp >>= 8;
1892 c.opcode[2] = temp & 0xFF;
1893 c.opcode[8] = len & 0xFF;
1894 len >>= 8;
1895 c.opcode[7] = len & 0xFF;
1896 len >>= 8;
1897 c.opcode[6] = len & 0xFF;
1898 req = 0xF8;
1899
1900 /* ts A61106 : LG GSA-4082B dislikes this. key=5h asc=24h ascq=00h
1901
1902 if (d->busy == BURN_DRIVE_GRABBING || o->report_recovered_errors)
1903 req |= 2;
1904 */
1905
1906 c.opcode[10] = 0;
1907 /* always read the subcode, throw it away later, since we don't know
1908 what we're really reading
1909 */
1910 if (d->busy == BURN_DRIVE_GRABBING || (o->subcodes_audio)
1911 || (o->subcodes_data))
1912 c.opcode[10] = 1;
1913
1914 c.opcode[9] = req;
1915 c.page = buf;
1916 c.dir = FROM_DRIVE;
1917 d->issue_command(d, &c);
1918
1919 if (c.error) {
1920 burn_print(12, "got an error over here\n");
1921 burn_print(12, "%d, %d, %d, %d\n", c.sense[3], c.sense[4],
1922 c.sense[5], c.sense[6]);
1923 errorblock =
1924 (c.sense[3] << 24) + (c.sense[4] << 16) +
1925 (c.sense[5] << 8) + c.sense[6];
1926 c.page->sectors = errorblock - start + 1;
1927 burn_print(1, "error on block %d\n", errorblock);
1928 burn_print(12, "error on block %d\n", errorblock);
1929 burn_print(12, "returning %d sectors\n", c.page->sectors);
1930 }
1931 }
1932
1933 void mmc_erase(struct burn_drive *d, int fast)
1934 {
1935 struct command c;
1936
1937 if (mmc_function_spy(d, "mmc_erase") <= 0)
1938 return;
1939
1940 scsi_init_command(&c, MMC_BLANK, sizeof(MMC_BLANK));
1941 /*
1942 memcpy(c.opcode, MMC_BLANK, sizeof(MMC_BLANK));
1943 c.oplen = sizeof(MMC_BLANK);
1944 */
1945 c.opcode[1] = 16; /* IMMED set to 1 */
1946 c.opcode[1] |= !!fast;
1947 c.retry = 1;
1948 c.page = NULL;
1949 c.dir = NO_TRANSFER;
1950 d->issue_command(d, &c);
1951 }
1952
1953 void mmc_read_lead_in(struct burn_drive *d, struct buffer *buf)
1954 {
1955 int len;
1956 struct command c;
1957
1958 if (mmc_function_spy(d, "mmc_read_lead_in") <= 0)
1959 return;
1960
1961 len = buf->sectors;
1962 scsi_init_command(&c, MMC_READ_CD, sizeof(MMC_READ_CD));
1963 /*
1964 memcpy(c.opcode, MMC_READ_CD, sizeof(MMC_READ_CD));
1965 c.oplen = sizeof(MMC_READ_CD);
1966 */
1967 c.retry = 1;
1968 c.opcode[5] = 0;
1969 c.opcode[4] = 0;
1970 c.opcode[3] = 0;
1971 c.opcode[2] = 0xF0;
1972 c.opcode[8] = 1;
1973 c.opcode[7] = 0;
1974 c.opcode[6] = 0;
1975 c.opcode[9] = 0;
1976 c.opcode[10] = 2;
1977 c.page = buf;
1978 c.dir = FROM_DRIVE;
1979 d->issue_command(d, &c);
1980 }
1981
1982 void mmc_perform_opc(struct burn_drive *d)
1983 {
1984 struct command c;
1985
1986 if (mmc_function_spy(d, "mmc_perform_opc") <= 0)
1987 return;
1988
1989 scsi_init_command(&c, MMC_SEND_OPC, sizeof(MMC_SEND_OPC));
1990 /*
1991 memcpy(c.opcode, MMC_SEND_OPC, sizeof(MMC_SEND_OPC));
1992 c.oplen = sizeof(MMC_SEND_OPC);
1993 */
1994 c.retry = 1;
1995 c.opcode[1] = 1;
1996 c.page = NULL;
1997 c.dir = NO_TRANSFER;
1998 d->issue_command(d, &c);
1999 }
2000
2001
2002 /* ts A61221 : Learned much from dvd+rw-tools-7.0 set_speed_B6h() but then
2003 made own experiments on base of mmc5r03c.pdf 6.8.3 and 6.39 in the hope
2004 to achieve a leaner solution
2005 ts A70712 : That leaner solution does not suffice for my LG GSA-4082B.
2006 Meanwhile there is a speed descriptor list anyway.
2007 */
2008 int mmc_set_streaming(struct burn_drive *d,
2009 int r_speed, int w_speed, int end_lba)
2010 {
2011 struct buffer buf;
2012 struct command c;
2013 int b, eff_end_lba;
2014 char msg[256];
2015 unsigned char *pd;
2016 int key, asc, ascq;
2017
2018 if (mmc_function_spy(d, "mmc_set_streaming") <= 0)
2019 return 0;
2020
2021 scsi_init_command(&c, MMC_SET_STREAMING, sizeof(MMC_SET_STREAMING));
2022 /*
2023 c.oplen = sizeof(MMC_SET_STREAMING);
2024 memcpy(c.opcode, MMC_SET_STREAMING, sizeof(MMC_SET_STREAMING));
2025 */
2026 c.retry = 1;
2027 c.page = &buf;
2028 c.page->bytes = 28;
2029 c.opcode[9] = (c.page->bytes >> 8) & 0xff;
2030 c.opcode[10] = c.page->bytes & 0xff;
2031 c.page->sectors = 0;
2032 c.dir = TO_DRIVE;
2033 memset(c.page->data, 0, c.page->bytes);
2034 pd = c.page->data;
2035
2036 pd[0] = 0; /* WRC=0 (Default Rotation Control), RDD=Exact=RA=0 */
2037
2038 if (w_speed == 0)
2039 w_speed = 0x10000000; /* ~ 2 TB/s */
2040 else if (w_speed < 0)
2041 w_speed = 177; /* 1x CD */
2042 if (r_speed == 0)
2043 r_speed = 0x10000000; /* ~ 2 TB/s */
2044 else if (r_speed < 0)
2045 r_speed = 177; /* 1x CD */
2046 if (end_lba == 0) {
2047 /* Default computed from 4.7e9 */
2048 eff_end_lba = 2294921 - 1;
2049 if (d->mdata->max_end_lba > 0)
2050 eff_end_lba = d->mdata->max_end_lba - 1;
2051 } else
2052 eff_end_lba = end_lba;
2053
2054 sprintf(msg, "mmc_set_streaming: end_lba=%d , r=%d , w=%d",
2055 end_lba, r_speed, w_speed);
2056 libdax_msgs_submit(libdax_messenger, d->global_index, 0x00000002,
2057 LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
2058 msg, 0, 0);
2059
2060 /* start_lba is 0 , 1000 = 1 second as base time for data rate */
2061 for (b = 0; b < 4 ; b++) {
2062 pd[8+b] = (end_lba >> (24 - 8 * b)) & 0xff;
2063 pd[12+b] = (r_speed >> (24 - 8 * b)) & 0xff;
2064 pd[16+b] = (1000 >> (24 - 8 * b)) & 0xff;
2065 pd[20+b] = (w_speed >> (24 - 8 * b)) & 0xff;
2066 pd[24+b] = (1000 >> (24 - 8 * b)) & 0xff;
2067 }
2068
2069 /* <<<
2070 fprintf(stderr,"LIBBURN_EXPERIMENTAL : B6h Performance descriptor:\n");
2071 for (b = 0; b < 28 ; b++)
2072 fprintf(stderr, "%2.2X%c", pd[b], ((b+1)%4 ? ' ' : '\n'));
2073 */
2074
2075
2076 d->issue_command(d, &c);
2077 if (c.error) {
2078 if (c.sense[2]!=0 && !d->silent_on_scsi_error) {
2079
2080 #ifdef NIX
2081 sprintf(msg,
2082 "SCSI error on set_streaming(%d): key=%X asc=%2.2Xh ascq=%2.2Xh",
2083 w_speed,
2084 c.sense[2],c.sense[12],c.sense[13]);
2085 libdax_msgs_submit(libdax_messenger,
2086 d->global_index,
2087 0x00020124,
2088 LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
2089 msg, 0, 0);
2090 #else /* NIX */
2091
2092 sprintf(msg,
2093 "SCSI error on set_streaming(%d): ", w_speed);
2094 scsi_error_msg(d, c.sense, 14, msg + strlen(msg),
2095 &key, &asc, &ascq);
2096
2097 #endif /* !NIX */
2098
2099 }
2100 return 0;
2101 }
2102 return 1;
2103 }
2104
2105
2106 void mmc_set_speed(struct burn_drive *d, int r, int w)
2107 {
2108 struct command c;
2109 int ret, end_lba = 0;
2110 struct burn_speed_descriptor *best_sd = NULL;
2111
2112 if (mmc_function_spy(d, "mmc_set_speed") <= 0)
2113 return;
2114
2115 if (r <= 0 || w <= 0) {
2116 /* ts A70712 : now searching for best speed descriptor */
2117 if (w > 0 && r <= 0)
2118 burn_drive_get_best_speed(d, r, &best_sd, 1);
2119 else
2120 burn_drive_get_best_speed(d, w, &best_sd, 0);
2121 if (best_sd != NULL) {
2122 w = best_sd->write_speed;
2123 d->nominal_write_speed = w;
2124 r = best_sd->read_speed;
2125 end_lba = best_sd->end_lba;
2126 }
2127 }
2128
2129 /* A70711 */
2130 d->nominal_write_speed = w;
2131
2132 /* ts A61221 : try to set DVD speed via command B6h */
2133 if (strstr(d->current_profile_text, "DVD") == d->current_profile_text){
2134 ret = mmc_set_streaming(d, r, w, end_lba);
2135 if (ret != 0)
2136 return; /* success or really fatal failure */
2137 }
2138
2139 /* ts A61112 : MMC standards prescribe FFFFh as max speed.
2140 But libburn.h prescribes 0.
2141 ts A70715 : <0 now means minimum speed */
2142 if (r == 0 || r > 0xffff)
2143 r = 0xffff;
2144 else if (r < 0)
2145 r = 177; /* 1x CD */
2146 if (w == 0 || w > 0xffff)
2147 w = 0xffff;
2148 else if (w < 0)
2149 w = 177; /* 1x CD */
2150
2151 scsi_init_command(&c, MMC_SET_SPEED, sizeof(MMC_SET_SPEED));
2152 /*
2153 memcpy(c.opcode, MMC_SET_SPEED, sizeof(MMC_SET_SPEED));
2154 c.oplen = sizeof(MMC_SET_SPEED);
2155 */
2156 c.retry = 1;
2157 c.opcode[2] = r >> 8;
2158 c.opcode[3] = r & 0xFF;
2159 c.opcode[4] = w >> 8;
2160 c.opcode[5] = w & 0xFF;
2161 c.page = NULL;
2162 c.dir = NO_TRANSFER;
2163 d->issue_command(d, &c);
2164 }
2165
2166
21671483 /* ts A61201 */
2168 static char *mmc_obtain_profile_name(int profile_number)
1484 char *mmc_obtain_profile_name(int profile_number)
21691485 {
21701486 static char *texts[0x53] = {NULL};
21711487 int i, max_pno = 0x53;
22071523 }
22081524
22091525
1526 /* ts A90603 : to be used if the drive knows no GET CONFIGURATION
1527 */
1528 static int mmc_guess_profile(struct burn_drive *d, int flag)
1529 {
1530 int cp;
1531
1532 cp = 0;
1533 if (d->status == BURN_DISC_BLANK ||
1534 d->status == BURN_DISC_APPENDABLE) {
1535 cp = 0x09;
1536 } else if (d->status == BURN_DISC_FULL) {
1537 cp = 0x08;
1538 }
1539 if (cp)
1540 if (d->erasable)
1541 cp = 0x0a;
1542 d->current_profile = cp;
1543 if (cp == 0)
1544 return 0;
1545 d->current_is_cd_profile = 1;
1546 d->current_is_supported_profile = 1;
1547 strcpy(d->current_profile_text, mmc_obtain_profile_name(cp));
1548 return 1;
1549 }
1550
1551
1552 static int mmc_read_disc_info_al(struct burn_drive *d, int *alloc_len)
1553 {
1554 struct buffer buf;
1555 unsigned char *data;
1556 struct command c;
1557 char msg[160];
1558 /* ts A70131 : had to move mmc_read_toc() to end of function */
1559 int do_read_toc = 0, disc_status, len, old_alloc_len;
1560 int ret, number_of_sessions = -1;
1561
1562 /* ts A61020 */
1563 d->start_lba = d->end_lba = -2000000000;
1564 d->erasable = 0;
1565 d->last_track_no = 1;
1566
1567 /* ts A70212 - A70215 */
1568 d->media_capacity_remaining = 0;
1569 d->media_lba_limit = 0;
1570
1571 /* ts A81210 */
1572 d->media_read_capacity = 0x7fffffff;
1573
1574 /* ts A61202 */
1575 d->toc_entries = 0;
1576 if (d->status == BURN_DISC_EMPTY)
1577 return 1;
1578
1579 mmc_get_configuration(d);
1580
1581 /* ts A70910 : found this as condition for mmc_function_spy() which went up
1582 if (*alloc_len < 2)
1583 */
1584
1585 scsi_init_command(&c, MMC_GET_DISC_INFO, sizeof(MMC_GET_DISC_INFO));
1586 /*
1587 memcpy(c.opcode, MMC_GET_DISC_INFO, sizeof(MMC_GET_DISC_INFO));
1588 c.oplen = sizeof(MMC_GET_DISC_INFO);
1589 */
1590 c.dxfer_len = *alloc_len;
1591 c.opcode[7]= (c.dxfer_len >> 8) & 0xff;
1592 c.opcode[8]= c.dxfer_len & 0xff;
1593 c.retry = 1;
1594 c.page = &buf;
1595 c.page->sectors = 0;
1596 c.page->bytes = 0;
1597 c.dir = FROM_DRIVE;
1598 d->issue_command(d, &c);
1599
1600 if (c.error) {
1601 d->busy = BURN_DRIVE_IDLE;
1602 return 0;
1603 }
1604
1605 data = c.page->data;
1606 len = (data[0] << 8) | data[1];
1607 old_alloc_len = *alloc_len;
1608 *alloc_len = len + 2;
1609 if (old_alloc_len < 34)
1610 return 1;
1611 if (*alloc_len < 24) /* data[23] is the last byte used here */
1612 return 0;
1613 if (len + 2 > old_alloc_len)
1614 len = old_alloc_len - 2;
1615
1616 d->erasable = !!(data[2] & 16);
1617
1618 disc_status = data[2] & 3;
1619 d->state_of_last_session = (data[2] >> 2) & 3;
1620 number_of_sessions = (data[9] << 8) | data[4];
1621
1622 if (d->current_profile == 0x10 || d->current_profile == 0x40) {
1623 /* DVD-ROM , BD-ROM */
1624 disc_status = 2; /* always full and finalized */
1625 d->erasable = 0; /* never erasable */
1626 }
1627
1628 /* ts A80207 : DVD - R DL can normally be read but not be written */
1629 if(d->current_profile == 0x15 && !burn_support_untested_profiles) {
1630 disc_status = 2; /* always full and finalized */
1631 d->erasable = 0; /* never erasable */
1632 }
1633
1634 #ifdef Libburn_support_bd_r_readonlY
1635 /* <<< For now: declaring BD-R read-only
1636 */
1637 #ifndef Libburn_support_bd_plus_r_srM
1638 if (d->current_profile == 0x41) {
1639 /* BD-R seq as readonly dummy */
1640 disc_status = 2; /* always full and finalized */
1641 d->erasable = 0; /* never erasable */
1642 }
1643 #endif
1644 if (d->current_profile == 0x42) {
1645 /* BD-R rnd */
1646 disc_status = 2; /* always full and finalized */
1647 d->erasable = 0; /* never erasable */
1648 }
1649 #endif /* Libburn_support_bd_r_readonlY */
1650
1651 switch (disc_status) {
1652 case 0:
1653 regard_as_blank:;
1654 d->toc_entries = 0;
1655 d->start_lba = burn_msf_to_lba(data[17], data[18], data[19]);
1656 d->end_lba = burn_msf_to_lba(data[21], data[22], data[23]);
1657
1658 /*
1659 fprintf(stderr, "libburn_experimental: start_lba = %d (%d %d %d) , end_lba = %d (%d %d %d)\n",
1660 d->start_lba, data[17], data[18], data[19],
1661 d->end_lba, data[21], data[22], data[23]);
1662 */
1663
1664 d->status = BURN_DISC_BLANK;
1665 break;
1666 case 1:
1667 d->status = BURN_DISC_APPENDABLE;
1668
1669 case 2:
1670 if (disc_status == 2)
1671 d->status = BURN_DISC_FULL;
1672
1673 /* ts A81210 */
1674 ret = mmc_read_capacity(d);
1675 /* Freshly formatted, unwritten BD-R pretend to be appendable
1676 but in our model they need to be regarded as blank.
1677 Criterion: BD-R seq, read capacity known and 0,
1678 declared appendable, single empty session
1679 */
1680 if (d->current_profile == 0x41 &&
1681 d->status == BURN_DISC_APPENDABLE &&
1682 ret > 0 && d->media_read_capacity == 0 &&
1683 d->state_of_last_session == 0 && number_of_sessions == 1)
1684 goto regard_as_blank;
1685
1686 if (d->current_profile == 0x41 &&
1687 d->status == BURN_DISC_APPENDABLE &&
1688 d->state_of_last_session == 1) {
1689
1690 /* ??? apply this test to other media types ? */
1691
1692 libdax_msgs_submit(libdax_messenger, d->global_index,
1693 0x00020169,
1694 LIBDAX_MSGS_SEV_WARNING, LIBDAX_MSGS_PRIO_HIGH,
1695 "Last session on media is still open.", 0, 0);
1696 }
1697
1698 do_read_toc = 1;
1699 break;
1700 }
1701
1702 /* ts A90603 : An MMC-1 drive might not know the media type yet */
1703 if (d->current_is_guessed_profile && d->current_profile == 0)
1704 mmc_guess_profile(d, 0);
1705
1706 if ((d->current_profile != 0 || d->status != BURN_DISC_UNREADY)
1707 && ! d->current_is_supported_profile) {
1708 if (!d->silent_on_scsi_error) {
1709 sprintf(msg,
1710 "Unsuitable media detected. Profile %4.4Xh %s",
1711 d->current_profile, d->current_profile_text);
1712 libdax_msgs_submit(libdax_messenger, d->global_index,
1713 0x0002011e,
1714 LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
1715 msg, 0,0);
1716 }
1717 d->status = BURN_DISC_UNSUITABLE;
1718 return 0;
1719 }
1720
1721 /* ts A61217 : Note for future
1722 growisofs performs OPC if (data[0]<<8)|data[1]<=32
1723 which indicates no OPC entries are attached to the
1724 reply from the drive.
1725 */
1726
1727 /* ts A61219 : mmc5r03c.pdf 6.22.3.1.13 BG Format Status
1728 0=blank (not yet started)
1729 1=started but neither running nor complete
1730 2=in progress
1731 3=completed
1732 */
1733 d->bg_format_status = data[7] & 3;
1734
1735 /* Preliminarily declare blank:
1736 ts A61219 : DVD+RW (is not bg_format_status==0 "blank")
1737 ts A61229 : same for DVD-RW Restricted overwrite
1738 ts A70112 : same for DVD-RAM
1739 */
1740 if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
1741 d->current_profile == 0x12 || d->current_profile == 0x43)
1742 d->status = BURN_DISC_BLANK;
1743
1744 if (d->status == BURN_DISC_BLANK) {
1745 d->last_track_no = 1; /* The "incomplete track" */
1746 d->complete_sessions = 0;
1747 } else {
1748 /* ts A70131 : number of non-empty sessions */
1749 d->complete_sessions = number_of_sessions;
1750 /* mmc5r03c.pdf 6.22.3.1.3 State of Last Session: 3=complete */
1751 if (d->state_of_last_session != 3 && d->complete_sessions >= 1)
1752 d->complete_sessions--;
1753
1754 /* ts A70129 : mmc5r03c.pdf 6.22.3.1.7
1755 This includes the "incomplete track" if the disk is
1756 appendable. I.e number of complete tracks + 1. */
1757 d->last_track_no = (data[11] << 8) | data[6];
1758 }
1759 if (d->current_profile != 0x0a && d->current_profile != 0x13 &&
1760 d->current_profile != 0x14 && d->status != BURN_DISC_FULL)
1761 d->erasable = 0; /* stay in sync with burn_disc_erase() */
1762
1763 if (do_read_toc)
1764 mmc_read_toc(d);
1765 return 1;
1766 }
1767
1768
1769 void mmc_read_disc_info(struct burn_drive *d)
1770 {
1771 int alloc_len = 34, ret;
1772
1773 if (mmc_function_spy(d, "mmc_read_disc_info") <= 0)
1774 return;
1775
1776 ret = mmc_read_disc_info_al(d, &alloc_len);
1777 /*
1778 fprintf(stderr,"LIBBURN_DEBUG: 51h alloc_len = %d , ret = %d\n",
1779 alloc_len, ret);
1780 */
1781 /* for now there is no need to inquire the variable lenght part */
1782 }
1783
1784
1785 void mmc_read_atip(struct burn_drive *d)
1786 {
1787 struct buffer buf;
1788 struct command c;
1789 int alloc_len = 28;
1790
1791 /* ts A61021 */
1792 unsigned char *data;
1793 /* Speed values from A1:
1794 With 4 cdrecord tells "10" or "8" where MMC-1 says "8".
1795 cdrecord "8" appear on 4xCD-RW and thus seem to be quite invalid.
1796 My CD-R (>=24 speed) tell no A1.
1797 The higher non-MMC-1 values are hearsay.
1798 */
1799 /* 0, 2, 4, 6, 10, -, 16, -, */
1800 static int speed_value[16]= { 0, 353, 706, 1059, 1764, -5, 2824, -7,
1801 4234, 5646, 7056, 8468, -12, -13, -14, -15};
1802 /* 24, 32, 40, 48, -, -, -, - */
1803
1804 if (mmc_function_spy(d, "mmc_read_atip") <= 0)
1805 return;
1806
1807 scsi_init_command(&c, MMC_GET_ATIP, sizeof(MMC_GET_ATIP));
1808 /*
1809 memcpy(c.opcode, MMC_GET_ATIP, sizeof(MMC_GET_ATIP));
1810 c.oplen = sizeof(MMC_GET_ATIP);
1811 */
1812 c.dxfer_len = alloc_len;
1813 c.opcode[7]= (c.dxfer_len >> 8) & 0xff;
1814 c.opcode[8]= c.dxfer_len & 0xff;
1815 c.retry = 1;
1816 c.page = &buf;
1817 c.page->bytes = 0;
1818 c.page->sectors = 0;
1819
1820 c.dir = FROM_DRIVE;
1821 d->issue_command(d, &c);
1822 burn_print(1, "atip shit for you\n");
1823
1824
1825 /* ts A61021 */
1826 data = c.page->data;
1827 d->erasable= !!(data[6]&64);
1828 d->start_lba= burn_msf_to_lba(data[8],data[9],data[10]);
1829 d->end_lba= burn_msf_to_lba(data[12],data[13],data[14]);
1830 if (data[6]&4) {
1831 if (speed_value[(data[16]>>4)&7] > 0) {
1832 d->mdata->min_write_speed =
1833 speed_value[(data[16]>>4)&7];
1834 if (speed_value[(data[16])&15] <= 0)
1835 d->mdata->max_write_speed =
1836 speed_value[(data[16]>>4)&7];
1837 }
1838 if (speed_value[(data[16])&15] > 0) {
1839 d->mdata->max_write_speed =
1840 speed_value[(data[16])&15];
1841 if (speed_value[(data[16]>>4)&7] <= 0)
1842 d->mdata->min_write_speed =
1843 speed_value[(data[16])&15];
1844 }
1845 }
1846
1847 #ifdef Burn_mmc_be_verbous_about_atiP
1848 { int i;
1849 fprintf(stderr,"libburn_experimental: Returned ATIP Data\n");
1850 for(i= 0; i<28; i++)
1851 fprintf(stderr,"%3.3d (0x%2.2x)%s",
1852 data[i],data[i],((i+1)%5 ? " ":"\n"));
1853 fprintf(stderr,"\n");
1854
1855 fprintf(stderr,
1856 "libburn_experimental: Indicative Target Writing Power= %d\n",
1857 (data[4]>>4)&7);
1858 fprintf(stderr,
1859 "libburn_experimental: Reference speed= %d ->%d\n",
1860 data[4]&7, speed_value[data[4]&7]);
1861 fprintf(stderr,
1862 "libburn_experimental: Is %sunrestricted\n",
1863 (data[5]&64?"":"not "));
1864 fprintf(stderr,
1865 "libburn_experimental: Is %serasable, sub-type %d\n",
1866 (data[6]&64?"":"not "),(data[6]>>3)&3);
1867 fprintf(stderr,
1868 "libburn_experimental: lead in: %d (%-2.2d:%-2.2d/%-2.2d)\n",
1869 burn_msf_to_lba(data[8],data[9],data[10]),
1870 data[8],data[9],data[10]);
1871 fprintf(stderr,
1872 "libburn_experimental: lead out: %d (%-2.2d:%-2.2d/%-2.2d)\n",
1873 burn_msf_to_lba(data[12],data[13],data[14]),
1874 data[12],data[13],data[14]);
1875 if(data[6]&4)
1876 fprintf(stderr,
1877 "libburn_experimental: A1 speed low %d speed high %d\n",
1878 speed_value[(data[16]>>4)&7], speed_value[(data[16])&7]);
1879 if(data[6]&2)
1880 fprintf(stderr,
1881 "libburn_experimental: A2 speed low %d speed high %d\n",
1882 speed_value[(data[20]>>4)&7], speed_value[(data[20])&7]);
1883 if(data[6]&1)
1884 fprintf(stderr,
1885 "libburn_experimental: A3 speed low %d speed high %d\n",
1886 speed_value[(data[24]>>4)&7], speed_value[(data[24])&7]);
1887 }
1888
1889 #endif /* Burn_mmc_be_verbous_about_atiP */
1890
1891 /* ts A61020
1892 http://www.t10.org/ftp/t10/drafts/mmc/mmc-r10a.pdf , table 77 :
1893
1894 0 ATIP Data Length MSB
1895 1 ATIP Data Length LSB
1896 2 Reserved
1897 3 Reserved
1898 4 bit7=1, bit4-6="Indicative Target Writing Power", bit3=reserved ,
1899 bit0-2="Reference speed"
1900 5 bit7=0, bit6="URU" , bit0-5=reserved
1901 6 bit7=1, bit6="Disc Type", bit3-4="Disc Sub-Type",
1902 bit2="A1", bit1="A2", bit0="A3"
1903 7 reserved
1904 8 ATIP Start Time of lead-in (Min)
1905 9 ATIP Start Time of lead-in (Sec)
1906 10 ATIP Start Time of lead-in (Frame)
1907 11 reserved
1908 12 ATIP Last Possible Start Time of lead-out (Min)
1909 13 ATIP Last Possible Start Time of lead-out (Sec)
1910 14 ATIP Last Possible Start Time of lead-out (Frame)
1911 15 reserved
1912 16 bit7=0, bit4-6="Lowest Usable CLV Recording speed"
1913 bit0-3="Highest Usable CLV Recording speed"
1914 17 bit7=0, bit4-6="Power Multiplication Factor p",
1915 bit1-3="Target y value of the Modulation/Power function", bit0=reserved
1916 18 bit7=1, bit4-6="Recommended Erase/Write Power Ratio (P(inf)/W(inf))"
1917 bit0-3=reserved
1918 19 reserved
1919 20-22 A2 Values
1920 23 reserved
1921 24-26 A3 Values
1922 27 reserved
1923
1924 Disc Type - zero indicates CD-R media; one indicates CD-RW media.
1925
1926 Disc Sub-Type - shall be set to zero.
1927
1928 A1 - when set to one, indicates that bytes 16-18 are valid.
1929
1930 Lowest Usable CLV Recording Speed
1931 000b Reserved
1932 001b 2X
1933 010b - 111b Reserved
1934
1935 Highest CLV Recording Speeds
1936 000b Reserved
1937 001b 2X
1938 010b 4X
1939 011b 6X
1940 100b 8X
1941 101b - 111b Reserved
1942
1943 MMC-3 seems to recommend MODE SENSE (5Ah) page 2Ah rather than A1, A2, A3.
1944 This page is loaded in libburn function spc_sense_caps() .
1945 Speed is given in kbytes/sec there. But i suspect this to be independent
1946 of media. So one would habe to associate the speed descriptor blocks with
1947 the ATIP media characteristics ? How ?
1948
1949 */
1950 }
1951
1952 void mmc_read_sectors(struct burn_drive *d,
1953 int start,
1954 int len,
1955 const struct burn_read_opts *o, struct buffer *buf)
1956 {
1957 int temp;
1958 int errorblock, req;
1959 struct command c;
1960
1961 if (mmc_function_spy(d, "mmc_read_sectors") <= 0)
1962 return;
1963
1964 /* ts A61009 : to be ensured by callers */
1965 /* a ssert(len >= 0); */
1966
1967 /* if the drive isn't busy, why the hell are we here? */
1968 /* ts A61006 : i second that question */
1969 /* a ssert(d->busy); */
1970
1971 burn_print(12, "reading %d from %d\n", len, start);
1972
1973 scsi_init_command(&c, MMC_READ_CD, sizeof(MMC_READ_CD));
1974 /*
1975 memcpy(c.opcode, MMC_READ_CD, sizeof(MMC_READ_CD));
1976 c.oplen = sizeof(MMC_READ_CD);
1977 */
1978 c.retry = 1;
1979 temp = start;
1980 c.opcode[5] = temp & 0xFF;
1981 temp >>= 8;
1982 c.opcode[4] = temp & 0xFF;
1983 temp >>= 8;
1984 c.opcode[3] = temp & 0xFF;
1985 temp >>= 8;
1986 c.opcode[2] = temp & 0xFF;
1987 c.opcode[8] = len & 0xFF;
1988 len >>= 8;
1989 c.opcode[7] = len & 0xFF;
1990 len >>= 8;
1991 c.opcode[6] = len & 0xFF;
1992 req = 0xF8;
1993
1994 /* ts A61106 : LG GSA-4082B dislikes this. key=5h asc=24h ascq=00h
1995
1996 if (d->busy == BURN_DRIVE_GRABBING || o->report_recovered_errors)
1997 req |= 2;
1998 */
1999
2000 c.opcode[10] = 0;
2001 /* always read the subcode, throw it away later, since we don't know
2002 what we're really reading
2003 */
2004 if (d->busy == BURN_DRIVE_GRABBING || (o->subcodes_audio)
2005 || (o->subcodes_data))
2006 c.opcode[10] = 1;
2007
2008 c.opcode[9] = req;
2009 c.page = buf;
2010 c.dir = FROM_DRIVE;
2011 d->issue_command(d, &c);
2012
2013 if (c.error) {
2014 burn_print(12, "got an error over here\n");
2015 burn_print(12, "%d, %d, %d, %d\n", c.sense[3], c.sense[4],
2016 c.sense[5], c.sense[6]);
2017 errorblock =
2018 (c.sense[3] << 24) + (c.sense[4] << 16) +
2019 (c.sense[5] << 8) + c.sense[6];
2020 c.page->sectors = errorblock - start + 1;
2021 burn_print(1, "error on block %d\n", errorblock);
2022 burn_print(12, "error on block %d\n", errorblock);
2023 burn_print(12, "returning %d sectors\n", c.page->sectors);
2024 }
2025 }
2026
2027 void mmc_erase(struct burn_drive *d, int fast)
2028 {
2029 struct command c;
2030
2031 if (mmc_function_spy(d, "mmc_erase") <= 0)
2032 return;
2033
2034 scsi_init_command(&c, MMC_BLANK, sizeof(MMC_BLANK));
2035 /*
2036 memcpy(c.opcode, MMC_BLANK, sizeof(MMC_BLANK));
2037 c.oplen = sizeof(MMC_BLANK);
2038 */
2039 c.opcode[1] = 16; /* IMMED set to 1 */
2040 c.opcode[1] |= !!fast;
2041 c.retry = 1;
2042 c.page = NULL;
2043 c.dir = NO_TRANSFER;
2044 d->issue_command(d, &c);
2045 }
2046
2047 void mmc_read_lead_in(struct burn_drive *d, struct buffer *buf)
2048 {
2049 int len;
2050 struct command c;
2051
2052 if (mmc_function_spy(d, "mmc_read_lead_in") <= 0)
2053 return;
2054
2055 len = buf->sectors;
2056 scsi_init_command(&c, MMC_READ_CD, sizeof(MMC_READ_CD));
2057 /*
2058 memcpy(c.opcode, MMC_READ_CD, sizeof(MMC_READ_CD));
2059 c.oplen = sizeof(MMC_READ_CD);
2060 */
2061 c.retry = 1;
2062 c.opcode[5] = 0;
2063 c.opcode[4] = 0;
2064 c.opcode[3] = 0;
2065 c.opcode[2] = 0xF0;
2066 c.opcode[8] = 1;
2067 c.opcode[7] = 0;
2068 c.opcode[6] = 0;
2069 c.opcode[9] = 0;
2070 c.opcode[10] = 2;
2071 c.page = buf;
2072 c.dir = FROM_DRIVE;
2073 d->issue_command(d, &c);
2074 }
2075
2076 void mmc_perform_opc(struct burn_drive *d)
2077 {
2078 struct command c;
2079
2080 if (mmc_function_spy(d, "mmc_perform_opc") <= 0)
2081 return;
2082
2083 scsi_init_command(&c, MMC_SEND_OPC, sizeof(MMC_SEND_OPC));
2084 /*
2085 memcpy(c.opcode, MMC_SEND_OPC, sizeof(MMC_SEND_OPC));
2086 c.oplen = sizeof(MMC_SEND_OPC);
2087 */
2088 c.retry = 1;
2089 c.opcode[1] = 1;
2090 c.page = NULL;
2091 c.dir = NO_TRANSFER;
2092 d->issue_command(d, &c);
2093 }
2094
2095
2096 /* ts A61221 : Learned much from dvd+rw-tools-7.0 set_speed_B6h() but then
2097 made own experiments on base of mmc5r03c.pdf 6.8.3 and 6.39 in the hope
2098 to achieve a leaner solution
2099 ts A70712 : That leaner solution does not suffice for my LG GSA-4082B.
2100 Meanwhile there is a speed descriptor list anyway.
2101 */
2102 int mmc_set_streaming(struct burn_drive *d,
2103 int r_speed, int w_speed, int end_lba)
2104 {
2105 struct buffer buf;
2106 struct command c;
2107 int b, eff_end_lba;
2108 char msg[256];
2109 unsigned char *pd;
2110 int key, asc, ascq;
2111
2112 if (mmc_function_spy(d, "mmc_set_streaming") <= 0)
2113 return 0;
2114
2115 scsi_init_command(&c, MMC_SET_STREAMING, sizeof(MMC_SET_STREAMING));
2116 /*
2117 c.oplen = sizeof(MMC_SET_STREAMING);
2118 memcpy(c.opcode, MMC_SET_STREAMING, sizeof(MMC_SET_STREAMING));
2119 */
2120 c.retry = 1;
2121 c.page = &buf;
2122 c.page->bytes = 28;
2123 c.opcode[9] = (c.page->bytes >> 8) & 0xff;
2124 c.opcode[10] = c.page->bytes & 0xff;
2125 c.page->sectors = 0;
2126 c.dir = TO_DRIVE;
2127 memset(c.page->data, 0, c.page->bytes);
2128 pd = c.page->data;
2129
2130 pd[0] = 0; /* WRC=0 (Default Rotation Control), RDD=Exact=RA=0 */
2131
2132 if (w_speed == 0)
2133 w_speed = 0x10000000; /* ~ 2 TB/s */
2134 else if (w_speed < 0)
2135 w_speed = 177; /* 1x CD */
2136 if (r_speed == 0)
2137 r_speed = 0x10000000; /* ~ 2 TB/s */
2138 else if (r_speed < 0)
2139 r_speed = 177; /* 1x CD */
2140 if (end_lba == 0) {
2141 /* Default computed from 4.7e9 */
2142 eff_end_lba = 2294921 - 1;
2143 if (d->mdata->max_end_lba > 0)
2144 eff_end_lba = d->mdata->max_end_lba - 1;
2145 } else
2146 eff_end_lba = end_lba;
2147
2148 sprintf(msg, "mmc_set_streaming: end_lba=%d , r=%d , w=%d",
2149 end_lba, r_speed, w_speed);
2150 libdax_msgs_submit(libdax_messenger, d->global_index, 0x00000002,
2151 LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
2152 msg, 0, 0);
2153
2154 /* start_lba is 0 , 1000 = 1 second as base time for data rate */
2155 for (b = 0; b < 4 ; b++) {
2156 pd[8+b] = (end_lba >> (24 - 8 * b)) & 0xff;
2157 pd[12+b] = (r_speed >> (24 - 8 * b)) & 0xff;
2158 pd[16+b] = (1000 >> (24 - 8 * b)) & 0xff;
2159 pd[20+b] = (w_speed >> (24 - 8 * b)) & 0xff;
2160 pd[24+b] = (1000 >> (24 - 8 * b)) & 0xff;
2161 }
2162
2163 /* <<<
2164 fprintf(stderr,"LIBBURN_EXPERIMENTAL : B6h Performance descriptor:\n");
2165 for (b = 0; b < 28 ; b++)
2166 fprintf(stderr, "%2.2X%c", pd[b], ((b+1)%4 ? ' ' : '\n'));
2167 */
2168
2169
2170 d->issue_command(d, &c);
2171 if (c.error) {
2172 if (c.sense[2]!=0 && !d->silent_on_scsi_error) {
2173
2174 #ifdef NIX
2175 sprintf(msg,
2176 "SCSI error on set_streaming(%d): key=%X asc=%2.2Xh ascq=%2.2Xh",
2177 w_speed,
2178 c.sense[2],c.sense[12],c.sense[13]);
2179 libdax_msgs_submit(libdax_messenger,
2180 d->global_index,
2181 0x00020124,
2182 LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
2183 msg, 0, 0);
2184 #else /* NIX */
2185
2186 sprintf(msg,
2187 "SCSI error on set_streaming(%d): ", w_speed);
2188 scsi_error_msg(d, c.sense, 14, msg + strlen(msg),
2189 &key, &asc, &ascq);
2190
2191 #endif /* !NIX */
2192
2193 }
2194 return 0;
2195 }
2196 return 1;
2197 }
2198
2199
2200 void mmc_set_speed(struct burn_drive *d, int r, int w)
2201 {
2202 struct command c;
2203 int ret, end_lba = 0;
2204 struct burn_speed_descriptor *best_sd = NULL;
2205
2206 if (mmc_function_spy(d, "mmc_set_speed") <= 0)
2207 return;
2208
2209 if (r <= 0 || w <= 0) {
2210 /* ts A70712 : now searching for best speed descriptor */
2211 if (w > 0 && r <= 0)
2212 burn_drive_get_best_speed(d, r, &best_sd, 1);
2213 else
2214 burn_drive_get_best_speed(d, w, &best_sd, 0);
2215 if (best_sd != NULL) {
2216 w = best_sd->write_speed;
2217 d->nominal_write_speed = w;
2218 r = best_sd->read_speed;
2219 end_lba = best_sd->end_lba;
2220 }
2221 }
2222
2223 /* A70711 */
2224 d->nominal_write_speed = w;
2225
2226 /* ts A61221 : try to set DVD speed via command B6h */
2227 if (strstr(d->current_profile_text, "DVD") == d->current_profile_text){
2228 ret = mmc_set_streaming(d, r, w, end_lba);
2229 if (ret != 0)
2230 return; /* success or really fatal failure */
2231 }
2232
2233 /* ts A61112 : MMC standards prescribe FFFFh as max speed.
2234 But libburn.h prescribes 0.
2235 ts A70715 : <0 now means minimum speed */
2236 if (r == 0 || r > 0xffff)
2237 r = 0xffff;
2238 else if (r < 0)
2239 r = 177; /* 1x CD */
2240 if (w == 0 || w > 0xffff)
2241 w = 0xffff;
2242 else if (w < 0)
2243 w = 177; /* 1x CD */
2244
2245 scsi_init_command(&c, MMC_SET_SPEED, sizeof(MMC_SET_SPEED));
2246 /*
2247 memcpy(c.opcode, MMC_SET_SPEED, sizeof(MMC_SET_SPEED));
2248 c.oplen = sizeof(MMC_SET_SPEED);
2249 */
2250 c.retry = 1;
2251 c.opcode[2] = r >> 8;
2252 c.opcode[3] = r & 0xFF;
2253 c.opcode[4] = w >> 8;
2254 c.opcode[5] = w & 0xFF;
2255 c.page = NULL;
2256 c.dir = NO_TRANSFER;
2257 d->issue_command(d, &c);
2258 }
2259
2260
22102261 /* ts A61201 : found in unfunctional state
22112262 */
22122263 static int mmc_get_configuration_al(struct burn_drive *d, int *alloc_len)
22132264 {
22142265 struct buffer buf;
22152266 int len, cp, descr_len = 0, feature_code, prf_number, only_current = 1;
2216 int old_alloc_len;
2267 int old_alloc_len, only_current_profile = 0;
22172268 unsigned char *descr, *prf, *up_to, *prf_end;
22182269 struct command c;
22192270 int phys_if_std = 0;
22262277 d->current_profile_text[0] = 0;
22272278 d->current_is_cd_profile = 0;
22282279 d->current_is_supported_profile = 0;
2280 d->current_is_guessed_profile = 0;
2281 d->num_profiles = 0;
22292282 d->current_has_feat21h = 0;
22302283 d->current_feat21h_link_size = -1;
22312284 d->current_feat23h_byte4 = 0;
22342287
22352288 scsi_init_command(&c, MMC_GET_CONFIGURATION,
22362289 sizeof(MMC_GET_CONFIGURATION));
2237 /*
2238 memcpy(c.opcode, MMC_GET_CONFIGURATION, sizeof(MMC_GET_CONFIGURATION));
2239 c.oplen = sizeof(MMC_GET_CONFIGURATION);
2240 */
22412290 c.dxfer_len= *alloc_len;
22422291 c.retry = 1;
22432292 c.opcode[7] = (c.dxfer_len >> 8) & 0xff;
22482297 c.dir = FROM_DRIVE;
22492298 d->issue_command(d, &c);
22502299
2251 if (c.error)
2252 return 0;
2300 #ifdef Libisofs_simulate_old_mmc1_drivE
2301 c.error = 1;
2302 c.sense[2] = 0x5;
2303 c.sense[12] = 0x20;
2304 c.sense[13] = 0x0;
2305 #endif /* Libisofs_simulate_old_mmc1_drivE */
2306
2307 if (c.error) {
2308 /* ts A90603 : MMC-1 drive do not know 46h GET CONFIGURATION */
2309 if (c.sense[2] == 0x5 && c.sense[12] == 0x20 &&
2310 c.sense[13] == 0x0) {
2311 d->current_is_guessed_profile = 1;
2312 /* Will yield a non-zero profile only after
2313 mmc_read_disc_info_al() was called */
2314 mmc_guess_profile(d, 0);
2315 }
2316 return 0;
2317 }
22532318 old_alloc_len = *alloc_len;
22542319 *alloc_len = len = mmc_four_char_to_int(c.page->data);
22552320 if (len > old_alloc_len)
23272392 #endif
23282393
23292394 /* Enable this to get loud and repeated reports about the feature set :
2330 #define Libburn_print_feature_descriptorS 1
2395 #define Libburn_print_feature_descriptorS 1
23312396 */
23322397 /* ts A70127 : Interpret list of profile and feature descriptors.
23332398 see mmc5r03c.pdf 5.2
23412406 "-----------------------------------------------------------------\n");
23422407 fprintf(stderr,
23432408 "LIBBURN_EXPERIMENTAL : feature list length = %d , shown = %d\n",
2344 len, up_to - c.page->data);
2409 len, (int) (up_to - c.page->data));
23452410 #endif /* Libburn_print_feature_descriptorS */
23462411
23472412 for (descr = c.page->data + 8; descr + 3 < up_to; descr += descr_len) {
23592424
23602425 if (feature_code == 0x0) {
23612426 prf_end = descr + 4 + descr[3];
2427 d->num_profiles = descr[3] / 4;
2428 if (d->num_profiles > 64)
2429 d->num_profiles = 64;
2430 if (d->num_profiles > 0)
2431 memcpy(d->all_profiles, descr + 4,
2432 d->num_profiles * 4);
23622433 for (prf = descr + 4; prf + 2 < prf_end; prf += 4) {
2363 if (only_current && !(prf[2] & 1))
2434 if (only_current_profile && !(prf[2] & 1))
23642435 continue;
23652436 prf_number = (prf[0] << 8) | prf[1];
23662437
34743545 c.page->bytes = 0;
34753546 c.dir = FROM_DRIVE;
34763547 d->issue_command(d, &c);
3548
3549 #ifdef Libisofs_simulate_old_mmc1_drivE
3550 c.error = 1;
3551 c.sense[2] = 0x5;
3552 c.sense[12] = 0x20;
3553 c.sense[13] = 0x0;
3554 #endif /* Libisofs_simulate_old_mmc1_drivE */
3555
34773556 if (c.error)
34783557 return 0;
34793558 len = mmc_four_char_to_int(c.page->data);
38033882 d->start_lba = -2000000000;
38043883 d->end_lba = -2000000000;
38053884
3806 /* ts A61201 - A70223*/
3885 /* ts A61201 - A90815*/
38073886 d->erasable = 0;
38083887 d->current_profile = -1;
38093888 d->current_profile_text[0] = 0;
38103889 d->current_is_cd_profile = 0;
38113890 d->current_is_supported_profile = 0;
3891 d->current_is_guessed_profile = 0;
3892 memset(d->all_profiles, 0, 256);
3893 d->num_profiles = 0;
38123894 d->current_has_feat21h = 0;
38133895 d->current_feat21h_link_size = -1;
38143896 d->current_feat23h_byte4 = 0;
7474 /* ts A81210 : Determine the upper limit of readable data size */
7575 int mmc_read_capacity(struct burn_drive *d);
7676
77 /* ts A61201 */
78 char *mmc_obtain_profile_name(int profile_number);
79
7780
7881 /* mmc5r03c.pdf 4.3.4.4.1 d) "The maximum number of RZones is 2 302." */
7982 #define BURN_MMC_FAKE_TOC_MAX_SIZE 2302
142142 int burn_write_opts_set_underrun_proof(struct burn_write_opts *opts,
143143 int underrun_proof)
144144 {
145 if (!opts->drive->mdata->valid)
145 if (opts->drive->mdata->valid <= 0)
146146 return 0;
147147 if (opts->drive->mdata->underrun_proof) {
148148 opts->underrun_proof = underrun_proof;
2020 static unsigned char SBC_LOAD[] = { 0x1b, 0, 0, 0, 3, 0 };
2121 static unsigned char SBC_UNLOAD[] = { 0x1b, 0, 0, 0, 2, 0 };
2222 static unsigned char SBC_START_UNIT[] = { 0x1b, 0, 0, 0, 1, 0 };
23 static unsigned char SBC_STOP_UNIT[] = { 0x1b, 0, 0, 0, 0, 0 };
2324
2425 void sbc_load(struct burn_drive *d)
2526 {
7879 int sbc_start_unit(struct burn_drive *d)
7980 {
8081 struct command c;
82 int ret;
8183
8284 if (mmc_function_spy(d, "start_unit") <= 0)
8385 return 0;
8486
8587 scsi_init_command(&c, SBC_START_UNIT, sizeof(SBC_START_UNIT));
86 /*
87 memcpy(c.opcode, SBC_START_UNIT, sizeof(SBC_START_UNIT));
88 c.oplen = sizeof(SBC_START_UNIT);
89 c.page = NULL;
90 */
9188 c.retry = 1;
92
9389 c.opcode[1] |= 1; /* ts A70918 : Immed */
94
9590 c.dir = NO_TRANSFER;
9691 d->issue_command(d, &c);
9792 if (c.error)
9893 return 0;
9994 /* ts A70918 : now asynchronous */
100 return spc_wait_unit_attention(d, 1800, "START UNIT", 0);
95 d->is_stopped = 0;
96 ret = spc_wait_unit_attention(d, 1800, "START UNIT", 0);
97 return ret;
10198 }
99
100 /* ts A90824 : Trying to reduce drive noise */
101 int sbc_stop_unit(struct burn_drive *d)
102 {
103 struct command c;
104 int ret;
105
106 if (mmc_function_spy(d, "stop_unit") <= 0)
107 return 0;
108
109 scsi_init_command(&c, SBC_STOP_UNIT, sizeof(SBC_STOP_UNIT));
110 c.retry = 1;
111 c.opcode[1] |= 1; /* Immed */
112 c.dir = NO_TRANSFER;
113 d->issue_command(d, &c);
114 if (c.error)
115 return 0;
116 ret = spc_wait_unit_attention(d, 1800, "STOP UNIT", 0);
117 d->is_stopped = 1;
118 return ret;
119 }
120
102121
103122
104123 /* ts A61021 : the sbc specific part of sg.c:enumerate_common()
108127 d->eject = sbc_eject;
109128 d->load = sbc_load;
110129 d->start_unit = sbc_start_unit;
130 d->stop_unit = sbc_stop_unit;
131 d->is_stopped = 0;
111132 return 1;
112133 }
113134
00 /* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
11
2 #include <assert.h>
32 #include <errno.h>
43 #include <unistd.h>
54 #include <stdio.h>
552551 if (c->page) {
553552 ccb->csio.data_ptr = c->page->data;
554553 if (c->dir == FROM_DRIVE) {
555 ccb->csio.dxfer_len = BUFFER_SIZE;
554
555 /* ts A90430 : Ticket 148 , by jwehle :
556 "On ... FreeBSD 6.4 which has a usb memory reader in
557 addition to a ATAPI DVD burner sg_issue_command
558 will hang while the SCSI bus is being scanned"
559 */
560 if (c->dxfer_len >= 0)
561 ccb->csio.dxfer_len = c->dxfer_len;
562 else
563 ccb->csio.dxfer_len = BUFFER_SIZE;
564
556565 /* touch page so we can use valgrind */
557566 memset(c->page->data, 0, BUFFER_SIZE);
558567 } else {
559 assert(c->page->bytes > 0);
568 /* ts A90430 */
569 /* a ssert(c->page->bytes > 0); */
570 if (c->page->bytes <= 0) {
571 c->error = 1;
572 return 0;
573 }
560574 ccb->csio.dxfer_len = c->page->bytes;
561575 }
562576 } else {
469469 /* ts A60926 */
470470 static int sg_open_drive_fd(char *fname, int scan_mode)
471471 {
472 int open_mode = O_RDWR, fd;
472 int open_mode = O_RDWR, fd, tries= 0;
473473 char msg[81];
474474
475475 /* ts A70409 : DDLP-B */
501501 "libburn: experimental: O_EXCL= %d , O_NDELAY= %d\n",
502502 !!(open_mode&O_EXCL),!!(open_mode&O_NDELAY));
503503 */
504
504
505 try_open:;
505506 fd = open(fname, open_mode);
506507 if (fd == -1) {
507508 /* <<< debugging
510511 fname,errno);
511512 */
512513 if (errno == EBUSY) {
514 tries++;
515
516 /* <<< debugging
517 fprintf(stderr,
518 "\nlibburn_DEBUG: EBUSY , tries= %d\n", tries);
519 */
520
521 if (tries < 4) {
522 usleep(2000000);
523 goto try_open;
524 }
513525 sg_handle_busy_device(fname, errno);
514526 return -1;
515527
792804 if (ret<=0) {
793805 if (linux_sg_enumerate_debug)
794806 fprintf(stderr, "cannot lock siblings\n");
795 sg_handle_busy_device(fname, 0);
807 sg_handle_busy_device(fname, 0);
796808 return 0;
797809 }
798810 /* the final occupation will be done in sg_grab() */
290290 }
291291
292292 /*
293 ts A70518 : Do not call with *alloc_len < 8
293 ts A70518 - A90603 : Do not call with *alloc_len < 10
294294 */
295295 /** flag&1= do only inquire alloc_len */
296296 static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag)
302302 unsigned char *page;
303303 struct command c;
304304 struct burn_speed_descriptor *sd;
305 char msg[BURN_DRIVE_ADR_LEN + 160];
305306
306307 /* ts A61225 : 1 = report about post-MMC-1 speed descriptors */
307308 static int speed_debug = 0;
308309
309 if (*alloc_len < 8)
310 if (*alloc_len < 10)
310311 return 0;
312
313 /* ts A90602 : Clearing mdata before command execution */
314 m = d->mdata;
315 m->valid = 0;
316 burn_mdata_free_subs(m);
311317
312318 memset(&buf, 0, sizeof(buf));
313319 scsi_init_command(&c, SPC_MODE_SENSE, sizeof(SPC_MODE_SENSE));
327333 d->issue_command(d, &c);
328334 if (c.error) {
329335 memset(&buf, 0, sizeof(buf));
330 d->mdata->valid = -1;
336 m->valid = -1;
331337 was_error = 1;
332338 }
333339
334340 size = c.page->data[0] * 256 + c.page->data[1];
335 m = d->mdata;
336341 page = c.page->data + 8;
337342
338343 /* ts A61225 :
341346 in MMC-3 6.3.11 there are at least 28 bytes plus a variable length
342347 set of speed descriptors. In MMC-5 E.11 it is declared "legacy".
343348 */
349 /* ts A90603 :
350 SPC-1 8.3.3 enumerates mode page format bytes from 0 to n and
351 defines Page Length as (n-1).
352 */
344353 page_length = page[1];
345354 old_alloc_len = *alloc_len;
346 *alloc_len = page_length + 8;
355 *alloc_len = page_length + 10;
347356 if (flag & 1)
348357 return !was_error;
349 if (page_length + 8 > old_alloc_len)
350 page_length = old_alloc_len - 8;
351 if (page_length < 22)
358 if (page_length + 10 > old_alloc_len)
359 page_length = old_alloc_len - 10;
360
361 /* ts A90602 : 20 asserts page[21]. (see SPC-1 8.3.3) */
362 if (page_length < 20) {
363 m->valid = -1;
364 sprintf(msg, "MODE SENSE page 2A too short: %s : %d",
365 d->devname, page_length);
366 libdax_msgs_submit(libdax_messenger, d->global_index,
367 0x0002016e, LIBDAX_MSGS_SEV_DEBUG,
368 LIBDAX_MSGS_PRIO_LOW, msg, 0, 0);
352369 return 0;
353
354 m->valid = 0;
355 burn_mdata_free_subs(m);
370 }
356371
357372 m->buffer_size = page[12] * 256 + page[13];
358373 m->dvdram_read = page[2] & 32;
383398 m->min_end_lba = 0x7fffffff;
384399 m->max_end_lba = 0;
385400
386 m->valid = 1;
401 if (!was_error)
402 m->valid = 1;
387403
388404 mmc_get_configuration(d);
389405
390406 /* ts A61225 : end of MMC-1 , begin of MMC-3 */
391 if (page_length < 32) /* no write speed descriptors ? */
407 if (page_length < 30) /* no write speed descriptors ? */
392408 goto try_mmc_get_performance;
393409
394410 m->cur_write_speed = page[28] * 256 + page[29];
412428 }
413429
414430 for (i = 0; i < num_write_speeds; i++) {
415 speed = page[32 + 4*i + 2] * 256 + page[32 + 4*i + 3];
431 speed = page[32 + 4 * i + 2] * 256 + page[32 + 4 * i + 3];
416432
417433 if (speed_debug)
418434 fprintf(stderr,
419435 "LIBBURN_DEBUG: write speed #%d = %d kB/s (rc %d)\n",
420 i, speed, page[32 + 4*i +1] & 7);
436 i, speed, page[32 + 4 * i + 1] & 7);
421437
422438 /* ts A61226 */
423439 ret = burn_speed_descriptor_new(&(d->mdata->speed_descriptors),
430446 strcpy(sd->profile_name,
431447 d->current_profile_text);
432448 }
433 sd->wrc = (( page[32 + 4*i +1] & 7 ) == 1 );
449 sd->wrc = (( page[32 + 4 * i + 1] & 7 ) == 1 );
434450 sd->write_speed = speed;
435451 }
436452
446462 m->min_write_speed, m->max_write_speed);
447463
448464 try_mmc_get_performance:;
449 ret = mmc_get_write_performance(d);
450
451 if (ret > 0 && speed_debug)
452 fprintf(stderr,
465 if (m->cdrw_write || page_length >= 32) {
466 /* ts A90823:
467 One has to avoid U3 enhanced memory sticks here. On my
468 SuSE 10.2 a SanDisk Cruzer 4GB stalls at the second occasion
469 of ACh GET PERFORMANCE. (The first one is obviously called
470 by the OS at plug time.)
471 This pseudo drive returns no write capabilities and a page
472 length of 28. MMC-3 describes page length 32. Regrettably
473 MMC-2 prescribes a page length of 26. Here i have to trust
474 m->cdrw_write to reliably indicate any MMC-2 burner.
475 */
476 ret = mmc_get_write_performance(d);
477 if (ret > 0 && speed_debug)
478 fprintf(stderr,
453479 "LIBBURN_DEBUG: ACh min_write_speed = %d , max_write_speed = %d\n",
454 m->min_write_speed, m->max_write_speed);
480 m->min_write_speed, m->max_write_speed);
481 }
482
455483 return !was_error;
456484 }
457485
458486
459487 void spc_sense_caps(struct burn_drive *d)
460488 {
461 int alloc_len, start_len = 22, ret;
489 int alloc_len, start_len = 30, ret;
462490
463491 if (mmc_function_spy(d, "sense_caps") <= 0)
464492 return;
918946 case 0x04:
919947 sprintf(msg,
920948 "Logical unit is in the process of becoming ready");
949 return RETRY;
950 case 0x08:
951 if (*key != 4)
952 break;
953 if (*ascq == 0)
954 sprintf(msg, "Logical unit communication failure");
955 else if (*ascq == 1)
956 sprintf(msg, "Logical unit communication timeout");
957 else if (*ascq == 2)
958 sprintf(msg, "Logical unit communication parity error");
959 else if (*ascq == 3)
960 sprintf(msg, "Logical unit communication crc error");
921961 return RETRY;
922962 case 0x09:
923963 if (*key != 4)
160160 char current_profile_text[80];
161161 int current_is_cd_profile;
162162 int current_is_supported_profile;
163 /* ts A90603 */
164 int current_is_guessed_profile;
165 /* ts A90815 */
166 unsigned char all_profiles[256];
167 int num_profiles;
163168
164169 /* ts A70128 : MMC-to-MMC feature info from 46h for DVD-RW.
165170 Quite internal. Regard as opaque :)
311316 void (*eject) (struct burn_drive *);
312317 void (*load) (struct burn_drive *);
313318 int (*start_unit) (struct burn_drive *);
319
320 /* ts A90824 : Calming down noisy drives */
321 int (*stop_unit) (struct burn_drive *);
322 int is_stopped;
323
314324 void (*read_disc_info) (struct burn_drive *);
315325 void (*read_sectors) (struct burn_drive *,
316326 int start,
17351735 o->obs_pad = 1; /* fill-up track's last 32k buffer */
17361736 }
17371737
1738
1739 /* <<< test only : Does this increase effective speed with USB ?
1740 ts A90801 : 64kB: speed with 16x DVD-R is 12 rather than 8
1741 >>> next try is 128 kB
1742 o->obs = 128 * 1024;
1743 */
1744
1745
17381746 sprintf(msg, "dvd/bd Profile= %2.2Xh , obs= %d , obs_pad= %d",
17391747 d->current_profile, o->obs, o->obs_pad);
17401748 libdax_msgs_submit(libdax_messenger, d->global_index, 0x00000002,
18441852 int burn_stdio_write(int fd, char *buf, int count, struct burn_drive *d,
18451853 int flag)
18461854 {
1855 if (d->cancel)
1856 return 0;
1857 /*
1858 fprintf(stderr, "libburn_DEBUG: write(%d, %lX, %d)\n",
1859 fd, (unsigned long) buf, count);
1860 */
1861
18471862 if (write(fd, buf, count) != count) {
18481863 libdax_msgs_submit(libdax_messenger, d->global_index,
18491864 0x00020148,
20922107 {
20932108 struct cue_sheet *sheet;
20942109 struct burn_drive *d = o->drive;
2095 struct buffer buf, *buffer_mem = o->drive->buffer;
2110 struct buffer *buffer_mem = o->drive->buffer;
20962111 struct burn_track *lt, *t;
20972112 int first = 1, i, ret, lba, nwa = 0, multi_mem;
20982113 off_t default_size;
21122127 else
21132128 d->stream_recording_start = 0;
21142129
2115 d->buffer = &buf;
2130 d->buffer = calloc(sizeof(struct buffer), 1);
2131 if (d->buffer == NULL)
2132 goto fail_wo_sync;
2133
2134
2135 /* >>> ts A90321
2136
21162137 memset(d->buffer, 0, sizeof(struct buffer));
2138
2139 fprintf(stderr, "libburn_DEBUG: d->buffer = %lX , size = %d\n",
2140 (unsigned long) d->buffer, (int) sizeof(struct buffer));
2141
2142 calloc() seems not to have the desired effect. valgrind warns:
2143 ==18251== Syscall param write(buf) points to uninitialised byte(s)
2144 ==18251== at 0x5071DEB: (within /lib64/libpthread-2.5.so)
2145 ==18251== by 0x4723FA: burn_stdio_write (write.c:1850)
2146 ==18251== by 0x4725DC: burn_stdio_mmc_write (write.c:1894)
2147 ==18251== by 0x483B7A: get_sector (sector.c:229)
2148 ==18251== by 0x484F11: sector_data (sector.c:639)
2149 ==18251== by 0x4729FE: burn_stdio_write_track (write.c:2012)
2150 ==18251== by 0x472CF4: burn_stdio_write_sync (write.c:2072)
2151 ==18251== by 0x472E8D: burn_disc_write_sync (write.c:2125) <<< we are here
2152 ==18251== by 0x460254: write_disc_worker_func (async.c:514)
2153 ==18251== by 0x506B09D: start_thread (in /lib64/libpthread-2.5.so)
2154 ==18251== by 0x55484CC: clone (in /lib64/libc-2.5.so)
2155 */
2156
21172157 d->rlba = -150;
21182158 d->toc_temp = 9;
21192159
23112351 d->busy = BURN_DRIVE_IDLE;
23122352 ex:;
23132353 d->do_stream_recording = 0;
2354 if (d->buffer != NULL)
2355 free((char *) d->buffer);
23142356 d->buffer = buffer_mem;
23152357 return;
23162358 }
105105 ret = libburner_aquire_by_adr(drive_adr);
106106 else
107107 ret = libburner_aquire_by_driveno(driveno);
108 if (ret <= 0)
108 if (ret <= 0 || *driveno <= 0)
109109 return ret;
110110 burn_disc_get_profile(drive_list[0].drive, &current_profile,
111111 current_profile_name);
00 #define BURN_MAJOR_VERSION 0
1 #define BURN_MINOR_VERSION 6
2 #define BURN_MICRO_VERSION 4
1 #define BURN_MINOR_VERSION 7
2 #define BURN_MICRO_VERSION 0