On Sat, Jul 13, 2024 at 10:06:34AM -0600, Florian Obser wrote:
> CVSROOT:      /cvs
> Module name:  src
> Changes by:   [email protected] 2024/07/13 10:06:34
> 
> Modified files:
>       sbin/slaacd    : engine.c 
> 
> Log message:
> Reduce if_indextoname(3) usage.
> 
> Don't ask the kernel to translate an if_index to a name if we are not
> running with verbose logging, it's not free.

This broke the ramdisk since log_getverbose() is by now required.
Currently running with the following diff.

Index: distrib/special/slaacd/Makefile
===================================================================
RCS file: /cvs/src/distrib/special/slaacd/Makefile,v
diff -u -p -r1.4 Makefile
--- distrib/special/slaacd/Makefile     14 Aug 2023 08:56:21 -0000      1.4
+++ distrib/special/slaacd/Makefile     14 Jul 2024 05:51:33 -0000
@@ -3,7 +3,7 @@
 PROG=  slaacd
 COPTS+=        -DSMALL
 .PATH:  ${.CURDIR}/../../../sbin/slaacd
-SRCS=  engine.c frontend.c slaacd.c
+SRCS=  engine.c frontend.c log.c slaacd.c
 
 YFLAGS=
 LDADD+=        -levent -lutil
Index: sbin/slaacd/log.c
===================================================================
RCS file: /cvs/src/sbin/slaacd/log.c,v
diff -u -p -r1.2 log.c
--- sbin/slaacd/log.c   20 Mar 2021 16:46:03 -0000      1.2
+++ sbin/slaacd/log.c   14 Jul 2024 05:51:33 -0000
@@ -197,4 +197,13 @@ fatalx(const char *emsg, ...)
        va_end(ap);
        exit(1);
 }
+
+#else
+
+int
+log_getverbose(void)
+{
+       return 0;
+}
+
 #endif /* SMALL */

Reply via email to