> Date: Mon, 9 Dec 2019 17:52:17 +0100 > From: Klemens Nanni <k...@openbsd.org> > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > This fixes > > # ldomctl status > primary - running OpenBSD running > 0% > guest1 stopped > guest2 ttyV1 running OpenBoot Primary Boot Loader > 50% > > to look like > > # ./obj/ldomctl status > primary - running OpenBSD running > 0% > guest1 ttyV0 stopped - > 0% > guest2 ttyV1 running OpenBoot Primary Boot Loader > 50% > > Diff with -w for easier review. > OK?
ok kettenis@ > Index: ldomctl.c > =================================================================== > RCS file: /cvs/src/usr.sbin/ldomctl/ldomctl.c,v > retrieving revision 1.28 > diff -u -p -w -r1.28 ldomctl.c > --- ldomctl.c 30 Nov 2019 03:30:29 -0000 1.28 > +++ ldomctl.c 9 Dec 2019 16:47:10 -0000 > @@ -610,9 +610,6 @@ guest_status(int argc, char **argv) > break; > } > > - if (state.state != GUEST_STATE_NORMAL) > - printf("%-16s %-16s\n", guest->name, state_str); > - else { > /* primary has no console */ > if (guest->gid != 0) { > snprintf(console_str, sizeof(console_str), > @@ -620,9 +617,8 @@ guest_status(int argc, char **argv) > } > > printf("%-16s %-8s %-16s %-32s %3.0f%%\n", guest->name, > - console_str, state_str, softstate.soft_state_str, > - utilisation); > - } > + console_str, state_str, state.state == GUEST_STATE_NORMAL ? > + softstate.soft_state_str : "-", utilisation); > } > } > > >