summaryrefslogtreecommitdiff
path: root/sbin/unwind/frontend.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/unwind/frontend.c')
-rw-r--r--sbin/unwind/frontend.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sbin/unwind/frontend.c b/sbin/unwind/frontend.c
index bf731bf637e..8373d112e4e 100644
--- a/sbin/unwind/frontend.c
+++ b/sbin/unwind/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.85 2024/11/21 13:14:45 claudio Exp $ */
+/* $OpenBSD: frontend.c,v 1.86 2024/11/21 13:17:01 claudio Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -233,7 +233,7 @@ frontend(int debug, int verbose)
fatal("iev_main");
if ((iev_main = malloc(sizeof(struct imsgev))) == NULL)
fatal(NULL);
- imsg_init(&iev_main->ibuf, 3);
+ imsgbuf_init(&iev_main->ibuf, 3);
iev_main->handler = frontend_dispatch_main;
iev_main->events = EV_READ;
event_set(&iev_main->ev, iev_main->ibuf.fd, iev_main->events,
@@ -271,10 +271,10 @@ __dead void
frontend_shutdown(void)
{
/* Close pipes. */
- imsg_write(&iev_resolver->ibuf);
+ imsgbuf_write(&iev_resolver->ibuf);
msgbuf_clear(&iev_resolver->ibuf.w);
close(iev_resolver->ibuf.fd);
- imsg_write(&iev_main->ibuf);
+ imsgbuf_write(&iev_main->ibuf);
msgbuf_clear(&iev_main->ibuf.w);
close(iev_main->ibuf.fd);
@@ -311,17 +311,17 @@ frontend_dispatch_main(int fd, short event, void *bula)
int n, shut = 0;
if (event & EV_READ) {
- if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
- fatal("imsg_read error");
+ if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN)
+ fatal("imsgbuf_read error");
if (n == 0) /* Connection closed. */
shut = 1;
}
if (event & EV_WRITE) {
- if (imsg_write(ibuf) == -1) {
+ if (imsgbuf_write(ibuf) == -1) {
if (errno == EPIPE) /* Connection closed. */
shut = 1;
else
- fatal("imsg_write");
+ fatal("imsgbuf_write");
}
}
@@ -355,7 +355,7 @@ frontend_dispatch_main(int fd, short event, void *bula)
if (iev_resolver == NULL)
fatal(NULL);
- imsg_init(&iev_resolver->ibuf, fd);
+ imsgbuf_init(&iev_resolver->ibuf, fd);
iev_resolver->handler = frontend_dispatch_resolver;
iev_resolver->events = EV_READ;
@@ -492,17 +492,17 @@ frontend_dispatch_resolver(int fd, short event, void *bula)
int n, shut = 0, chg;
if (event & EV_READ) {
- if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
- fatal("imsg_read error");
+ if ((n = imsgbuf_read(ibuf)) == -1 && errno != EAGAIN)
+ fatal("imsgbuf_read error");
if (n == 0) /* Connection closed. */
shut = 1;
}
if (event & EV_WRITE) {
- if (imsg_write(ibuf) == -1) {
+ if (imsgbuf_write(ibuf) == -1) {
if (errno == EPIPE) /* Connection closed. */
shut = 1;
else
- fatal("imsg_write");
+ fatal("imsgbuf_write");
}
}