mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
sockstat: improve handling of path state
Only suppress the path state column when producing traditional text
output. When generating html output, always include the column.
Please note that when generating json or xml output, optional fields
like the path state are only generated if they is applicable. This
has not been changed.
The changes in this patch were suggested by asomers.
Reviewed by: asomers
Fixes: 746eadecaa ("sockstat: show path state column only when useful")
MFC after: 3 days
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D53005
This commit is contained in:
1 parent
ad13fd5a8f
commit
97e858f5b3
2 files changed
+8
-5
No files matched your search
@@ -1789,9 +1789,11 @@ main(int argc, char *argv[])
|
||||
argc = xo_parse_args(argc, argv);
|
||||
if (argc < 0)
|
||||
exit(1);
|
||||
if (xo_get_style(NULL) != XO_STYLE_TEXT &&
|
||||
xo_get_style(NULL) != XO_STYLE_HTML)
|
||||
is_xo_style_encoding = true;
|
||||
if (xo_get_style(NULL) != XO_STYLE_TEXT) {
|
||||
show_path_state = true;
|
||||
if (xo_get_style(NULL) != XO_STYLE_HTML)
|
||||
is_xo_style_encoding = true;
|
||||
}
|
||||
opt_j = -1;
|
||||
while ((o = getopt(argc, argv, "46AbCcfIij:Llnp:P:qSsUuvw")) != -1)
|
||||
switch (o) {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd October 9, 2025
|
||||
.Dd October 14, 2025
|
||||
.Dt SOCKSTAT 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -205,7 +205,8 @@ is specified (only for SCTP or TCP).
|
||||
The path state if
|
||||
.Fl s
|
||||
is specified (only for SCTP).
|
||||
This column is only shown when there is at least one path state shown.
|
||||
When using traditional text output, this column is only shown when there is at
|
||||
least one path state to show.
|
||||
.It Li CONN STATE
|
||||
The connection state if
|
||||
.Fl s
|
||||
|
||||
Reference in new issue
Block a user