Say which read failed, helps debugging.
authorflorian <florian@openbsd.org>
Mon, 23 Aug 2021 18:22:56 +0000 (18:22 +0000)
committerflorian <florian@openbsd.org>
Mon, 23 Aug 2021 18:22:56 +0000 (18:22 +0000)
sbin/dhcpleased/frontend.c

index 66cacca..b3f015b 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: frontend.c,v 1.19 2021/08/23 18:21:48 florian Exp $   */
+/*     $OpenBSD: frontend.c,v 1.20 2021/08/23 18:22:56 florian Exp $   */
 
 /*
  * Copyright (c) 2017, 2021 Florian Obser <florian@openbsd.org>
@@ -832,7 +832,7 @@ bpf_receive(int fd, short events, void *arg)
        iface = (struct iface *)arg;
 
        if ((len = read(fd, iface->bpfev.buf, BPFLEN)) == -1) {
-               log_warn("read");
+               log_warn("%s: read", __func__);
                return;
        }