Diffstat (limited to 'libopie2/opiecore/linux/opcmciasystem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/linux/opcmciasystem.cpp | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/libopie2/opiecore/linux/opcmciasystem.cpp b/libopie2/opiecore/linux/opcmciasystem.cpp index 929e289..2eece6b 100644 --- a/libopie2/opiecore/linux/opcmciasystem.cpp +++ b/libopie2/opiecore/linux/opcmciasystem.cpp | |||
@@ -51,2 +51,4 @@ using namespace Opie::Core; | |||
51 | 51 | ||
52 | #define OPCMCIA_DEBUG 1 | ||
53 | |||
52 | /*====================================================================================== | 54 | /*====================================================================================== |
@@ -191,4 +193,10 @@ OPcmciaSocket::~OPcmciaSocket() | |||
191 | dev_t dev = makedev( _major, _socket ); | 193 | dev_t dev = makedev( _major, _socket ); |
194 | |||
195 | #ifdef OPCMCIA_DEBUG | ||
196 | QString filename = "/tmp/opcmciasystem-debug"; | ||
197 | if ( QFile::exists( filename ) ) | ||
198 | #else | ||
192 | QString filename = QString().sprintf( "/tmp/opcmciasystem-%d", ::getpid() ); | 199 | QString filename = QString().sprintf( "/tmp/opcmciasystem-%d", ::getpid() ); |
193 | if ( ::mknod( (const char*) filename, ( S_IFCHR|S_IREAD|S_IWRITE ), dev ) == 0 ) | 200 | if ( ::mknod( (const char*) filename, ( S_IFCHR|S_IREAD|S_IWRITE ), dev ) == 0 ) |
201 | #endif | ||
194 | { | 202 | { |
@@ -206,3 +214,3 @@ OPcmciaSocket::~OPcmciaSocket() | |||
206 | { | 214 | { |
207 | qWarning( "OPcmciaSocket::init() - can't create device node (%s)", strerror( errno ) ); | 215 | qWarning( "OPcmciaSocket::init() - can't create device node '%s' (%s)", (const char*) filename, strerror( errno ) ); |
208 | } | 216 | } |
@@ -293,3 +301,3 @@ bool OPcmciaSocket::isSuspended() const | |||
293 | { | 301 | { |
294 | return status() && Suspended; | 302 | return status() && Suspended; |
295 | } | 303 | } |
@@ -347,8 +355,12 @@ QStringList OPcmciaSocket::productIdentity() const | |||
347 | 355 | ||
348 | #if 0 | 356 | QString OPcmciaSocket::manufacturerIdentity() const |
349 | const QPair& OPcmciaSocket::manufacturerIdentity() const | ||
350 | { | 357 | { |
351 | return _manufId; | 358 | cistpl_manfid_t *manfid = &_ioctlarg.tuple_parse.parse.manfid; |
359 | if ( getTuple( CISTPL_MANFID ) ) | ||
360 | { | ||
361 | return QString().sprintf( "0x%04x, 0x%04x", manfid->manf, manfid->card ); | ||
362 | } | ||
363 | else | ||
364 | return "<unknown>"; | ||
352 | } | 365 | } |
353 | #endif | ||
354 | 366 | ||