summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/linux/opcmciasystem.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/linux/opcmciasystem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/linux/opcmciasystem.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie2/opiecore/linux/opcmciasystem.cpp b/libopie2/opiecore/linux/opcmciasystem.cpp
index 21c5a84..9f151ce 100644
--- a/libopie2/opiecore/linux/opcmciasystem.cpp
+++ b/libopie2/opiecore/linux/opcmciasystem.cpp
@@ -133,48 +133,55 @@ int OPcmciaSystem::count() const
{
return _interfaces.count();
}
int OPcmciaSystem::cardCount() const
{
int nonEmpty = 0;
OPcmciaSystem::CardIterator it = iterator();
while ( it.current() )
{
if ( !it.current()->isEmpty() ) nonEmpty++;
++it;
}
return nonEmpty;
}
OPcmciaSocket* OPcmciaSystem::socket( unsigned int number )
{
return _interfaces.at( number );
}
+void OPcmciaSystem::restart()
+{
+ //FIXME Use OProcess or something that allows more control
+ ::system( "/etc/init.d/pcmcia restart" );
+}
+
+
OPcmciaSystem* OPcmciaSystem::instance()
{
if ( !_instance ) _instance = new OPcmciaSystem();
return _instance;
}
OPcmciaSystem::CardIterator OPcmciaSystem::iterator() const
{
return OPcmciaSystem::CardIterator( _interfaces );
}
/*======================================================================================
* OPcmciaSocket
*======================================================================================*/
OPcmciaSocket::OPcmciaSocket( int major, int socket, QObject* parent, const char* name )
:QObject( parent, name ), _major( major ), _socket( socket )
{
qDebug( "OPcmciaSocket::OPcmciaSocket()" );
init();
}