summaryrefslogtreecommitdiff
path: root/usr.sbin/vmctl
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:17:04 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-11-21 13:17:04 +0000
commitcaba869c8447fc7ef9f32581e1d02262e51ec18a (patch)
treec06988b36b6677e805071a9673b04b5360e2e36d /usr.sbin/vmctl
parent9c8d00dd06d79ba9fccf07c45cd1bdae73e744c5 (diff)
Rename imsg_init, imsg_clear, imsg_read, imsg_write and imsg_flush to
imsgbuf_init, imsgbuf_clear, imsgbuf_read, imsgbuf_write and imsgbuf_flush. This separates the imsgbuf API from the per-imsg API. OK tb@
Diffstat (limited to 'usr.sbin/vmctl')
-rw-r--r--usr.sbin/vmctl/main.c10
-rw-r--r--usr.sbin/vmctl/vmctl.c6
2 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/vmctl/main.c b/usr.sbin/vmctl/main.c
index 7f13b033448..6b22ea3b9e6 100644
--- a/usr.sbin/vmctl/main.c
+++ b/usr.sbin/vmctl/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.80 2024/11/21 13:09:06 claudio Exp $ */
+/* $OpenBSD: main.c,v 1.81 2024/11/21 13:17:02 claudio Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -209,7 +209,7 @@ vmmaction(struct parse_result *res)
if ((ibuf = malloc(sizeof(struct imsgbuf))) == NULL)
err(1, "malloc");
- imsg_init(ibuf, ctl_sock);
+ imsgbuf_init(ibuf, ctl_sock);
}
switch (res->action) {
@@ -273,12 +273,12 @@ vmmaction(struct parse_result *res)
flags = res->flags;
parse_free(res);
- if (imsg_flush(ibuf) == -1)
+ if (imsgbuf_flush(ibuf) == -1)
err(1, "write error");
while (!done) {
- if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
- errx(1, "imsg_read error");
+ if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN)
+ errx(1, "imsgbuf_read error");
if (n == 0)
errx(1, "pipe closed");
diff --git a/usr.sbin/vmctl/vmctl.c b/usr.sbin/vmctl/vmctl.c
index 50135adc4e8..07ac51fe572 100644
--- a/usr.sbin/vmctl/vmctl.c
+++ b/usr.sbin/vmctl/vmctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmctl.c,v 1.91 2024/07/09 15:51:11 mlarkin Exp $ */
+/* $OpenBSD: vmctl.c,v 1.92 2024/11/21 13:17:02 claudio Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
@@ -310,7 +310,7 @@ send_vm(uint32_t id, const char *name)
} else {
imsg_compose(ibuf, IMSG_VMDOP_SEND_VM_REQUEST, 0, 0, fds[0],
&vid, sizeof(vid));
- imsg_flush(ibuf);
+ imsgbuf_flush(ibuf);
while (1) {
readn = atomicio(read, fds[1], buf, pagesz);
if (!readn)
@@ -350,7 +350,7 @@ vm_receive(uint32_t id, const char *name)
} else {
imsg_compose(ibuf, IMSG_VMDOP_RECEIVE_VM_REQUEST, 0, 0, fds[0],
&vid, sizeof(vid));
- imsg_flush(ibuf);
+ imsgbuf_flush(ibuf);
while (1) {
readn = atomicio(read, STDIN_FILENO, buf, pagesz);
if (!readn) {