From: Willy Tarreau Date: Fri, 12 Mar 2021 13:56:44 +0000 (+0100) Subject: CLEANUP: cli: fix misleading comment and better indent the access level flags X-Git-Tag: v2.4-dev12~12 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=44511502518db3f179e4267ea340633ddce3bd55;p=haproxy-2.5.git CLEANUP: cli: fix misleading comment and better indent the access level flags It was mentioned that ACCESS_MASTER_ONLY as for workers only instead of master-only. And it wasn't clear that all ACCESS_* would belong to the same thing. --- diff --git a/include/haproxy/cli-t.h b/include/haproxy/cli-t.h index 290bda1..82d4875 100644 --- a/include/haproxy/cli-t.h +++ b/include/haproxy/cli-t.h @@ -24,18 +24,17 @@ #include -/* Access level for a stats socket */ -#define ACCESS_LVL_NONE 0 -#define ACCESS_LVL_USER 1 -#define ACCESS_LVL_OPER 2 -#define ACCESS_LVL_ADMIN 3 -#define ACCESS_LVL_MASK 0x3 +/* Access level for a stats socket (appctx->cli_level) */ +#define ACCESS_LVL_NONE 0x0000 +#define ACCESS_LVL_USER 0x0001 +#define ACCESS_LVL_OPER 0x0002 +#define ACCESS_LVL_ADMIN 0x0003 +#define ACCESS_LVL_MASK 0x0003 -#define ACCESS_FD_LISTENERS 0x4 /* expose listeners FDs on stats socket */ -#define ACCESS_MASTER 0x8 /* works with the master (and every other processes) */ -#define ACCESS_MASTER_ONLY 0x10 /* only works with the worker */ - -#define ACCESS_EXPERT 0x20 /* access to dangerous commands reserved to experts */ +#define ACCESS_FD_LISTENERS 0x0004 /* expose listeners FDs on stats socket */ +#define ACCESS_MASTER 0x0008 /* works with the master (and every other processes) */ +#define ACCESS_MASTER_ONLY 0x0010 /* only works with the master */ +#define ACCESS_EXPERT 0x0020 /* access to dangerous commands reserved to experts */ /* flags for appctx->st1 */ #define APPCTX_CLI_ST1_PROMPT (1 << 0)