summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authormvs <mvs@openbsd.org>2021-01-19 19:36:48 +0000
committermvs <mvs@openbsd.org>2021-01-19 19:36:48 +0000
commitfcb3517cbc1ea98a02e0de9f387697ee9114b7c5 (patch)
treefe2c08f33c783c896f9e2ff76f96055d66a5fe3f /sys/kern/subr_disk.c
parentnfs/nfs_boot.c: convert ifunit() to if_unit(9) (diff)
downloadwireguard-openbsd-fcb3517cbc1ea98a02e0de9f387697ee9114b7c5.tar.xz
wireguard-openbsd-fcb3517cbc1ea98a02e0de9f387697ee9114b7c5.zip
kern/subr_disk.c: convert ifunit() to if_unit(9)
ok dlg@
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c8
1 files 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)