This commit is contained in:
Nick Chan committed 2023-01-29 13:16:12 +08:00
1 parent 516e78e1f9
commit 7fd5882c95
4 files changed
+33 -8

No files matched your search

+21 -3
View File
@@ -35,14 +35,21 @@ static struct option longopts[] = {
{"override-ramdisk", required_argument, NULL, 'r'},
{"override-kpf", required_argument, NULL, 'K'},
{"disable-ohio", no_argument, NULL, 'O'},
#ifdef DEV_BUILD
{"tui", no_argument, NULL, 't'},
#endif
{NULL, 0, NULL, 0}
};
static int usage(int e, char* prog_name)
{
fprintf(stderr,
"Usage: %s [-cCDhpPvVldsOLt] [-e boot arguments] [-f root device] [-k Pongo image] [-o overlay file] [-r ramdisk file] [-K KPF file]\n"
#ifdef DEV_BUILD
"Usage: %s [-cCDhpPvVldsOLt]"
#else
"Usage: %s [-cCDhpPvVldsOL]"
#endif
" [-e boot arguments] [-f root device] [-k Pongo image] [-o overlay file] [-r ramdisk file] [-K KPF file]\n"
"Copyright (C) 2023, palera1n team, All Rights Reserved.\n\n"
"iOS/iPadOS 15+ arm64 jailbreaking tool\n\n"
"\t--version\t\t\t\tPrint version\n"
@@ -67,7 +74,10 @@ static int usage(int e, char* prog_name)
"\t-r, --override-ramdisk <file>\t\tOverride ramdisk\n"
"\t-K, --override-kpf <file>\t\tOverride kernel patchfinder\n"
"\t-O, --disable-ohio\t\t\tDisable Ohio\n"
"\t-t, --tui\t\t\t\tTerminal user interface\n",
#ifdef DEV_BUILD
"\t-t, --tui\t\t\t\tTerminal user interface\n"
#endif
,
prog_name);
exit(e);
}
@@ -75,7 +85,13 @@ static int usage(int e, char* prog_name)
int optparse(int argc, char* argv[]) {
int opt;
int index;
while ((opt = getopt_long(argc, argv, "cCDhpvVldsOLte:f:o:r:K:k:", longopts, NULL)) != -1)
while ((opt = getopt_long(argc, argv,
#ifdef DEV_BUILD
"cCDhpvVldsOLte:f:o:r:K:k:",
#else
"cCDhpvVldsOLe:f:o:r:K:k:",
#endif
longopts, NULL)) != -1)
{
switch (opt) {
case 'c':
@@ -166,9 +182,11 @@ int optparse(int argc, char* argv[]) {
case 'O':
ohio = false;
break;
#ifdef DEV_BUILD
case 't':
use_tui = true;
break;
#endif
case checkrain_option_force_revert:
checkrain_flags |= checkrain_option_force_revert;
break;