From: Willy Tarreau Date: Wed, 7 Apr 2021 06:48:12 +0000 (+0200) Subject: MINOR: cli/show-fd: slightly reorganize the FD status flags X-Git-Tag: v2.4-dev16~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=184b21259b8801354a6aa60f954d5153812036d0;p=thirdparty%2Fhaproxy.git MINOR: cli/show-fd: slightly reorganize the FD status flags Slightly reorder the status flags to better match their order in the "state" field, and also decode the "shut" state which is particularly useful and already part of this field. --- diff --git a/src/cli.c b/src/cli.c index 575a1730ea..5f370147a5 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1190,20 +1190,22 @@ static int cli_io_handler_show_fd(struct appctx *appctx) suspicious = 1; chunk_printf(&trash, - " %5d : st=0x%06x(R:%c%c W:%c%c %c%c%c%c%c %c%c) tmask=0x%lx umask=0x%lx owner=%p iocb=%p(", + " %5d : st=0x%06x(%c%c %c%c%c%c%c W:%c%c%c R:%c%c%c) tmask=0x%lx umask=0x%lx owner=%p iocb=%p(", fd, fdt.state, - (fdt.state & FD_EV_READY_R) ? 'R' : 'r', - (fdt.state & FD_EV_ACTIVE_R) ? 'A' : 'a', - (fdt.state & FD_EV_READY_W) ? 'R' : 'r', - (fdt.state & FD_EV_ACTIVE_W) ? 'A' : 'a', + (fdt.state & FD_CLONED) ? 'C' : 'c', + (fdt.state & FD_LINGER_RISK) ? 'L' : 'l', (fdt.state & FD_POLL_HUP) ? 'H' : 'h', (fdt.state & FD_POLL_ERR) ? 'E' : 'e', (fdt.state & FD_POLL_OUT) ? 'O' : 'o', (fdt.state & FD_POLL_PRI) ? 'P' : 'p', (fdt.state & FD_POLL_IN) ? 'I' : 'i', - (fdt.state & FD_LINGER_RISK) ? 'L' : 'l', - (fdt.state & FD_CLONED) ? 'C' : 'c', + (fdt.state & FD_EV_SHUT_W) ? 'S' : 's', + (fdt.state & FD_EV_READY_W) ? 'R' : 'r', + (fdt.state & FD_EV_ACTIVE_W) ? 'A' : 'a', + (fdt.state & FD_EV_SHUT_R) ? 'S' : 's', + (fdt.state & FD_EV_READY_R) ? 'R' : 'r', + (fdt.state & FD_EV_ACTIVE_R) ? 'A' : 'a', fdt.thread_mask, fdt.update_mask, fdt.owner, fdt.iocb);