From af76e063adb93dcf845ffd2c1d2fd5f135dfbe97 Mon Sep 17 00:00:00 2001 From: Florian Obser Date: Mon, 26 Aug 2024 06:06:05 +0000 Subject: Use i2s instead of hard coding the imsg type. Suggested by tb. --- sbin/dhcpleased/engine.c | 7 ++++--- sbin/dhcpleased/frontend.c | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'sbin') diff --git a/sbin/dhcpleased/engine.c b/sbin/dhcpleased/engine.c index 265d52feb13..f7c433895bc 100644 --- a/sbin/dhcpleased/engine.c +++ b/sbin/dhcpleased/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.48 2024/08/26 06:05:05 florian Exp $ */ +/* $OpenBSD: engine.c,v 1.49 2024/08/26 06:06:04 florian Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser @@ -552,8 +552,9 @@ engine_dispatch_main(int fd, short event, void *bula) char ifnamebuf[IF_NAMESIZE]; if (nconf == NULL) - fatalx("%s: IMSG_RECONF_END without " - "IMSG_RECONF_CONF", __func__); + fatalx("%s: %s without IMSG_RECONF_CONF", + __func__, i2s(type)); + ifaces = changed_ifaces(engine_conf, nconf); merge_config(engine_conf, nconf); nconf = NULL; diff --git a/sbin/dhcpleased/frontend.c b/sbin/dhcpleased/frontend.c index d0dae2d7a74..399345c99f3 100644 --- a/sbin/dhcpleased/frontend.c +++ b/sbin/dhcpleased/frontend.c @@ -1,4 +1,4 @@ -/* $OpenBSD: frontend.c,v 1.37 2024/08/26 06:04:24 florian Exp $ */ +/* $OpenBSD: frontend.c,v 1.38 2024/08/26 06:06:04 florian Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser @@ -426,8 +426,8 @@ frontend_dispatch_main(int fd, short event, void *bula) char ifnamebuf[IF_NAMESIZE], *if_name; if (nconf == NULL) - fatalx("%s: IMSG_RECONF_END without " - "IMSG_RECONF_CONF", __func__); + fatalx("%s: %s without IMSG_RECONF_CONF", + __func__, i2s(type)); ifaces = changed_ifaces(frontend_conf, nconf); merge_config(frontend_conf, nconf); -- cgit v1.2.3