From: mvs Date: Sat, 22 Jul 2023 14:30:39 +0000 (+0000) Subject: Add `sb_state' output to sobuf_print(). It contains SS_CANTSENDMORE, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=06b95ca79a1974e34199b8e4d432927791f0ac25;p=openbsd Add `sb_state' output to sobuf_print(). It contains SS_CANTSENDMORE, SS_ISSENDING, SS_CANTRCVMORE and SS_RCVATMARK bits. Also do `sb_flags' output as hex, it contains flags too. ok kn bluhm --- diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index da37b31f797..9824d161c0c 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.305 2023/07/04 22:28:24 mvs Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.306 2023/07/22 14:30:39 mvs Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -2366,7 +2366,8 @@ sobuf_print(struct sockbuf *sb, (*pr)("\tsb_mbtail: %p\n", sb->sb_mbtail); (*pr)("\tsb_lastrecord: %p\n", sb->sb_lastrecord); (*pr)("\tsb_sel: ...\n"); - (*pr)("\tsb_flags: %i\n", sb->sb_flags); + (*pr)("\tsb_flags: %04x\n", sb->sb_flags); + (*pr)("\tsb_state: %04x\n", sb->sb_state); (*pr)("\tsb_timeo_nsecs: %llu\n", sb->sb_timeo_nsecs); }