Follow-up for
89e83aada829a6d92e29f321168d2bb1462c678d.
`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>
}
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(
return pcrlock_main(argc, argv);
}
-DEFINE_MAIN_FUNCTION(run);
+DEFINE_MAIN_FUNCTION_WITH_POSITIVE_FAILURE(run);