]> git.proxmox.com Git - mirror_qemu.git/commit - block/raw-win32.c
block/raw-win32: Always use -errno in hdev_open
authorMax Reitz <mreitz@redhat.com>
Fri, 11 Oct 2013 12:30:16 +0000 (14:30 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 17 Oct 2013 12:55:46 +0000 (14:55 +0200)
commit45d57f6e718e44e55780bcf1d09fa140dce7ec08
treec20e324e778d51aa050280c0960711deb9fdbaf2
parenta7fdbcf0e6e52d935ebff6d849fe4b5473e5860d
block/raw-win32: Always use -errno in hdev_open

On one occasion, hdev_open() returned -1 in case of an unknown error
instead of a proper -errno value. Adjust this to match the behavior of
raw_open() (in raw-win32), which is to return -EINVAL in this case.
Also, change the call to error_setg*() to match the one in raw_open() as
well.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/raw-win32.c