head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.32 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.30 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.28 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.26 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.3.0.24 pkgsrc-2009Q4-base:1.3 pkgsrc-2008Q4:1.3.0.22 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.20 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.18 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.16 pkgsrc-2008Q2-base:1.3 pkgsrc-2008Q1:1.3.0.14 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.12 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.10 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.8 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.6 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.4 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.2 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.2.0.2 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.1.1.1.0.2 pkgsrc-2006Q1-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2006.07.20.11.22.25; author markd; state dead; branches; next 1.2; 1.2 date 2006.06.13.12.36.16; author markd; state Exp; branches; next 1.1; 1.1 date 2006.02.01.00.53.00; author markd; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2006.02.01.00.53.00; author markd; state Exp; branches; next ; desc @@ 1.3 log @Update k3b to 0.12.16. * FreeBSD Compile fixes (thanks to Heiner Eichmann). * NetBSD support (thanks to Mark Davies) * Always force 44.1khz in the Lame MP3 encoder plugin. * Fixed VideoDVD creation on rewritable media. * Fixed Copy of Enhanced Audio CDs with CD-Text. * Changed default boot cataloge name from "boot.cataloge" to "boot.catalog" * Fixed a crash when reusing the same DVD Iso Image writing dialog. * Ignore case when comparing MD5 sums entered by the user. * Make sure that filenames in a data project's folder are unique. * Allow index statements bigger than 99 minutes in cue files. * Properly set the length of SCSI commands (again this fixes some device detection problems). @ text @$NetBSD: patch-af,v 1.2 2006/06/13 12:36:16 markd Exp $ --- /dev/null 2006-01-31 00:47:43.000000000 +1300 +++ libk3bdevice/k3bscsicommand_netbsd.cpp @@@@ -0,0 +1,89 @@@@ +/* + * + */ + +#include "k3bscsicommand.h" +#include "k3bdevice.h" + +#include + +#include +#include +// #include +// #include + +#include +#include + + +class K3bDevice::ScsiCommand::Private +{ +public: + struct scsireq cmd; +}; + + +void K3bDevice::ScsiCommand::clear() +{ + ::memset( &d->cmd, 0, sizeof(struct scsireq ) ); +} + + +unsigned char& K3bDevice::ScsiCommand::operator[]( size_t i ) +{ + return d->cmd.cmd[i]; +} + + +int K3bDevice::ScsiCommand::transport( TransportDirection dir, + void* data, + size_t len ) +{ + bool needToClose = false; + if( m_device ) { + if( !m_device->isOpen() ) { + needToClose = true; + } + m_device->open( dir == TR_DIR_WRITE ); + m_deviceHandle = m_device->handle(); + } + + if( m_deviceHandle == -1 ) + return -1; + + d->cmd.cmdlen = 12; + d->cmd.timeout = 10000; + d->cmd.databuf = (caddr_t) data; + d->cmd.datalen = len; + // d->cmd.datalen_used = len; + d->cmd.senselen = SENSEBUFLEN; + switch (dir) + { + case TR_DIR_READ: + d->cmd.flags = SCCMD_READ; + break; + case TR_DIR_WRITE: + d->cmd.flags = SCCMD_WRITE; + break; + default: + d->cmd.flags = SCCMD_READ; + break; + } + + int i = ::ioctl( m_deviceHandle, SCIOCCOMMAND, &d->cmd ); + + if( needToClose ) + m_device->close(); + + if( i || (d->cmd.retsts != SCCMD_OK)) { + debugError( d->cmd.cmd[0], + d->cmd.retsts, + d->cmd.sense[2], + d->cmd.sense[12], + d->cmd.sense[13] ); + + return 1; + } + else + return 0; +} @ 1.2 log @Rework how device locking/ejecting is done. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Initial revision @ text @d4 2 a5 2 +++ libk3bdevice/k3bscsicommand_netbsd.cpp 2006-01-31 00:08:25.000000000 +1300 @@@@ -0,0 +1,136 @@@@ d17 2 a18 2 +#include +#include a94 47 + +bool K3bDevice::ScsiCommand::eject ( bool open ) +{ + unsigned long request = open ? DIOCEJECT : CDIOCCLOSE; + int arg = 0; + bool needToClose = false; + if( m_device ) { + if( !m_device->isOpen() ) { + needToClose = true; + } + m_device->open( false ); + m_deviceHandle = m_device->handle(); + } + + if( m_deviceHandle == -1 ) + return false; + + int i = ::ioctl( m_deviceHandle, request, &arg ); + + if( needToClose ) + m_device->close(); + + return i >= 0; +} + +bool K3bDevice::ScsiCommand::traylock ( bool on ) +{ + int arg = on ? 1 : 0; + bool needToClose = false; + if( m_device ) { + if( !m_device->isOpen() ) { + needToClose = true; + } + m_device->open( false ); + m_deviceHandle = m_device->handle(); + } + + if( m_deviceHandle == -1 ) + return false; + + int i = ::ioctl( m_deviceHandle, DIOCLOCK, &arg ); + + if( needToClose ) + m_device->close(); + + return i >= 0; +} @ 1.1.1.1 log @Initial import of k3b version 0.12.10. From the pkgsrc-wip package by Martijn van Buul. Updated to 0.12.10 and finished off by me. K3b is a CD and DVD burning application for Linux and BSD systems optimized for KDE. It provides a comfortable user interface to perform most CD/DVD burning tasks like creating an Audio CD from a set of audio files or copying a CD. The actual burning in K3b is done by the command line utilities cdrecord, cdrdao, and growisofs. @ text @@