Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/net/lib/libvirtif use if_initname() instead of home...
details: https://anonhg.NetBSD.org/src/rev/f30e0ab6b778
branches: trunk
changeset: 328412:f30e0ab6b778
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Apr 02 19:44:15 2014 +0000
description:
use if_initname() instead of homegrown sprintf
diffstat:
sys/rump/net/lib/libvirtif/if_virt.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r c0f841ed71ab -r f30e0ab6b778 sys/rump/net/lib/libvirtif/if_virt.c
--- a/sys/rump/net/lib/libvirtif/if_virt.c Wed Apr 02 19:37:17 2014 +0000
+++ b/sys/rump/net/lib/libvirtif/if_virt.c Wed Apr 02 19:44:15 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_virt.c,v 1.46 2014/03/20 20:42:08 christos Exp $ */
+/* $NetBSD: if_virt.c,v 1.47 2014/04/02 19:44:15 pooka Exp $ */
/*
* Copyright (c) 2008, 2013 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.46 2014/03/20 20:42:08 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_virt.c,v 1.47 2014/04/02 19:44:15 pooka Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -109,7 +109,8 @@
sc = kmem_zalloc(sizeof(*sc), KM_SLEEP);
sc->sc_num = num;
ifp = &sc->sc_ec.ec_if;
- snprintf(ifp->if_xname, sizeof(ifp->if_xname), "%s%d", VIF_NAME, num);
+
+ if_initname(ifp, VIF_NAME, num);
ifp->if_softc = sc;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
Home |
Main Index |
Thread Index |
Old Index