summaryrefslogtreecommitdiff
path: root/usr.sbin/vmctl/main.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:09:07 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:09:07 +0000
commita423251e6ce072befee8d8b94b6a46d5438768d3 (patch)
tree90355c86d050d127888df097c088f45eb7c9edd4 /usr.sbin/vmctl/main.c
parent5eeda5072225febdb498941a3e2bdcda5694cb64 (diff)
Use imsg_flush() instead of implementing the same by hand.
OK tb@
Diffstat (limited to 'usr.sbin/vmctl/main.c')
-rw-r--r--usr.sbin/vmctl/main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/vmctl/main.c b/usr.sbin/vmctl/main.c
index 0583ef953c8..7f13b033448 100644
--- a/usr.sbin/vmctl/main.c
+++ b/usr.sbin/vmctl/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.79 2024/08/17 20:50:06 mlarkin Exp $ */
+/* $OpenBSD: main.c,v 1.80 2024/11/21 13:09:06 claudio Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -273,9 +273,8 @@ vmmaction(struct parse_result *res)
flags = res->flags;
parse_free(res);
- while (ibuf->w.queued)
- if (msgbuf_write(&ibuf->w) <= 0 && errno != EAGAIN)
- err(1, "write error");
+ if (imsg_flush(ibuf) == -1)
+ err(1, "write error");
while (!done) {
if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)