]> git.saurik.com Git - cydia.git/commitdiff
Use reboot2() instead of system("reboot").
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 3 Dec 2010 00:00:57 +0000 (16:00 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 3 Dec 2010 09:19:13 +0000 (01:19 -0800)
MobileCydia.mm
iPhonePrivate.h

index 6121e6eb6d3bac72ec5f8c4d7af6c7d3f6cf6bbf..95963094f701cb84d037a8c44ad677f4b95ec63e 100644 (file)
 #include <sys/sysctl.h>
 #include <sys/param.h>
 #include <sys/mount.h>
+#include <sys/reboot.h>
 
 #include <fcntl.h>
 #include <notify.h>
@@ -4452,7 +4453,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
             if (void (*SBReboot)(mach_port_t) = reinterpret_cast<void (*)(mach_port_t)>(dlsym(RTLD_DEFAULT, "SBReboot")))
                 SBReboot(SBSSpringBoardServerPort());
             else
-                system("reboot");
+                reboot2(RB_AUTOBOOT);
         break;
     }
 }
index 9778f9dadf30fe83dca4cf4b7ac64c5fb2a13d4f..fd834c4b442feccf7e95e8d9da226bae99cb6fb1 100644 (file)
@@ -350,6 +350,7 @@ extern float const UIWebViewGrowsAndShrinksToFitHeight;
 extern float const UIWebViewScalesToFitScale;
 // }}}
 // extern "C" *(); {{{
+extern "C" void *reboot2(uint64_t flags);
 extern "C" mach_port_t SBSSpringBoardServerPort();
 extern "C" UIImage *_UIImageWithName(NSString *name);
 extern "C" void UISetColor(CGColorRef color);