Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31800 )
Change subject: security/vboot: Add VBNV flags to save the recovery switch state ......................................................................
Patch Set 2:
(3 comments)
https://review.coreboot.org/#/c/31800/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31800/2//COMMIT_MSG@9 PS2, Line 9: Add flags to save the recovery switch state. You should provide more context and reasoning in the commit description.
https://review.coreboot.org/#/c/31800/2/src/security/vboot/vbnv.h File src/security/vboot/vbnv.h:
https://review.coreboot.org/#/c/31800/2/src/security/vboot/vbnv.h@36 PS2, Line 36: date data?
https://review.coreboot.org/#/c/31800/2/src/security/vboot/vbnv.c File src/security/vboot/vbnv.c:
https://review.coreboot.org/#/c/31800/2/src/security/vboot/vbnv.c@163 PS2, Line 163: /* Read the recovery switch state from VBNV. */ : int get_recovery_switch_from_vbnv(int *recovery_switch) : { : uint8_t misc_flags; : vbnv_setup(); : misc_flags = vbnv_data(MISC_FLAGS_OFFSET); : : if (!(misc_flags & MISC_FLAGS_RECOVERY_SWITCH_VALID_MASK)) : return -1; : : *recovery_switch = : !!(misc_flags & MISC_FLAGS_RECOVERY_SWITCH_STATE_MASK); : : return 0; : }
Use CB_SUCCESS and CB_ERROR.
This entire file doesn't use those return values, though it is mainly dealing with returning values.