summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2017-08-20 05:16:59 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2017-08-20 05:16:59 +0000
commit95383ea3cd18fdbc4e214c048fe247a270e5dd38 (patch)
treeb21668307eee3d3dd682273cf6c39f9383d4a9b5 /usr.sbin
parent5e4560559231b28249ae427f50cda961b35f7668 (diff)
vmd: return VIRTIO_BLK_S_UNSUPP on any unknown vioblk command, not just
VIRTIO_BLK_T_GET_ID. suggested by sf@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/vmd/virtio.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.sbin/vmd/virtio.c b/usr.sbin/vmd/virtio.c
index 024d965774c..3cfb09c8264 100644
--- a/usr.sbin/vmd/virtio.c
+++ b/usr.sbin/vmd/virtio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: virtio.c,v 1.51 2017/08/10 16:59:04 mlarkin Exp $ */
+/* $OpenBSD: virtio.c,v 1.52 2017/08/20 05:16:58 mlarkin Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -663,7 +663,10 @@ vioblk_notifyq(struct vioblk_dev *dev)
log_warnx("fl vioblk: error writing vio ring");
}
break;
- case VIRTIO_BLK_T_GET_ID:
+ default:
+ log_warnx("%s: unsupported command 0x%x", __func__,
+ cmd.type);
+
ds_desc_idx = cmd_desc->next & VIOBLK_QUEUE_MASK;
ds_desc = &desc[ds_desc_idx];
@@ -691,10 +694,6 @@ vioblk_notifyq(struct vioblk_dev *dev)
__func__);
}
break;
- default:
- log_warnx("%s: unknown command 0x%x", __func__,
- cmd.type);
- break;
}
idx = (idx + 1) & VIOBLK_QUEUE_MASK;