Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmstat: Add root element to libxo output #1330

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion usr.bin/vmstat/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
#include <libutil.h>
#include <libxo/xo.h>

#define VMSTAT_XO_VERSION "1"
#define VMSTAT_XO_VERSION "2"

static char da[] = "da";

Expand Down Expand Up @@ -282,6 +282,7 @@
argv += optind;

xo_set_version(VMSTAT_XO_VERSION);
xo_open_container("vmstat");
if (!hflag)
xo_set_options(NULL, "no-humanize");
if (todo == 0)
Expand Down Expand Up @@ -383,9 +384,10 @@
dointr(interval, reps);
if (todo & VMSTAT)
dovmstat(interval, reps);
xo_close_container("vmstat");
xo_finish();
exit(0);
}

Check warning on line 390 in usr.bin/vmstat/vmstat.c

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line

static int
mysysctl(const char *name, void *oldp, size_t *oldlenp)
Expand Down
Loading