]> git.proxmox.com Git - qemu.git/commit
block: use Error mechanism instead of -errno for block_job_create()
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Wed, 25 Apr 2012 15:51:00 +0000 (16:51 +0100)
committerLuiz Capitulino <lcapitulino@redhat.com>
Fri, 27 Apr 2012 14:44:50 +0000 (11:44 -0300)
commitfd7f8c65377ee918479e43b38d44f54f13aa6548
tree14676280cfffb57a80fe9bfd1058fbbb87ba9050
parentbe5ea8ed4481f0ffa4ea0f7ba13e465701536001
block: use Error mechanism instead of -errno for block_job_create()

The block job API uses -errno return values internally and we convert
these to Error in the QMP functions.  This is ugly because the Error
should be created at the point where we still have all the relevant
information.  More importantly, it is hard to add new error cases to
this case since we quickly run out of -errno values without losing
information.

Go ahead and use Error directly and don't convert later.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
block.c
block/stream.c
block_int.h
blockdev.c