diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-09-28 17:22:56 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-09-28 19:40:56 +0200 |
commit | 1ceee0d5cc841fc9ca8e72b81450b598ab307f14 (patch) | |
tree | 4aef038b723803cbc7369f415b41b05b5ddf9669 /hw/virtio-blk.c | |
parent | 92aa5c6d77ac29574c1717bcf57827fa1e586f31 (diff) |
iostatus: change is_read to a bool
Do this while we are touching this part of the code, before introducing
more uses of "int is_read".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/virtio-blk.c')
-rw-r--r-- | hw/virtio-blk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index f178fa86c7..1ac2483b53 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -64,7 +64,7 @@ static void virtio_blk_req_complete(VirtIOBlockReq *req, int status) } static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error, - int is_read) + bool is_read) { BlockdevOnError action = bdrv_get_on_error(req->dev->bs, is_read); VirtIOBlock *s = req->dev; @@ -98,7 +98,7 @@ static void virtio_blk_rw_complete(void *opaque, int ret) trace_virtio_blk_rw_complete(req, ret); if (ret) { - int is_read = !(ldl_p(&req->out->type) & VIRTIO_BLK_T_OUT); + bool is_read = !(ldl_p(&req->out->type) & VIRTIO_BLK_T_OUT); if (virtio_blk_handle_rw_error(req, -ret, is_read)) return; } |