pre_swap_out_meta
Name
pre_swap_out_meta
Synopsis
#include "hooks/core/swap_out_meta.h"
| int **pre_swap_out_meta** (
| closure, | |
| | mess, | |
| | flags)
; | |
void * <var class="pdparam">closure</var>
;
ec_message * <var class="pdparam">mess</var>
;
int <var class="pdparam">flags</var>
;
| int **has_core_pre_swap_out_meta_hook** (
| )
; | |
| void **register_core_pre_swap_out_meta_hook_first** (
| hook, | |
| | closure)
; | |
ec_hook_core_pre_swap_out_meta_func_t <var class="pdparam">hook</var>
;
void *<var class="pdparam">closure</var>
;
| void **register_core_pre_swap_out_meta_hook_last** (
| hook, | |
| | closure)
; | |
ec_hook_core_pre_swap_out_meta_func_t <var class="pdparam">hook</var>
;
void *<var class="pdparam">closure</var>
;
| int **call_core_pre_swap_out_meta_hook** (
| mess, | |
| | flags)
; | |
Description
The pre_swap_out_meta
hook allows modules to perform last minute actions immediately prior to the meta-data file being written to spool. The mess and flags parameters are the parameters of the same names to the ec_message_swap_out_meta() function.
Making body modifications at this point is strongly discouraged, as they may be happening too late to be noticed and may result in those changes not being journalled to spool.
If this hook returns zero, it indicates an error and causes ec_message_swap_out_meta() to fail with the return value EC_MSG_SWAP_RESULT_ERR.
If this hook returns 1, it indicates success. Any other return value is undefined.