summaryrefslogtreecommitdiff
path: root/usr.sbin/ldomctl
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2019-12-10 11:56:34 +0000
committerkn <kn@cvs.openbsd.org>2019-12-10 11:56:34 +0000
commit9d858cc88b5255a6a573e0aadf2cd243da50596f (patch)
tree6efe380f94de796e2aeee13ce77356ca7f464c23 /usr.sbin/ldomctl
parenta4ece4df2fafbb7864f6d7742eadd2436b8f0800 (diff)
Print started and stopped domains alike
"looks better" deraadt Ok kettenis
Diffstat (limited to 'usr.sbin/ldomctl')
-rw-r--r--usr.sbin/ldomctl/ldomctl.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/usr.sbin/ldomctl/ldomctl.c b/usr.sbin/ldomctl/ldomctl.c
index b74dcbccbeb..58e0fd86ac7 100644
--- a/usr.sbin/ldomctl/ldomctl.c
+++ b/usr.sbin/ldomctl/ldomctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldomctl.c,v 1.28 2019/11/30 03:30:29 kn Exp $ */
+/* $OpenBSD: ldomctl.c,v 1.29 2019/12/10 11:56:33 kn Exp $ */
/*
* Copyright (c) 2012 Mark Kettenis
@@ -610,19 +610,15 @@ 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),
- "ttyV%llu", guest->gid - 1);
- }
-
- printf("%-16s %-8s %-16s %-32s %3.0f%%\n", guest->name,
- console_str, state_str, softstate.soft_state_str,
- utilisation);
+ /* primary has no console */
+ if (guest->gid != 0) {
+ snprintf(console_str, sizeof(console_str),
+ "ttyV%llu", guest->gid - 1);
}
+
+ printf("%-16s %-8s %-16s %-32s %3.0f%%\n", guest->name,
+ console_str, state_str, state.state == GUEST_STATE_NORMAL ?
+ softstate.soft_state_str : "-", utilisation);
}
}