Skip to contentSkip to conversation

master - log: annotate processing code with report_current_object_cmdlog

PATCH Peter Rajnoha 1 participant 1 message Jun 20, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0ab118774029cc955512c4a41930956ccd96a138
Commit:        0ab118774029cc955512c4a41930956ccd96a138
Parent:        6ca28ca4c69b66b07ebcc19cea02b8317c6df0bf
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Mon May 23 15:27:09 2016 +0200
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Mon Jun 20 11:33:43 2016 +0200

log: annotate processing code with report_current_object_cmdlog

---
 WHATS_NEW           |    1 +
 lib/report/report.h |    3 +++
 tools/toollib.c     |   51 +++++++++++++++++++++++++++++++++++++++++++++++----
 3 files changed, 51 insertions(+), 4 deletions(-)
WHATS_NEW +1 -0
index fedc1e8..f800eca 100644
@@ -1,5 +1,6 @@
 Version 2.02.158 - 
 =================================
+  Report per-object return codes via cmd log while processing multiple objects.
   Annotate processing code with log report hooks for per-object command log.
   Also pass common printed messages (besides warnings and errors) to log report.
   Log warnings and errors via report during cmd processing if this is enabled.
lib/report/report.h +3 -0
index f2880ec..e6fbc8d 100644
@@ -111,6 +111,9 @@ int report_cmdlog(void *handle, const char *type, const char *context,
 		  const char *object_id, const char *object_group,
 		  const char *object_group_id, const char *msg,
 		  int current_errno, int ret_code);
+#define REPORT_OBJECT_CMDLOG_NAME "status"
+#define REPORT_OBJECT_CMDLOG_SUCCESS "success"
+#define REPORT_OBJECT_CMDLOG_FAILURE "failure"
 int report_current_object_cmdlog(const char *type, const char *msg, int32_t ret_code);
 int report_output(void *handle);
 
tools/toollib.c +47 -4

229 lines not on this page · raw message