summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2010-12-02 06:23:02 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2010-12-03 01:16:44 -0800
commit0e371502fd57d5754c54d36d7ec29e8ef5bc6ae1 (patch)
tree61bf03f6bb5ce63a3804d136209de580ee04cfbe /MobileCydia.mm
parent0e1784b407f7de937a24bcf2fc5a2d9ef825f7bf (diff)
Prefer SBReboot() (when available) to system("reboot").
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 872e818..6121e6e 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -4449,7 +4449,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
break;
case 4:
- system("reboot");
+ if (void (*SBReboot)(mach_port_t) = reinterpret_cast<void (*)(mach_port_t)>(dlsym(RTLD_DEFAULT, "SBReboot")))
+ SBReboot(SBSSpringBoardServerPort());
+ else
+ system("reboot");
break;
}
}