diff --git a/RootHelper/main.m b/RootHelper/main.m index 48b58ef..8a62337 100644 --- a/RootHelper/main.m +++ b/RootHelper/main.m @@ -50,6 +50,8 @@ typedef CFDictionaryRef (*_CFPreferencesCopyMultipleWithContainerType)(CFArrayRe BOOL _installPersistenceHelper(LSApplicationProxy* appProxy, NSString* sourcePersistenceHelper, NSString* sourceRootHelper); +extern int reboot3(uint64_t flags, ...); + NSArray* applicationsWithGroupId(NSString* groupId) { LSEnumerator* enumerator = [LSEnumerator enumeratorForApplicationProxiesWithOptions:0]; @@ -1525,6 +1527,11 @@ int MAIN_NAME(int argc, char *argv[], char *envp[]) // assumes that checkDeveloperMode() has already been called ret = !armDeveloperMode(NULL); } + else if([cmd isEqualToString:@"reboot"]) + { + sync(); + ret = reboot3(0); // do a normal reboot + } NSLog(@"trollstorehelper returning %d", ret); return ret;