Module Name: src
Committed By: jmcneill
Date: Sun Sep 30 15:44:22 UTC 2018
Modified Files:
src/sys/dev/pci: virtio.c
Log Message:
Suppress "not configured" message when no device is present
To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/pci/virtio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/virtio.c
diff -u src/sys/dev/pci/virtio.c:1.35 src/sys/dev/pci/virtio.c:1.36
--- src/sys/dev/pci/virtio.c:1.35 Fri Jun 15 17:13:43 2018
+++ src/sys/dev/pci/virtio.c Sun Sep 30 15:44:22 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio.c,v 1.35 2018/06/15 17:13:43 jakllsch Exp $ */
+/* $NetBSD: virtio.c,v 1.36 2018/09/30 15:44:22 jmcneill Exp $ */
/*
* Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.35 2018/06/15 17:13:43 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.36 2018/09/30 15:44:22 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -933,6 +933,9 @@ virtiobusprint(void *aux, const char *pn
{
struct virtio_attach_args * const va = aux;
+ if (va->sc_childdevid == 0)
+ return QUIET; /* No device present */
+
if (pnp)
aprint_normal("Device ID %d at %s", va->sc_childdevid, pnp);