Skip to contentSkip to conversation

master - cleanup: use macros for definition of reporting/selection reserved values

PATCH Peter Rajnoha 1 participant 1 message Jul 9, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ccab185aa7accd348409b9c0261bc3200570710d
Commit:        ccab185aa7accd348409b9c0261bc3200570710d
Parent:        1a05862732d8e809f888313c546e97381c4e1f49
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Tue Jul 8 12:40:45 2014 +0200
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Wed Jul 9 15:55:54 2014 +0200

cleanup: use macros for definition of reporting/selection reserved values

The macros for reserved value definition makes the process a bit easier, but there's still a place for improvement and make this even more transparent. We can optimize and provide better automatism here later on.

---
 lib/report/columns.h |    4 +
 lib/report/report.c  |  329 ++++++++++++++++++++++----------------------------
 2 files changed, 149 insertions(+), 184 deletions(-)
lib/report/columns.h +4 -0
index 2769c2d..21ca585 100644
@@ -27,6 +27,10 @@
  * Help text ends with a full stop.
  */
 
+/*
+ * FIELD(report_object_type, structure, sort_type, heading, structure_field, output width, reporting_function, field_id, description, settable_via_lib)
+ */
+
 /* *INDENT-OFF* */
 FIELD(LVS, lv, STR, "LV UUID", lvid.id[1], 38, uuid, lv_uuid, "Unique identifier.", 0)
 FIELD(LVS, lv, STR, "LV", lvid, 4, lvname, lv_name, "Name.  LVs created for internal use are enclosed in brackets.", 0)
lib/report/report.c +145 -184

488 lines not on this page · raw message