diff options
Diffstat (limited to 'utils/common.h')
-rw-r--r-- | utils/common.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/utils/common.h b/utils/common.h index c5ec334..b43220f 100644 --- a/utils/common.h +++ b/utils/common.h @@ -13,6 +13,7 @@ # define _COMMON_H 1 # include "utils.h" +# include "block.h" # define GB_LOGDIR DATADIR "/log/gluster-block" # define GB_INFODIR DATADIR "/run" @@ -37,6 +38,20 @@ # define SUN_PATH_MAX (sizeof(struct sockaddr_un) - sizeof(unsigned short int)) /*sun_family*/ +static const char *const JsonResponseFormatLookup[] = { + [GB_JSON_NONE] = "", + + [GB_JSON_PLAIN] = "--json-plain", + [GB_JSON_SPACED] = "--json-spaced", + [GB_JSON_PRETTY] = "--json-pretty", + [GB_JSON_DEFAULT] = "--json", + + [GB_JSON_MAX] = NULL, +}; + + +enum JsonResponseFormat jsonResponseFormatParse(const char *opt); + ssize_t glusterBlockCreateParseSize(const char *dom, char *value); # endif /* _COMMON_H */ |