Skip to content

Commit 53277ff

Browse files
tescanderosslagerwall
authored andcommitted
Fix varstore-sb-state exit code
In 'user' mode, varstore-sb-state exit code is the returned value of the function setup_keys() which returns true on success and false otherwise. The exit code is then 1 on success and 0 on failure, the opposite of the 'setup' mode. This patch fixes the exit code, returning 0 when setup_keys() succeeds and 1 otherwise. Signed-off-by: Thierry Escande <[email protected]>
1 parent 6eb856e commit 53277ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/varstore-sb-state.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ int main(int argc, char **argv)
112112
do_rm(&gEfiImageSecurityDatabaseGuid, "dbx");
113113

114114
if (!strcmp(argv[optind + 1], "user"))
115-
return setup_keys();
115+
return (setup_keys() ? 0 : 1);
116116
else
117117
return 0;
118118
}

0 commit comments

Comments
 (0)