From fcb3517cbc1ea98a02e0de9f387697ee9114b7c5 Mon Sep 17 00:00:00 2001 From: mvs Date: Tue, 19 Jan 2021 19:36:48 +0000 Subject: [PATCH] kern/subr_disk.c: convert ifunit() to if_unit(9) ok dlg@ --- sys/kern/subr_disk.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index e73d5092d7e..7125e3f70b0 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.237 2020/05/29 04:42:25 deraadt Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.238 2021/01/19 19:36:48 mvs Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -1610,10 +1610,12 @@ gotswap: } if (bootdv != NULL && bootdv->dv_class == DV_IFNET) - ifp = ifunit(bootdv->dv_xname); + ifp = if_unit(bootdv->dv_xname); - if (ifp) + if (ifp) { if_addgroup(ifp, "netboot"); + if_put(ifp); + } switch (rootdv->dv_class) { #if defined(NFSCLIENT) -- 2.20.1