This commit is contained in:
Dhinak G 2023-12-22 00:27:09 -05:00
parent 8dc50d7555
commit 28aab08dec
No known key found for this signature in database
1 changed files with 7 additions and 0 deletions

View File

@ -50,6 +50,8 @@ typedef CFDictionaryRef (*_CFPreferencesCopyMultipleWithContainerType)(CFArrayRe
BOOL _installPersistenceHelper(LSApplicationProxy* appProxy, NSString* sourcePersistenceHelper, NSString* sourceRootHelper); BOOL _installPersistenceHelper(LSApplicationProxy* appProxy, NSString* sourcePersistenceHelper, NSString* sourceRootHelper);
extern int reboot3(uint64_t flags, ...);
NSArray<LSApplicationProxy*>* applicationsWithGroupId(NSString* groupId) NSArray<LSApplicationProxy*>* applicationsWithGroupId(NSString* groupId)
{ {
LSEnumerator* enumerator = [LSEnumerator enumeratorForApplicationProxiesWithOptions:0]; 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 // assumes that checkDeveloperMode() has already been called
ret = !armDeveloperMode(NULL); ret = !armDeveloperMode(NULL);
} }
else if([cmd isEqualToString:@"reboot"])
{
sync();
ret = reboot3(0); // do a normal reboot
}
NSLog(@"trollstorehelper returning %d", ret); NSLog(@"trollstorehelper returning %d", ret);
return ret; return ret;