diff options
author | mav <mav@FreeBSD.org> | 2015-03-05 20:24:34 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-03-05 20:24:34 +0000 |
commit | 710980f2ffb94a277e8be0ed18f227a3496c0263 (patch) | |
tree | b55c85788f7984ce277d751b64dbeaab103d94ca | |
parent | 1a66333f9f81fb22e398d29b1ae655b73dc6d420 (diff) | |
download | FreeBSD-src-710980f2ffb94a277e8be0ed18f227a3496c0263.zip FreeBSD-src-710980f2ffb94a277e8be0ed18f227a3496c0263.tar.gz |
Fix error translation broken in r279658.
Reported by: grehan
MFC after: 2 weeks
-rw-r--r-- | usr.sbin/bhyve/pci_virtio_block.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.sbin/bhyve/pci_virtio_block.c b/usr.sbin/bhyve/pci_virtio_block.c index 77f6127..0fcb649 100644 --- a/usr.sbin/bhyve/pci_virtio_block.c +++ b/usr.sbin/bhyve/pci_virtio_block.c @@ -246,12 +246,11 @@ pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vqueue_info *vq) } /* convert errno into a virtio block error return */ - if (err < 0) { - if (err == -ENOSYS) - *status = VTBLK_S_UNSUPP; - else - *status = VTBLK_S_IOERR; - } else + if (err == -ENOSYS) + *status = VTBLK_S_UNSUPP; + else if (err != 0) + *status = VTBLK_S_IOERR; + else *status = VTBLK_S_OK; /* |