pcrlock: Return positive exit status

Follow-up for 89e83aada8.

`is-supported` expects to return a positive exit status.
To achieve that, verb_make_policy() needs to return 0 on success.

Finishes the fix for #38019.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
This commit is contained in:
Valentin David
2025-07-26 12:36:18 +02:00
committed by Luca Boccassi
parent 7db7b75ab3
commit 5e2ad03dd8

View File

@@ -4846,7 +4846,13 @@ static int make_policy(bool force, RecoveryPinMode recovery_pin_mode) {
}
static int verb_make_policy(int argc, char *argv[], void *userdata) {
return make_policy(arg_force, arg_recovery_pin);
int r;
r = make_policy(arg_force, arg_recovery_pin);
if (r < 0)
return r;
return 0;
}
static int undefine_policy_nv_index(
@@ -5454,4 +5460,4 @@ static int run(int argc, char *argv[]) {
return pcrlock_main(argc, argv);
}
DEFINE_MAIN_FUNCTION(run);
DEFINE_MAIN_FUNCTION_WITH_POSITIVE_FAILURE(run);