diff options
Diffstat (limited to 'utils/utils.c')
-rw-r--r-- | utils/utils.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/utils/utils.c b/utils/utils.c index 49a5d3d..ec85882 100644 --- a/utils/utils.c +++ b/utils/utils.c @@ -13,6 +13,8 @@ # include "config.h" +size_t logLevel = GB_LOG_INFO; + const char *argp_program_version = "" \ PACKAGE_NAME" ("PACKAGE_VERSION")" \ "\nRepository rev: https://github.com/gluster/gluster-block.git\n" \ @@ -69,6 +71,26 @@ glusterBlockDaemonOptEnumParse(const char *opt) int +blockLogLevelEnumParse(const char *opt) +{ + int i; + + + if (!opt) { + return GB_LOG_MAX; + } + + for (i = 0; i < GB_LOG_MAX; i++) { + if (!strcmp(opt, LogLevelLookup[i])) { + return i; + } + } + + return i; +} + + +int blockMetaKeyEnumParse(const char *opt) { int i; |