$OpenBSD: patch-libk3bdevice_k3bdevicemanager_cpp,v 1.1.1.1 2008/05/11 22:18:35 jakemsr Exp $ --- libk3bdevice/k3bdevicemanager.cpp.orig Fri Nov 2 02:55:06 2007 +++ libk3bdevice/k3bdevicemanager.cpp Thu Jan 17 21:45:15 2008 @@ -97,7 +97,7 @@ typedef unsigned char u8; #include #endif -#ifdef Q_OS_NETBSD +#if defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) #include #endif @@ -238,7 +238,7 @@ int K3bDevice::DeviceManager::scanBus() #ifdef Q_OS_FREEBSD BSDDeviceScan(); #endif -#ifdef Q_OS_NETBSD +#if defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) NetBSDDeviceScan(); #endif @@ -327,11 +327,15 @@ void K3bDevice::DeviceManager::NetBSDDeviceScan() // Whole disk mask (According to cd(4), the AMD64, i386 and BeBox ports use // 'd' as whole-disk partition, the rest uses 'c'.) +#ifndef Q_OS_OPENBSD #if defined(__i386__) || defined (__amd64__) || defined (__bebox__) static const char slicename = 'd'; #else static const char slicename = 'c'; #endif +#else // Q_OS_OPENBSD + static const char slicename = 'c'; +#endif char devicename[11]; // /dev/rcdXd + trailing zero @@ -630,7 +634,7 @@ bool K3bDevice::DeviceManager::testForCdrom( const QSt Q_UNUSED(devicename); return true; #endif -#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD) +#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) bool ret = false; int cdromfd = K3bDevice::openDevice( devicename.ascii() ); if (cdromfd < 0) { @@ -648,7 +652,7 @@ bool K3bDevice::DeviceManager::testForCdrom( const QSt } else { k3bDebug() << devicename << " is block device (" << (int)(cdromStat.st_rdev & 0xFF) << ")" << endl; -#if defined(Q_OS_NETBSD) +#if defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) } { #endif @@ -798,7 +802,7 @@ void K3bDevice::DeviceManager::removeDevice( const QSt bool K3bDevice::DeviceManager::determineBusIdLun( const QString& dev, int& bus, int& id, int& lun ) { -#ifdef Q_OS_FREEBSD +#if defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) Q_UNUSED(dev); Q_UNUSED(bus); Q_UNUSED(id);