Skip to content

Commit

Permalink
vmstat: Add root element to vmstat libxo output
Browse files Browse the repository at this point in the history
Current libxo output does not have a root element. Valid XML requires a single
root element. This commit adds this root element.

PR: 254635
Pull Request: #1330
  • Loading branch information
bramton committed Jul 19, 2024
1 parent f205561 commit e09a1b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions usr.bin/vmstat/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ main(int argc, char *argv[])
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,6 +384,7 @@ main(int argc, char *argv[])
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

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

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
Expand Down

0 comments on commit e09a1b8

Please sign in to comment.