diff options
author | Kevin Wolf <kwolf@redhat.com> | 2010-10-21 16:43:43 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-11-04 12:52:16 +0100 |
commit | 205ef7961f781496366e0a93a4ec621ad3724bd7 (patch) | |
tree | 7c1861837185ba98074140dba8f03e65941c8c8c /block_int.h | |
parent | 5dba48a882c126ccc86db6506cfa6dcca97badab (diff) |
block: Allow bdrv_flush to return errors
This changes bdrv_flush to return 0 on success and -errno in case of failure.
It's a requirement for implementing proper error handle in users of bdrv_flush.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'block_int.h')
-rw-r--r-- | block_int.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block_int.h b/block_int.h index 87e60b8597..3c3adb5c85 100644 --- a/block_int.h +++ b/block_int.h @@ -59,7 +59,7 @@ struct BlockDriver { const uint8_t *buf, int nb_sectors); void (*bdrv_close)(BlockDriverState *bs); int (*bdrv_create)(const char *filename, QEMUOptionParameter *options); - void (*bdrv_flush)(BlockDriverState *bs); + int (*bdrv_flush)(BlockDriverState *bs); int (*bdrv_is_allocated)(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum); int (*bdrv_set_key)(BlockDriverState *bs, const char *key); |