From e0168ce7429981067deb3f90f472d06484686018 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Wed, 29 Feb 2012 20:01:02 +0100 Subject: [PATCH 07/11] block: bdrv_eject(): Make eject_flag a real bool RH-Author: Luiz Capitulino Message-id: <1330545665-1595-3-git-send-email-lcapitulino@redhat.com> Patchwork-id: 37789 O-Subject: [PATCH RHEL6.3 qemu-kvm 2/5] block: bdrv_eject(): Make eject_flag a real bool Bugzilla: 575159 RH-Acked-by: Paolo Bonzini RH-Acked-by: Markus Armbruster RH-Acked-by: Kevin Wolf Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster Acked-by: Kevin Wolf (cherry picked from commit f36f394952bd6703ca3ad8d649b41a9edd02db0c) --- block.c | 2 +- block.h | 2 +- block/raw-posix.c | 6 +++--- block/raw.c | 2 +- block_int.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) Signed-off-by: Michal Novotny --- block.c | 2 +- block.h | 2 +- block/raw-posix.c | 6 +++--- block/raw.c | 2 +- block_int.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/block.c b/block.c index 3aa3fe6..3d1d9f1 100644 --- a/block.c +++ b/block.c @@ -2902,7 +2902,7 @@ int bdrv_media_changed(BlockDriverState *bs) /** * If eject_flag is TRUE, eject the media. Otherwise, close the tray */ -void bdrv_eject(BlockDriverState *bs, int eject_flag) +void bdrv_eject(BlockDriverState *bs, bool eject_flag) { BlockDriver *drv = bs->drv; diff --git a/block.h b/block.h index 37232cc..e3b2260 100644 --- a/block.h +++ b/block.h @@ -247,7 +247,7 @@ int bdrv_enable_write_cache(BlockDriverState *bs); int bdrv_is_inserted(BlockDriverState *bs); int bdrv_media_changed(BlockDriverState *bs); void bdrv_lock_medium(BlockDriverState *bs, bool locked); -void bdrv_eject(BlockDriverState *bs, int eject_flag); +void bdrv_eject(BlockDriverState *bs, bool eject_flag); void bdrv_get_format(BlockDriverState *bs, char *buf, int buf_size); BlockDriverState *bdrv_find(const char *name); BlockDriverState *bdrv_next(BlockDriverState *bs); diff --git a/block/raw-posix.c b/block/raw-posix.c index 256beb9..f359187 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -859,7 +859,7 @@ static int floppy_media_changed(BlockDriverState *bs) return ret; } -static void floppy_eject(BlockDriverState *bs, int eject_flag) +static void floppy_eject(BlockDriverState *bs, bool eject_flag) { BDRVRawState *s = bs->opaque; int fd; @@ -944,7 +944,7 @@ static int cdrom_is_inserted(BlockDriverState *bs) return 0; } -static void cdrom_eject(BlockDriverState *bs, int eject_flag) +static void cdrom_eject(BlockDriverState *bs, bool eject_flag) { BDRVRawState *s = bs->opaque; @@ -1052,7 +1052,7 @@ static int cdrom_is_inserted(BlockDriverState *bs) return raw_getlength(bs) > 0; } -static void cdrom_eject(BlockDriverState *bs, int eject_flag) +static void cdrom_eject(BlockDriverState *bs, bool eject_flag) { BDRVRawState *s = bs->opaque; diff --git a/block/raw.c b/block/raw.c index 33cc471..db0d99a 100644 --- a/block/raw.c +++ b/block/raw.c @@ -61,7 +61,7 @@ static int raw_media_changed(BlockDriverState *bs) return bdrv_media_changed(bs->file); } -static void raw_eject(BlockDriverState *bs, int eject_flag) +static void raw_eject(BlockDriverState *bs, bool eject_flag) { bdrv_eject(bs->file, eject_flag); } diff --git a/block_int.h b/block_int.h index 239c547..6e2b0c0 100644 --- a/block_int.h +++ b/block_int.h @@ -120,7 +120,7 @@ struct BlockDriver { /* removable device specific */ int (*bdrv_is_inserted)(BlockDriverState *bs); int (*bdrv_media_changed)(BlockDriverState *bs); - void (*bdrv_eject)(BlockDriverState *bs, int eject_flag); + void (*bdrv_eject)(BlockDriverState *bs, bool eject_flag); void (*bdrv_lock_medium)(BlockDriverState *bs, bool locked); /* to control generic scsi devices */ -- 1.7.7.6