From 768aa9d3390873e5796a7d423d2fcaad7f2d9dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sun, 20 Nov 2022 18:50:34 +0100 Subject: [PATCH] safemode: Add usage help option Change-Id: I25c96070327f43ea12df7df9bf0d8e9b994a80af --- src/bin/safemode.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bin/safemode.c b/src/bin/safemode.c index 04782dddff..a49b05a272 100644 --- a/src/bin/safemode.c +++ b/src/bin/safemode.c @@ -23,7 +23,14 @@ main(int argc, char **argv) int 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; else optionName = argv[i];