summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorBala.FA <barumuga@redhat.com>2013-05-10 12:30:17 +0530
committerVijay Bellur <vbellur@redhat.com>2013-07-19 03:55:15 -0700
commitf75957ab6baef8907c8421f44f785956fbf48038 (patch)
treecc561f2a15a8b8ac3ac569ead28f8c7d97dbd85c /Makefile.am
parent4c0f4c8a89039b1fa1c9c015fb6f273268164c20 (diff)
log: error code generation support
error code and message are generated at compile time by reading a json file which contains information of elements for each error code. This framework provides error handling and ability to do more cleaner log messages to users. error-codes.json file contains error description is below format { "ERR_NAME": {"code": ERR_NUM, "message": {"LOCALE": "ERR_MESSAGE"}} } At compile time autogen.sh calls gen-headers.py which produces C header file libglusterfs/src/gf-error-codes.h. This header has a function const char *_gf_get_message (int code); which returns respective ERR_MESSAGE for given ERR_NUM. Change-Id: Ieefbf4c470e19a0175c28942e56cec98a3c94ff0 BUG: 928648 Signed-off-by: Bala.FA <barumuga@redhat.com> Reviewed-on: http://review.gluster.org/4977 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index c5a8af6d322..970ffdf751c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,9 @@
EXTRA_DIST = autogen.sh \
COPYING-GPLV2 COPYING-LGPLV3 \
INSTALL README AUTHORS THANKS NEWS \
- glusterfs.spec glusterfs-api.pc.in
+ glusterfs.spec glusterfs-api.pc.in \
+ error-codes.json gf-error-codes.h.template \
+ gen-headers.py
SUBDIRS = argp-standalone libglusterfs rpc api xlators glusterfsd \
$(FUSERMOUNT_SUBDIR) doc extras cli