diff options
Diffstat (limited to 'src/modules/SystemBackendPosix/SystemBackendPosix.cpp')
-rw-r--r-- | src/modules/SystemBackendPosix/SystemBackendPosix.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/modules/SystemBackendPosix/SystemBackendPosix.cpp b/src/modules/SystemBackendPosix/SystemBackendPosix.cpp index 4eb5807..801fcd4 100644 --- a/src/modules/SystemBackendPosix/SystemBackendPosix.cpp +++ b/src/modules/SystemBackendPosix/SystemBackendPosix.cpp @@ -26,11 +26,10 @@ namespace Mad { namespace Modules { - -boost::shared_ptr<SystemBackendPosix> SystemBackendPosix::backend; +namespace SystemBackendPosix { void SystemBackendPosix::getFSInfo(std::vector<Common::SystemManager::FSInfo> *fsInfo) throw(Core::Exception) { - Core::ThreadManager::get()->detach(); + application->getThreadManager()->detach(); FILE *pipe = popen("/bin/df -P -k", "r"); if(!pipe) @@ -79,14 +78,14 @@ void SystemBackendPosix::getFSInfo(std::vector<Common::SystemManager::FSInfo> *f } void SystemBackendPosix::shutdown() throw(Core::Exception) { - Core::ThreadManager::get()->detach(); + application->getThreadManager()->detach(); if(system("/sbin/halt") != 0) throw(Core::Exception(Core::Exception::NOT_AVAILABLE)); } void SystemBackendPosix::reboot() throw(Core::Exception) { - Core::ThreadManager::get()->detach(); + application->getThreadManager()->detach(); if(system("/sbin/reboot") != 0) throw(Core::Exception(Core::Exception::NOT_AVAILABLE)); @@ -94,16 +93,4 @@ void SystemBackendPosix::reboot() throw(Core::Exception) { } } - - -extern "C" { - -void SystemBackendPosix_init() { - Mad::Modules::SystemBackendPosix::registerBackend(); -} - -void SystemBackendPosix_deinit() { - Mad::Modules::SystemBackendPosix::unregisterBackend(); -} - } |