The path argument may be the empty string, which indicates that the checkpoint bundle directory is the same as the current working directory while the checkpoint is being saved.
The finish function is called after the checkpoint has been saved, for all objects that save was called for. If success is nonzero, the checkpoint was saved successfully; otherwise there was a failure. This permits the object to clean up temporary data structures and files in either case. In particular, any files written to path in the save method must be removed in finish if success is zero.
The function has_persistent_data, if implemented, should return
0 if the object only has volatile attributes, 1 otherwise. This overrides
Sim_Attr_Persistent
on individual attributes.
SIM_INTERFACE(checkpoint) { void (*save)(conf_object_t *obj, const char *NOTNULL path); void (*finish)(conf_object_t *obj, int success); int (*has_persistent_data)(conf_object_t *obj); }; #define CHECKPOINT_INTERFACE "checkpoint"