From: Andreas Reichel <[email protected]>

New option S sets or resets the fail-safe mode flag in the new
status flag register.

Signed-off-by: Andreas Reichel <[email protected]>
---
 tools/bg_setenv.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/bg_setenv.c b/tools/bg_setenv.c
index cae268d..0847de1 100644
--- a/tools/bg_setenv.c
+++ b/tools/bg_setenv.c
@@ -45,6 +45,7 @@ static struct argp_option options_setenv[] = {
                                           "simulate a running update "
                                           "process."},
     {"version", 'V', 0, 0, "Print version"},
+    {"failsafe", 'S', "FAILSAFE", 0, "Set Fail-Safe Flag"},
     {0}};
 
 static struct argp_option options_printenv[] = {
@@ -393,6 +394,12 @@ static error_t parse_opt(int key, char *arg, struct 
argp_state *state)
                 * argp_usage with non-zero return code */
                argp_usage(state);
                break;
+       case 'S':
+               VERBOSE(stdout, "Enabeling fail-safe mode.\n");
+               e = journal_add_action(ENV_TASK_SET,
+                                      "env_status_failsafe", 0,
+                                      (uint8_t *)arg, strlen(arg) + 1);
+               break;
        default:
                return ARGP_ERR_UNKNOWN;
        }
-- 
2.17.0

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/20180525120108.31055-14-andreas.reichel.ext%40siemens.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to