aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2012-02-03 16:24:53 -0200
committerLuiz Capitulino <lcapitulino@redhat.com>2012-02-22 17:23:05 -0200
commitf36f394952bd6703ca3ad8d649b41a9edd02db0c (patch)
tree1441e439eca979f33699ff87345d9d3ce0bbd0d7
parent329c0a48a92664eb48b70993c0f2473b37aa7429 (diff)
block: bdrv_eject(): Make eject_flag a real bool
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--block.c2
-rw-r--r--block.h2
-rw-r--r--block/raw-posix.c6
-rw-r--r--block/raw.c2
-rw-r--r--block_int.h2
5 files changed, 7 insertions, 7 deletions
diff --git a/block.c b/block.c
index 8d4cfea797..bfb0deca49 100644
--- a/block.c
+++ b/block.c
@@ -3609,7 +3609,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 ec0a6c8468..49bca5aec0 100644
--- a/block.h
+++ b/block.h
@@ -265,7 +265,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 2ee5d690e9..2d1bc13484 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -994,7 +994,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;
@@ -1084,7 +1084,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;
@@ -1194,7 +1194,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 6098070d65..1cdac0ccdc 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 7946cf66a1..04f4b836ca 100644
--- a/block_int.h
+++ b/block_int.h
@@ -197,7 +197,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 */