[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/5] block: bdrv_eject(): Make eject_flag a real boo
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 2/5] block: bdrv_eject(): Make eject_flag a real bool |
Date: |
Tue, 7 Feb 2012 16:09:46 -0200 |
Signed-off-by: Luiz Capitulino <address@hidden>
---
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 160b9de..4042ada 100644
--- a/block.c
+++ b/block.c
@@ -3560,7 +3560,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 36a53a0..ce8c5ed 100644
--- a/block.h
+++ b/block.h
@@ -257,7 +257,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 2ee5d69..2d1bc13 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 6098070..1cdac0c 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 7be2988..f954add 100644
--- a/block_int.h
+++ b/block_int.h
@@ -189,7 +189,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.9.111.gf3fb0.dirty
- [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT & BLOCK_MEDIUM_CHANGED, Luiz Capitulino, 2012/02/07
- [Qemu-devel] [PATCH 2/5] block: bdrv_eject(): Make eject_flag a real bool,
Luiz Capitulino <=
- [Qemu-devel] [PATCH 3/5] block: bdrv_eject(): Add tray_changed parameter, Luiz Capitulino, 2012/02/07
- [Qemu-devel] [PATCH 5/5] qmp: add the BLOCK_MEDIUM_CHANGED event, Luiz Capitulino, 2012/02/07
- [Qemu-devel] [PATCH 4/5] qmp: add the GUEST_MEDIUM_EJECTED event, Luiz Capitulino, 2012/02/07
- [Qemu-devel] [PATCH 1/5] block: Rename bdrv_mon_event() & BlockMonEventAction, Luiz Capitulino, 2012/02/07
- Re: [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT & BLOCK_MEDIUM_CHANGED, Markus Armbruster, 2012/02/09
- Re: [Qemu-devel] [RFC 0/5]: QMP: Introduce GUEST_MEDIUM_EJECT & BLOCK_MEDIUM_CHANGED, Paolo Bonzini, 2012/02/10