safemode: Add usage help option

Change-Id: I25c96070327f43ea12df7df9bf0d8e9b994a80af
This commit is contained in:
François Revol 2022-11-20 18:50:34 +01:00
parent 9a3791f0f0
commit 768aa9d339

View File

@ -23,7 +23,14 @@ main(int argc, char **argv)
int i; int i;
for (i = 1; i < argc; i++) { for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-s")) if (!strcmp(argv[i], "-h")) {
printf("Usage: %s [-s] [optionName]\n"
"Prints the value of a kernel safemode option, "
"(default is safemode boot itself).\n\n"
" -s\t\tReturn the real string result, not a boolean.\n",
argv[0]);
return 0;
} else if (!strcmp(argv[i], "-s"))
realString = true; realString = true;
else else
optionName = argv[i]; optionName = argv[i];