From f1f42778d8e0123752407fa9b4e7d5cadbe69eb5 Mon Sep 17 00:00:00 2001 From: Dhinak G <17605561+dhinakg@users.noreply.github.com> Date: Thu, 21 Dec 2023 23:21:26 -0500 Subject: [PATCH] Invert output from RootHelper --- RootHelper/main.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RootHelper/main.m b/RootHelper/main.m index 565fdb8..48b58ef 100644 --- a/RootHelper/main.m +++ b/RootHelper/main.m @@ -1517,12 +1517,13 @@ int MAIN_NAME(int argc, char *argv[], char *envp[]) } else if([cmd isEqualToString:@"check-dev-mode"]) { - ret = checkDeveloperMode(); + // switch the result, so 0 is enabled, and 1 is disabled/error + ret = !checkDeveloperMode(); } else if([cmd isEqualToString:@"arm-dev-mode"]) { // assumes that checkDeveloperMode() has already been called - ret = armDeveloperMode(NULL); + ret = !armDeveloperMode(NULL); } NSLog(@"trollstorehelper returning %d", ret);