Hello community,
here is the log from the commit of package wodim
checked in at Thu Jun 28 19:45:06 CEST 2007.
--------
--- wodim/wodim.changes 2007-05-03 18:26:11.000000000 +0200
+++ /mounts/work_src_done/STABLE/wodim/wodim.changes 2007-06-28 19:05:02.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Jun 28 19:04:07 CEST 2007 - nadvornik@suse.cz
+
+- updated to 1.1.6:
+ * adding generic drive guessing
+ * some bugfixes
+
+-------------------------------------------------------------------
Old:
----
cdrkit-1.1.5.1-eltorito.patch
cdrkit-1.1.5.1.tar.gz
New:
----
cdrkit-1.1.6.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ wodim.spec ++++++
--- /var/tmp/diff_new_pack.bC1705/_old 2007-06-28 19:43:50.000000000 +0200
+++ /var/tmp/diff_new_pack.bC1705/_new 2007-06-28 19:43:50.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package wodim (Version 1.1.5.1)
+# spec file for package wodim (Version 1.1.6)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,17 +12,16 @@
Name: wodim
BuildRequires: cmake file-devel gcc-c++ libcap-devel libstdc++-devel resmgr
-License: GNU General Public License (GPL)
+License: GNU General Public License (GPL), This software is under GPL but you should read the following clarifications:
Group: Productivity/Multimedia/CD/Record
PreReq: permissions
Autoreqprov: on
-Version: 1.1.5.1
-Release: 5
+Version: 1.1.6
+Release: 1
Source: cdrkit-%{version}.tar.gz
Source1: scan_scsi.linux
Source2: cdinfo.c
Source5: README.SUSE
-Patch1: cdrkit-%{version}-eltorito.patch
URL: http://cdrkit.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Tool for Writing CDRs
@@ -123,7 +122,6 @@
%prep
%setup -q -n cdrkit-%{version}
-%patch1
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
@@ -265,6 +263,10 @@
/usr/bin/list_audio_tracks
%changelog
+* Thu Jun 28 2007 - nadvornik@suse.cz
+- updated to 1.1.6:
+ * adding generic drive guessing
+ * some bugfixes
* Thu May 03 2007 - nadvornik@suse.cz
- fixed crash on hidden boot catalog directory [#247950]
* Tue Apr 24 2007 - nadvornik@suse.cz
++++++ cdrkit-1.1.5.1.tar.gz -> cdrkit-1.1.6.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/3rd-party/geteltorito.1 new/cdrkit-1.1.6/3rd-party/geteltorito.1
--- old/cdrkit-1.1.5.1/3rd-party/geteltorito.1 1970-01-01 01:00:00.000000000 +0100
+++ new/cdrkit-1.1.6/3rd-party/geteltorito.1 2007-05-06 17:16:03.000000000 +0200
@@ -0,0 +1,51 @@
+.\" Hey, EMACS: -*- nroff -*-
+.TH GETELTORITO 1 "Mai 6, 2007"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+geteltorito \- an El Torito boot image extractor
+.SH SYNOPSIS
+.B geteltorito
+.RI < image | drive >
+> outfile
+.br
+.SH DESCRIPTION
+This manual page documents briefly the
+.B geteltorito
+command.
+.PP
+\fBgeteltorito\fP is a Perl script which extracts the initial/default boot
+image from a CD if existent. It will not extract any of other possibly existing
+boot images that are allowed by the
+.B El Torito
+standard. The image data are
+written to
+.BR STDOUT
+all other information is written to
+.BR STDERR
+(e.g. type and size
+of image). If you want to write the image to a file instead of
+.BR STDOUT
+you can
+specify the filename wanted on the command line using option
+.BR \-o\ <filename>.
+
+.SH SEE ALSO
+.BR genisoimage (1),
+.BR isoinfo (1).
+.br
+.SH AUTHOR
+geteltorito was written by Rainer Krienke .
+.PP
+This manual page was written by Eduard Bloch based on
+README.geteltorito from geteltorito-0.4 package.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/Changelog new/cdrkit-1.1.6/Changelog
--- old/cdrkit-1.1.5.1/Changelog 2007-04-21 11:43:17.000000000 +0200
+++ new/cdrkit-1.1.6/Changelog 2007-05-06 16:39:31.000000000 +0200
@@ -1,3 +1,26 @@
+cdrkit (1.1.6) RELEASED; urgency=low
+
+ [ Vladimir Nadvornik ]
+ * genisoimage/eltorito.c: care about inhibit flags when preparing eltorito
+ boot catalog directory entry, avoiding possible crashes
+
+ [ Eduard Bloch]
+ * ALL: customize the base manpage subdirectory below PREFIX using the new
+ MANSUBDIR variable
+ * make sure that the buffer is flushed and drive is ready before closing
+ session
+ * icedax: find libossaudio on OpenBSD and use it
+ * icedax: fixed bug with --devices (unnoticed segfault due to wrong
+ list_devices arguments)
+ * wodim/scsi_scan.h: moved Linux-specific recorder location guesser to an
+ extra method for automatic drive opening, and added an alternative
+ guessing method, using list_devices(...) picking up the first drive having
+ appropriate device type in the inquiry info. This generic method is also
+ used on Linux when the original guesser fails.
+ * wodim/wodim.c: count all track sizes when looking for an appropriate drive
+
+ -- Eduard Bloch Sun, 06 May 2007 16:39:08 +0200
+
cdrkit (1.1.5.1) RELEASED; urgency=low
* resync with cosmetical last-minute changes from Peter Samuelson
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/.clean new/cdrkit-1.1.6/.clean
--- old/cdrkit-1.1.5.1/.clean 2006-08-18 19:34:13.000000000 +0200
+++ new/cdrkit-1.1.6/.clean 1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-#!/bin/sh
-rm -rf */OBJ */*/OBJ libs/* incs/*
-rm -f core */core */*/core
-rm -f .EDT* */.EDT* */*/.EDT*
-rm -f .vedt* */.vedt* */*/.vedt*
-rm -f *.bak */*.bak */*/*.bak
-rm -f */tags */*/tags
-rm -f */TAGS */*/TAGS
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/genisoimage/CMakeLists.txt new/cdrkit-1.1.6/genisoimage/CMakeLists.txt
--- old/cdrkit-1.1.5.1/genisoimage/CMakeLists.txt 2006-12-14 23:12:40.000000000 +0100
+++ new/cdrkit-1.1.6/genisoimage/CMakeLists.txt 2007-05-03 12:27:24.000000000 +0200
@@ -61,5 +61,5 @@
diag/isodump.1
diag/isoinfo.1
diag/isovfy.1
-DESTINATION share/man/man1)
-INSTALL(FILES genisoimagerc.5 DESTINATION share/man/man5)
+DESTINATION ${MANSUBDIR}/man1)
+INSTALL(FILES genisoimagerc.5 DESTINATION "${MANSUBDIR}/man5")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/genisoimage/eltorito.c new/cdrkit-1.1.6/genisoimage/eltorito.c
--- old/cdrkit-1.1.5.1/genisoimage/eltorito.c 2006-12-08 14:38:43.000000000 +0100
+++ new/cdrkit-1.1.6/genisoimage/eltorito.c 2007-05-03 12:01:20.000000000 +0200
@@ -228,6 +228,15 @@
iso9660_file_length(p2, s_entry, 0);
/* flag file as necessary */
+
+ /*
+ * If the current directory is hidden, then hide this entry
+ */
+ if (this_dir->dir_flags & INHIBIT_ISO9660_ENTRY)
+ bcat_de_flags |= INHIBIT_ISO9660_ENTRY;
+ if (this_dir->dir_flags & INHIBIT_JOLIET_ENTRY)
+ bcat_de_flags |= INHIBIT_JOLIET_ENTRY;
+
s_entry->de_flags = bcat_de_flags;
if ((use_XA || use_RockRidge) &&
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/icedax/CMakeLists.txt new/cdrkit-1.1.6/icedax/CMakeLists.txt
--- old/cdrkit-1.1.5.1/icedax/CMakeLists.txt 2007-02-09 23:02:42.000000000 +0100
+++ new/cdrkit-1.1.6/icedax/CMakeLists.txt 2007-05-03 13:15:47.000000000 +0200
@@ -10,9 +10,14 @@
ENDIF(HAVE_SYS_SOUNDCARD_H)
FIND_FILE (HAVE_LINUX_SOUNDCARD_H linux/soundcard.h)
IF(HAVE_LINUX_SOUNDCARD_H)
- ADD_DEFINITIONS(-DHAVE_LINUX_SOUNDCARD_H)
+ ADD_DEFINITIONS(-DHAVE_LINUX_SOUNDCARD_H)
ENDIF(HAVE_LINUX_SOUNDCARD_H)
+FIND_LIBRARY(HAVE_LIBOSSAUDIO "ossaudio")
+IF(HAVE_LIBOSSAUDIO)
+ LIST(APPEND EXTRA_LIBS "ossaudio")
+ENDIF(HAVE_LIBOSSAUDIO)
+
LIST(APPEND EXTRA_LIBS paranoia)
IF (WIN32)
LIST(APPEND EXTRA_LIBS winmm)
@@ -25,5 +30,5 @@
INSTALL(TARGETS icedax DESTINATION bin)
INSTALL(PROGRAMS pitchplay readmult cdda2mp3 cdda2ogg DESTINATION bin)
-INSTALL(FILES cdda2ogg.1 icedax.1 pitchplay.1 readmult.1 list_audio_tracks.1 DESTINATION share/man/man1)
+INSTALL(FILES cdda2ogg.1 icedax.1 pitchplay.1 readmult.1 list_audio_tracks.1 DESTINATION ${MANSUBDIR}/man1)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/icedax/interface.c new/cdrkit-1.1.6/icedax/interface.c
--- old/cdrkit-1.1.5.1/icedax/interface.c 2007-04-10 17:01:46.000000000 +0200
+++ new/cdrkit-1.1.6/icedax/interface.c 2007-05-04 02:45:51.000000000 +0200
@@ -613,7 +613,7 @@
}
if (global.scandevs) {
- list_devices(stdout);
+ list_devices(usalp, stdout, 0);
exit(0);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/include/AddSchilyBits.cmake new/cdrkit-1.1.6/include/AddSchilyBits.cmake
--- old/cdrkit-1.1.5.1/include/AddSchilyBits.cmake 2006-11-26 23:01:59.000000000 +0100
+++ new/cdrkit-1.1.6/include/AddSchilyBits.cmake 2007-05-03 12:27:24.000000000 +0200
@@ -3,7 +3,11 @@
LIST(APPEND EXTRA_LIBS "rols")
-# not the proper place but ok, because it is linked from everywhere
+# abuse this include file to make sure the target is set
+
+ IF(NOT MANSUBDIR)
+ SET(MANSUBDIR "share/man")
+ ENDIF(NOT MANSUBDIR)
ENDIF(NOT CHECKED_rols)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/INSTALL new/cdrkit-1.1.6/INSTALL
--- old/cdrkit-1.1.5.1/INSTALL 2007-01-02 16:43:27.000000000 +0100
+++ new/cdrkit-1.1.6/INSTALL 2007-05-03 12:27:24.000000000 +0200
@@ -9,7 +9,7 @@
- GNU make
- working GCC compiler environment
- maybe additional requirements for your operating system, see
- doc/plattforms/... and FAQ.
+ doc/platforms/... and FAQ.
Recommended: glibc (Linux standard) or GNU libiconv
COMPILATION:
@@ -20,26 +20,22 @@
Run: make install
-To force a custom target directory, use something like:
-
-make install PREFIX=/opt/cdrkit
+To customize the target paths, some variables can be appended to this line:
+PREFIX=/opt/cdrkit/latest (default: CMake preset, e.g. /usr/local)
+MANSUBDIR=man (default: share/man)
TROUBLESHOOTING:
-Problem: "make install" uses the wrong target directory and appends /usr/local
- to it.
-Solution: override the complete target path with PREFIX=... (see above)
-
Problem: Linking error.
Solution: Look for missing dependencies. If you installed additional libraries
in non-system paths, they may have a conflict with the system libraries which
are already installed. Make sure that the linker gets the right ones, those
-that belong to the headers. For example, if you installed libmagic and libiconf
+that belong to the headers. For example, if you installed libmagic and libiconv
into /usr/local/{include,lib} and your compiler or linker have different
defaults (eg. they use /usr/lib, /usr/include or intermix them), then you can
set CFLAGS and LDFLAGS vars to override the system defaults, assumed by cmake.
Example:
-(AIX5l, /usr/lib is default lib dir but /usr/local/include is prefered by gcc
+(AIX5l, /usr/lib is default lib dir but /usr/local/include is preferred by gcc
for headers), command:
make clean
make CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
@@ -64,7 +60,7 @@
Solution: Examine the following files:
build/CMakeFiles/CMakeFiles/CMakeOutput.log
build/CMakeFiles/CMakeOutput.log
-and look for failed commands. Some checks are expected to fail if the plattform
+and look for failed commands. Some checks are expected to fail if the platform
does not provide a certain feature, others must not fail. Look the failing
check and use THE FORCE to find related problems and solutions.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/Makefile new/cdrkit-1.1.6/Makefile
--- old/cdrkit-1.1.5.1/Makefile 2007-04-21 11:46:29.000000000 +0200
+++ new/cdrkit-1.1.6/Makefile 2007-05-06 12:23:54.000000000 +0200
@@ -10,6 +10,10 @@
CMAKETWEAKS += ( cd build ; cmake .. -DCMAKE_INSTALL_PREFIX="$(PREFIX)") || exit 1;
endif
+ifneq ($(MANSUBDIR),)
+CMAKETWEAKS += ( cd build ; cmake .. -DMANSUBDIR="$(MANSUBDIR)" ) || exit 1;
+endif
+
default_target: all
DISTNAME=cdrkit-$(shell cat VERSION)
@@ -28,7 +32,7 @@
clean:
rm -rf build
-release:
+tarball:
# if test "$(shell svn status | grep -v -i make)" ; then echo Uncommited files found. Run \"svn status\" to display them. ; exit 1 ; fi
@if test -f ../$(DISTNAME).tar.gz ; then echo ../$(DISTNAME).tar.gz exists, not overwritting ; exit 1; fi
-svn up
@@ -41,6 +45,14 @@
test -e /etc/debian_version && ln -f ../$(DISTNAME).tar.gz ../$(DEBSRCNAME) || true
test -e ../tarballs && ln -f ../$(DISTNAME).tar.gz ../tarballs/$(DEBSRCNAME) || true
+tarball-remove:
+ rm -f ../$(DISTNAME).tar.gz ../tarballs/$(DEBSRCNAME) ../$(DEBSRCNAME)
+
+SVNBASE=$(shell svn info | grep URL: | cut -f2 -d' ' | xargs dirname)
+release: tarball
+ svn ci
+ svn cp $(SVNBASE)/trunk $(SVNBASE)/tags/release_$(shell cat VERSION)
+
#%::
# $(MAKE) $(MAKE_FLAGS) build/Makefile
# $(CMAKETWEAKS)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/readom/CMakeLists.txt new/cdrkit-1.1.6/readom/CMakeLists.txt
--- old/cdrkit-1.1.5.1/readom/CMakeLists.txt 2006-12-08 11:15:57.000000000 +0100
+++ new/cdrkit-1.1.6/readom/CMakeLists.txt 2007-05-03 12:27:24.000000000 +0200
@@ -16,4 +16,4 @@
INSTALL(TARGETS readom DESTINATION bin)
INSTALL(FILES
readom.1
-DESTINATION share/man/man1)
+DESTINATION ${MANSUBDIR}/man1)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/TODO new/cdrkit-1.1.6/TODO
--- old/cdrkit-1.1.5.1/TODO 2007-04-21 11:20:05.000000000 +0200
+++ new/cdrkit-1.1.6/TODO 2007-05-06 15:23:48.000000000 +0200
@@ -1,4 +1,12 @@
+ - on various places in drv_dvd.c, check for the correct answer ("long write in
+ progress" and friends) instead of using the dumb wait_unit_ready method.
+
+ - (for consideration) similar got natname management in libusal, add a method
+ to check whether the device can be opened without side effects (for safety)
+ and then get the device capabilities to select the best drive for the input
+ size. Kind of generic implementation of the Linux specific guessing code.
+
- look for alternative ways to find the maximum DMA transfer size, Schilling
wrote something about SKGETSIZE ioctl being fixed in recent Linux kernel
versions
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/VERSION new/cdrkit-1.1.6/VERSION
--- old/cdrkit-1.1.5.1/VERSION 2007-04-21 11:43:17.000000000 +0200
+++ new/cdrkit-1.1.6/VERSION 2007-05-06 12:23:54.000000000 +0200
@@ -1 +1 @@
-1.1.5.1
+1.1.6
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/wodim/CMakeLists.txt new/cdrkit-1.1.6/wodim/CMakeLists.txt
--- old/cdrkit-1.1.5.1/wodim/CMakeLists.txt 2007-01-26 01:38:32.000000000 +0100
+++ new/cdrkit-1.1.6/wodim/CMakeLists.txt 2007-05-03 12:27:24.000000000 +0200
@@ -34,4 +34,4 @@
INSTALL(TARGETS wodim DESTINATION bin)
INSTALL(FILES
wodim.1
-DESTINATION share/man/man1)
+DESTINATION ${MANSUBDIR}/man1)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/wodim/drv_mmc.c new/cdrkit-1.1.6/wodim/drv_mmc.c
--- old/cdrkit-1.1.5.1/wodim/drv_mmc.c 2007-02-09 23:02:42.000000000 +0100
+++ new/cdrkit-1.1.6/wodim/drv_mmc.c 2007-05-06 12:23:54.000000000 +0200
@@ -225,45 +225,45 @@
};
cdr_t cdr_mdvd = {
- 0, 0,
- CDR_SWABAUDIO,
- CDR_CDRW_ALL,
- 370,370,
- "mmc_mdvd",
- "generic SCSI-3/mmc DVD-R(W) driver",
- 0,
- (dstat_t *)0,
- identify_mmc,
- attach_mdvd,
- init_mmc,
- getdisktype_mdvd,
- scsi_load,
- scsi_unload,
- read_buff_cap,
- cmd_dummy, /* check_recovery */
- (int(*)__PR((SCSI *, cdr_t *, int)))cmd_dummy, /* recover */
- speed_select_mdvd,
- select_secsize,
- next_wr_addr_mdvd,
- (int(*)(SCSI *, Ulong))cmd_ill, /* reserve_track */
- scsi_cdr_write,
- (int(*)__PR((track_t *, void *, BOOL)))cmd_dummy, /* gen_cue */
- (int(*)__PR((SCSI *usalp, cdr_t *, track_t *)))cmd_dummy, /* send_cue */
- write_leadin_mmc,
- open_track_mdvd,
- close_track_mdvd,
- open_session_mdvd,
- cmd_dummy,
- cmd_dummy, /* abort */
- read_session_offset,
- fixate_mdvd,
- stats_mmc,
- blank_mmc,
- format_mdvd,
- send_opc_mmc,
- opt1_mdvd,
- opt2_mmc,
- dvd_dual_layer_split,
+ 0, 0,
+ CDR_SWABAUDIO,
+ CDR_CDRW_ALL,
+ 370,370,
+ "mmc_mdvd",
+ "generic SCSI-3/mmc DVD-R(W) driver",
+ 0,
+ (dstat_t *)0,
+ identify_mmc,
+ attach_mdvd,
+ init_mmc,
+ getdisktype_mdvd,
+ scsi_load,
+ scsi_unload,
+ read_buff_cap,
+ cmd_dummy, /* check_recovery */
+ (int(*)__PR((SCSI *, cdr_t *, int)))cmd_dummy, /* recover */
+ speed_select_mdvd,
+ select_secsize,
+ next_wr_addr_mdvd,
+ (int(*)(SCSI *, Ulong))cmd_ill, /* reserve_track */
+ scsi_cdr_write,
+ (int(*)__PR((track_t *, void *, BOOL)))cmd_dummy, /* gen_cue */
+ (int(*)__PR((SCSI *usalp, cdr_t *, track_t *)))cmd_dummy, /* send_cue */
+ write_leadin_mmc,
+ open_track_mdvd,
+ close_track_mdvd,
+ open_session_mdvd,
+ cmd_dummy,
+ cmd_dummy, /* abort */
+ read_session_offset,
+ fixate_mdvd,
+ stats_mmc,
+ blank_mmc,
+ format_mdvd,
+ send_opc_mmc,
+ opt1_mdvd,
+ opt2_mmc,
+ dvd_dual_layer_split,
};
/*
@@ -1499,23 +1499,25 @@
static int
getdisktype_mdvd(SCSI *usalp, cdr_t *dp)
{
- int ret = 0;
- dstat_t *dsp = dp->cdr_dstat;
+ int ret = 0;
+ dstat_t *dsp = dp->cdr_dstat;
+
+ struct track_info track_info;
+ printf("HINT: use dvd+rw-mediainfo from dvd+rw-tools for information extraction.\n");
+ /* if(getdisktype_mmc(usalp, dp)<0)
+ return -1;
+ */
+
+ /* read rzone info to get the space left on disk */
+ /*ds_trlast is the last rzone on disk, can be invisible */
+ if(read_rzone_info(usalp, (caddr_t)&track_info, sizeof(track_info))>=0)
+ dsp->ds_maxblocks=a_to_u_4_byte(track_info.free_blocks)+a_to_4_byte(track_info.next_writable_addr);
+
+ dsp->ds_disktype&= ~DT_CD;
+ dsp->ds_disktype|= DT_DVD;
+
+ return (ret);
- struct track_info track_info;
- if(getdisktype_mmc(usalp, dp)<0)
- return -1;
-
- /* read rzone info to get the space left on disk */
- /*ds_trlast is the last rzone on disk, can be invisible */
- if(read_rzone_info(usalp, (caddr_t)&track_info, sizeof(track_info))>=0)
- dsp->ds_maxblocks=a_to_u_4_byte(track_info.free_blocks)+a_to_4_byte(track_info.next_writable_addr);
-
- dsp->ds_disktype&= ~DT_CD;
- dsp->ds_disktype|= DT_DVD;
-
- return (ret);
-
}
static int
@@ -2717,6 +2719,11 @@
fixate_mdvd(SCSI *usalp, cdr_t *dp, track_t *trackp)
{
int ret;
+ if (scsi_flush_cache(usalp, (dp->cdr_cmdflags&F_IMMED) != 0) < 0) {
+ printf("Trouble flushing the cache\n");
+ return -1;
+ }
+ wait_unit_ready(usalp, 300); /* XXX Wait for ATAPI */
/*set a really BIG timeout and call fixate_mmc
The BIG timeout is needed in case there was a very short rzone to write at the
beginning of the disk, because lead-out needs to be at some distance.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/wodim/scsi_scan.c new/cdrkit-1.1.6/wodim/scsi_scan.c
--- old/cdrkit-1.1.5.1/wodim/scsi_scan.c 2007-04-10 17:01:46.000000000 +0200
+++ new/cdrkit-1.1.6/wodim/scsi_scan.c 2007-05-04 09:31:20.000000000 +0200
@@ -35,9 +35,6 @@
#include
#include
-#include
-#include
-#include
#include
#include
@@ -53,11 +50,12 @@
#include
#include
#include
-#include
static void print_product(FILE *f, struct scsi_inquiry *ip);
int select_target(SCSI *usalp, FILE *f);
+#define MAXDEVCOUNT (256+26)
+
extern BOOL check_linux_26();
static void print_product(FILE *f, struct scsi_inquiry *ip) {
@@ -70,21 +68,130 @@
usal_fprintdev(f, ip);
}
-#define MAXDEVCOUNT (256+26)
+SCSI * open_auto(int64_t need_size, int debug, int lverbose) {
+ int res;
+ SCSI * usalp = NULL;
+ char errstr[80];
+
+#ifdef __linux__
+ /* quick-and-dirty code but should do what is supposed to, more quickly */
+
+ /*
+ * For Linux, try these strategies, in order:
+ * 1. stat /dev/cdrw or /dev/dvdrw, depending on size we need.
+ * 2. Read /proc/sys/dev/cdrom/info, look for a CD-R/DVD-R.
+ * Will fail for kernel 2.4 or if cdrom module not loaded.
+ * 3. stat /dev/cdrom, just assume that it can write media.
+
+ An example for procfs file contents, beware of the TABs
+
+---
+CD-ROM information, Id: cdrom.c 3.20 2003/12/17
+
+drive name: hdc hda
+drive speed: 40 40
+drive # of slots: 1 1
+Can close tray: 1 1
+Can open tray: 1 1
+Can lock tray: 1 1
+Can change speed: 1 1
+Can select disk: 0 0
+Can read multisession: 1 1
+Can read MCN: 1 1
+Reports media changed: 1 1
+Can play audio: 1 1
+Can write CD-R: 0 1
+Can write CD-RW: 0 1
+Can read DVD: 1 1
+Can write DVD-R: 0 1
+Can write DVD-RAM: 0 1
+Can read MRW: 0 1
+Can write MRW: 0 1
+Can write RAM: 0 1
+
+---
+*/
+ struct stat statbuf;
+ /* XXX Good guess? BD-RE recorders may not support CDRW anymore... */
+ char *type="CD-R", *key="Can write CD-R:", *guessdev="/dev/cdrw", *result=NULL;
+ FILE *fh;
+
+ if( need_size > 360000*2048 ) {
+ type="DVD-R";
+ guessdev="/dev/dvdrw";
+ key="Can write DVD-R:";
+ }
+
+ if(need_size>10240) /* don't bother with weird numbers */
+ fprintf(stderr, "Looking for a %s drive to store %.2f MiB...\n", type, (float)need_size/1048576.0);
+ if(0==stat(guessdev, &statbuf))
+ result=guessdev;
+ else if(0!= (fh = fopen("/proc/sys/dev/cdrom/info", "r")) ) {
+ /* ok, going the hard way */
+ char *nameline=NULL;
+ static char buf[256];
+ int kn = strlen(key);
+
+ buf[255]='\0';
+
+ while(fgets(buf, sizeof(buf), fh)) {
+ if(0==strncmp(buf, "drive name:", 11))
+ nameline=strdup(buf);
+ if(nameline && 0==strncmp(buf, key, kn)) {
+ int p=kn;
+ char *descptr=nameline+11; /* start at the known whitespace */
+ while(p0)
+ return usalp;
+ else
+ usal_close(usalp);
+ return NULL;
+}
-int list_devices(SCSI *usalp, FILE *f) {
+int list_devices(SCSI *usalp, FILE *f, int pickup_first) {
int initiator;
-#ifdef FMT
- int cscsibus = usal_scsibus(usalp);
- int ctarget = usal_target(usalp);
- int clun = usal_lun(usalp);
-#endif
- int n, i;
- int low = -1;
- int high = -1;
- int amt = 0;
+ int i;
int bus;
int tgt;
int lun = 0;
@@ -110,8 +217,6 @@
//fprintf(f, "scsibus%d:\n", bus);
for (tgt = 0; tgt < 16; tgt++) {
- n = bus*100 + tgt;
-
usal_settarget(usalp, bus, tgt, lun);
have_tgt = unit_ready(usalp) || usalp->scmd->error != SCG_FATAL;
@@ -134,6 +239,7 @@
getdev(usalp, FALSE);
if(usalp->inq->type == INQ_ROMD || usalp->inq->type == INQ_WORM) {
char *p;
+
for(p=usalp->inq->vendor_info + 7 ; p >= usalp->inq->vendor_info; p--) {
if(isspace((unsigned char)*p))
*p='\0';
@@ -147,6 +253,11 @@
break;
}
snprintf(buf, sizeof(buf), "%2d dev='%s'\t%s : '%.8s' '%.16s'\n", ndevs, usal_natname(usalp, bus, tgt, lun), perms, usalp->inq->vendor_info, usalp->inq->prod_ident);
+ /* alternative use, only select the first device */
+ if(pickup_first) {
+ printf("Using drive: %s\n", usal_natname(usalp, bus, tgt, lun));
+ return 1;
+ }
lines[ndevs++]=strdup(buf);
}
@@ -154,6 +265,12 @@
}
usalp->silent--;
+ /* should have been returned before if there was a recorder */
+ if(pickup_first)
+ return 0;
+
+ /* now start the output */
+
fprintf(stdout, "%s: Overview of accessible drives (%d found) :\n"
"-------------------------------------------------------------------------\n",
get_progname(), ndevs);
@@ -163,19 +280,7 @@
}
fprintf(stdout, "-------------------------------------------------------------------------\n");
-
-
- n = -1;
-#ifdef FMT
- getint("Select target", &n, low, high);
- bus = n/100;
- tgt = n%100;
- usal_settarget(usalp, bus, tgt, lun);
- return (select_unit(usalp));
-
- usal_settarget(usalp, cscsibus, ctarget, clun);
-#endif
- return (amt);
+ return ndevs;
}
int select_target(SCSI *usalp, FILE *f) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/wodim/scsi_scan.h new/cdrkit-1.1.6/wodim/scsi_scan.h
--- old/cdrkit-1.1.5.1/wodim/scsi_scan.h 2006-11-23 19:57:28.000000000 +0100
+++ new/cdrkit-1.1.6/wodim/scsi_scan.h 2007-05-04 02:45:51.000000000 +0200
@@ -34,6 +34,10 @@
#ifndef _SCSI_SCAN_H
#define _SCSI_SCAN_H
+#include
+
extern int select_target(SCSI *usalp, FILE *f);
+extern int list_devices(SCSI *usalp, FILE *f, int pickup_type);
+extern SCSI * open_auto(int64_t need_size, int debug, int lverbose);
#endif /* _SCSI_SCAN_H */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/cdrkit-1.1.5.1/wodim/wodim.c new/cdrkit-1.1.6/wodim/wodim.c
--- old/cdrkit-1.1.5.1/wodim/wodim.c 2007-04-10 17:01:46.000000000 +0200
+++ new/cdrkit-1.1.6/wodim/wodim.c 2007-05-04 02:45:51.000000000 +0200
@@ -12,7 +12,7 @@
/*
*
- * Modified by Eduard Bloch in 08/2006
+ * Modified by Eduard Bloch in 08/2006 and later
*/
/* @(#)cdrecord.c 1.310 06/02/09 Copyright 1995-2006 J. Schilling */
@@ -360,9 +360,9 @@
* XXX mlockall() needs root privilleges.
*/
if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0) {
- if(lverbose>2)
- fprintf(stderr,
- "W: Cannot do mlockall(2). Possibly increased risk for buffer underruns.\n");
+ if(lverbose>2)
+ fprintf(stderr,
+ "W: Cannot do mlockall(2). Possibly increased risk for buffer underruns.\n");
}
#endif
@@ -402,22 +402,36 @@
exit(0);
}
- /*
- if (scandevs)
- return (scan_devices(usalp, stdout, stderr));
-*/
- usalp = usal_open(dev, errstr, sizeof (errstr),
- debug, lverbose);
- if(!usalp)
- {
- errmsg("\nCannot open SCSI driver!\n"
- "For possible targets try 'wodim --devices' or 'wodim -scanbus'.\n"
- "For possible transport specifiers try 'wodim dev=help'.\n"
- "For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from\n"
- "the wodim documentation.\n");
- exit(EX_BAD);
- }
-
+ if( (!dev || *dev=='\0'|| 0==strcmp(dev, "-1")) && (flags & F_SCANBUS)==0 ) {
+ int64_t need_size=0L;
+ struct stat statbuf;
+ int t;
+
+ fprintf(stderr, "Device was not specified. Trying to find an appropriate drive...\n");
+
+ /* estimate how much data user wants to write */
+ for(t=1;t<=tracks;t++) {
+ if(track[t].tracksize>=0)
+ need_size+=track[t].tracksize;
+ else if(0==stat(track[t].filename, &statbuf))
+ need_size+=statbuf.st_size;
+ }
+ usalp=open_auto(need_size, debug, lverbose);
+ }
+
+ if(!usalp)
+ usalp = usal_open(dev, errstr, sizeof(errstr), debug, lverbose);
+
+ if(!usalp)
+ {
+ errmsg("\nCannot open SCSI driver!\n"
+ "For possible targets try 'wodim --devices' or 'wodim -scanbus'.\n"
+ "For possible transport specifiers try 'wodim dev=help'.\n"
+ "For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from\n"
+ "the wodim documentation.\n");
+ exit(EX_BAD);
+ }
+
#ifdef HAVE_PRIV_SET
#ifdef PRIV_DEBUG
fprintf(stderr, "file_dac_read: %d\n", priv_ineffect(PRIV_FILE_DAC_READ));
@@ -511,8 +525,8 @@
if ((buf = usal_getbuf(usalp, bufsize)) == NULL)
comerr("Cannot get SCSI I/O buffer.\n");
- if (scandevs)
- return (list_devices(usalp, stdout));
+ if (scandevs)
+ return (list_devices(usalp, stdout, 0));
if ((flags & F_SCANBUS) != 0) {
select_target(usalp, stdout);
@@ -3741,129 +3755,6 @@
if (dev != *devp && (*flagsp & F_SCANBUS) == 0)
*devp = dev;
- /* quick-and-dirty code but should do what is supposed to. Possible
- * replacement with libhal using code in future. */
- if ( (!*devp || 0 == strcmp(*devp, "-1")) && (*flagsp & (F_VERSION|F_SCANBUS)) == 0) {
-#ifdef __linux__
- /*
- * For Linux, try these strategies, in order:
- * 1. stat /dev/cdrw or /dev/dvdrw, depending on size we need.
- * 2. Read /proc/sys/dev/cdrom/info, look for a CD-R/DVD-R.
- * Will fail for kernel 2.4 or if cdrom module not loaded.
- * 3. stat /dev/cdrom, just assume that it can write media.
-
- An example for procfs file contents, beware of the TABs
-
----
-CD-ROM information, Id: cdrom.c 3.20 2003/12/17
-
-drive name: hdc hda
-drive speed: 40 40
-drive # of slots: 1 1
-Can close tray: 1 1
-Can open tray: 1 1
-Can lock tray: 1 1
-Can change speed: 1 1
-Can select disk: 0 0
-Can read multisession: 1 1
-Can read MCN: 1 1
-Reports media changed: 1 1
-Can play audio: 1 1
-Can write CD-R: 0 1
-Can write CD-RW: 0 1
-Can read DVD: 1 1
-Can write DVD-R: 0 1
-Can write DVD-RAM: 0 1
-Can read MRW: 0 1
-Can write MRW: 0 1
-Can write RAM: 0 1
-
----
-*/
- struct stat statbuf;
- char *type="CD-R", *key="Can write CD-R:", *guessdev="/dev/cdrw", *result=NULL;
- long long filesize=0;
- FILE *fh;
-
- if(tracks>0) {
- filesize=trackp[tracks].tracksize;
- if(filesize<=0 && 0==stat(trackp[tracks].filename, &statbuf)) {
- filesize=statbuf.st_size;
- }
- }
-
- if( filesize > 360000*2048 ) {
- type="DVD-R";
- guessdev="/dev/dvdrw";
- key="Can write DVD-R:";
- }
-
- fprintf(stderr, "INFO: no device specified, looking for a %s drive to store %.2f MiB...\n", type, (float)filesize/1048576.0);
- if(0==stat(guessdev, &statbuf))
- result=guessdev;
- else if(0!= (fh = fopen("/proc/sys/dev/cdrom/info", "r")) ) {
- /* ok, going the hard way */
- char *nameline=NULL;
- static char buf[256];
- int kn = strlen(key);
-
- buf[255]='\0';
-
- while(fgets(buf, sizeof(buf), fh)) {
- if(0==strncmp(buf, "drive name:", 11))
- nameline=strdup(buf);
- if(nameline && 0==strncmp(buf, key, kn)) {
- int p=kn;
- char *descptr=nameline+11; /* start at the known whitespace */
- while(p