summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-03-14 20:40:06 (UTC)
committer kergoth <kergoth>2003-03-14 20:40:06 (UTC)
commit2c53d85583ebece42b3b4c155540cd6a01542731 (patch) (unidiff)
treee30be18a7d98d9ebee5ac4a30bbe703b3a34cc28
parent2d20b81186bd9a4795af736710d0cb205ead9a77 (diff)
downloadopie-2c53d85583ebece42b3b4c155540cd6a01542731.zip
opie-2c53d85583ebece42b3b4c155540cd6a01542731.tar.gz
opie-2c53d85583ebece42b3b4c155540cd6a01542731.tar.bz2
Simplification.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 5ecc8bf..ba4fd66 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -739,9 +739,8 @@ void DesktopApplication::shutdown()
739} 739}
740 740
741void DesktopApplication::shutdown( ShutdownImpl::Type t ) 741void DesktopApplication::shutdown( ShutdownImpl::Type t )
742{ 742{
743 char *path[] = { "/sbin", "/usr/sbin", 0 };
744 char *opt = 0; 743 char *opt = 0;
745 744
746 switch ( t ) { 745 switch ( t ) {
747 case ShutdownImpl::ShutdownSystem: 746 case ShutdownImpl::ShutdownSystem:
@@ -750,10 +749,11 @@ void DesktopApplication::shutdown( ShutdownImpl::Type t )
750 case ShutdownImpl::RebootSystem: 749 case ShutdownImpl::RebootSystem:
751 if ( opt == 0 ) 750 if ( opt == 0 )
752 opt = "-r"; 751 opt = "-r";
753 752
754 if ( execle( "shutdown", "shutdown", opt, "now", ( void* ) 0, path ) < 0 ) 753 if ( execl( "/sbin/shutdown", "shutdown", opt, "now", ( void* ) 0) < 0 )
755 ::syslog ( LOG_ERR, "Erroring execing shutdown\n" ); 754 perror("shutdown");
755 // ::syslog ( LOG_ERR, "Erroring execing shutdown\n" );
756 756
757 break; 757 break;
758 case ShutdownImpl::RestartDesktop: 758 case ShutdownImpl::RestartDesktop:
759 restart(); 759 restart();