summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2010-12-02 16:00:57 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2010-12-03 01:19:13 -0800
commitbb0fe3c941d750de3587298bee36d07ff92debda (patch)
tree1fc15adf4beb9c27bbeaba810ac0443a990d133f
parent0e371502fd57d5754c54d36d7ec29e8ef5bc6ae1 (diff)
Use reboot2() instead of system("reboot").
-rw-r--r--MobileCydia.mm3
-rw-r--r--iPhonePrivate.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 6121e6e..9596309 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -102,6 +102,7 @@
#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;
}
}
diff --git a/iPhonePrivate.h b/iPhonePrivate.h
index 9778f9d..fd834c4 100644
--- a/iPhonePrivate.h
+++ b/iPhonePrivate.h
@@ -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);