path: root/
diff options
authorBala.FA <>2013-05-10 12:30:17 +0530
committerVijay Bellur <>2013-07-19 03:55:15 -0700
commitf75957ab6baef8907c8421f44f785956fbf48038 (patch)
treecc561f2a15a8b8ac3ac569ead28f8c7d97dbd85c /
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 calls 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 <> Reviewed-on: Reviewed-by: Niels de Vos <> Tested-by: Gluster Build System <> Reviewed-by: Vijay Bellur <>
Diffstat (limited to '')
1 files changed, 3 insertions, 0 deletions
diff --git a/ b/
index 82bff38d..85c656d7 100644
--- a/
+++ b/
@@ -69,6 +69,9 @@ Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
+BuildRequires: python-simplejson
%if ( 0%{?_with_systemd:1} )
BuildRequires: systemd-units
Requires(post): systemd-units