mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
report: add report_current_object_cmdlog fn as a shortcut for reporting current object's log item
This commit is contained in:
parent
7d4a15e53a
commit
fe63715f25
@ -3869,3 +3869,14 @@ int report_cmdlog(void *handle, const char *type, const char *context,
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int report_current_object_cmdlog(const char *type, const char *msg, int32_t ret_code)
|
||||||
|
{
|
||||||
|
log_report_t log_state = log_get_report_state();
|
||||||
|
|
||||||
|
return report_cmdlog(log_state.report, type, log_get_report_context_name(log_state.context),
|
||||||
|
log_get_report_object_type_name(log_state.object_type),
|
||||||
|
log_state.object_name, log_state.object_id,
|
||||||
|
log_state.object_group, log_state.object_group_id,
|
||||||
|
msg, stored_errno(), ret_code);
|
||||||
|
}
|
||||||
|
@ -110,6 +110,7 @@ int report_cmdlog(void *handle, const char *type, const char *context,
|
|||||||
const char *object_id, const char *object_group,
|
const char *object_id, const char *object_group,
|
||||||
const char *object_group_id, const char *msg,
|
const char *object_group_id, const char *msg,
|
||||||
int current_errno, int ret_code);
|
int current_errno, int ret_code);
|
||||||
|
int report_current_object_cmdlog(const char *type, const char *msg, int32_t ret_code);
|
||||||
int report_output(void *handle);
|
int report_output(void *handle);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user