-rw-r--r-- | libopie2/opiecore/linux/opcmciasystem.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libopie2/opiecore/linux/opcmciasystem.cpp b/libopie2/opiecore/linux/opcmciasystem.cpp index 2eece6b..054d261 100644 --- a/libopie2/opiecore/linux/opcmciasystem.cpp +++ b/libopie2/opiecore/linux/opcmciasystem.cpp @@ -40,25 +40,25 @@ using namespace Opie::Core; /* STD */ #include <errno.h> #include <fcntl.h> #include <string.h> #include <stdlib.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #define PROC_DEVICES "/proc/devices" -#define OPCMCIA_DEBUG 1 +// #define OPCMCIA_DEBUG 1 /*====================================================================================== * OPcmciaSystem *======================================================================================*/ OPcmciaSystem* OPcmciaSystem::_instance = 0; OPcmciaSystem::OPcmciaSystem() :_major( 0 ) { qDebug( "OPcmciaSystem::OPcmciaSystem()" ); @@ -296,49 +296,49 @@ bool OPcmciaSocket::isEmpty() const return ! status() && ( Occupied || OccupiedCardBus ); } bool OPcmciaSocket::isSuspended() const { return status() && Suspended; } bool OPcmciaSocket::eject() { - return ::ioctl( _fd, DS_EJECT_CARD ); + return ::ioctl( _fd, DS_EJECT_CARD ) != -1; } bool OPcmciaSocket::insert() { - return ::ioctl( _fd, DS_INSERT_CARD ); + return ::ioctl( _fd, DS_INSERT_CARD ) != -1; } bool OPcmciaSocket::suspend() { - return ::ioctl( _fd, DS_SUSPEND_CARD ); + return ::ioctl( _fd, DS_SUSPEND_CARD ) != -1; } bool OPcmciaSocket::resume() { - return ::ioctl( _fd, DS_RESUME_CARD ); + return ::ioctl( _fd, DS_RESUME_CARD ) != -1; } bool OPcmciaSocket::reset() { - return ::ioctl( _fd, DS_RESET_CARD ); + return ::ioctl( _fd, DS_RESET_CARD ) != -1; } QStringList OPcmciaSocket::productIdentity() const { QStringList list; cistpl_vers_1_t *vers = &_ioctlarg.tuple_parse.parse.version_1; if ( getTuple( CISTPL_VERS_1 ) ) { for ( int i = 0; i < CISTPL_VERS_1_MAX_PROD_STRINGS; ++i ) { qDebug( " PRODID = '%s'", vers->str+vers->ofs[i] ); |