summaryrefslogtreecommitdiff
path: root/sys/dev/pv/virtio.c
diff options
context:
space:
mode:
authorStefan Fritsch <sf@cvs.openbsd.org>2019-01-10 18:06:57 +0000
committerStefan Fritsch <sf@cvs.openbsd.org>2019-01-10 18:06:57 +0000
commitb21bced0ec1a3fcd0d444f29d6b7fe36ed3753ea (patch)
tree6722a5f33c76868769868556c3b8f16db189d24c /sys/dev/pv/virtio.c
parentb7f2e3112b2567cdebe918d846cd7832f84adaee (diff)
Remove some more code if VIRTIO_DEBUG is 0
Diffstat (limited to 'sys/dev/pv/virtio.c')
-rw-r--r--sys/dev/pv/virtio.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/pv/virtio.c b/sys/dev/pv/virtio.c
index f6293583d43..e6cd1ace5aa 100644
--- a/sys/dev/pv/virtio.c
+++ b/sys/dev/pv/virtio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: virtio.c,v 1.12 2019/01/10 18:05:43 sf Exp $ */
+/* $OpenBSD: virtio.c,v 1.13 2019/01/10 18:06:56 sf Exp $ */
/* $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */
/*
@@ -68,6 +68,13 @@ static const char * const virtio_device_name[] = {
};
#define NDEVNAMES (sizeof(virtio_device_name)/sizeof(char*))
+const char *
+virtio_device_string(int id)
+{
+ return id < NDEVNAMES ? virtio_device_name[id] : "Unknown";
+}
+
+#if VIRTIO_DEBUG
static const struct virtio_feature_name transport_feature_names[] = {
{ VIRTIO_F_NOTIFY_ON_EMPTY, "NotifyOnEmpty"},
{ VIRTIO_F_RING_INDIRECT_DESC, "RingIndirectDesc"},
@@ -76,12 +83,6 @@ static const struct virtio_feature_name transport_feature_names[] = {
{ 0, NULL}
};
-const char *
-virtio_device_string(int id)
-{
- return id < NDEVNAMES ? virtio_device_name[id] : "Unknown";
-}
-
void
virtio_log_features(uint32_t host, uint32_t neg,
const struct virtio_feature_name *guest_feature_names)
@@ -113,6 +114,7 @@ virtio_log_features(uint32_t host, uint32_t neg,
printf(" %cUnknown(%d)", c, i);
}
}
+#endif
/*
* Reset the device.