Skip to content

Commit

Permalink
block: bdrv_eject(): Make eject_flag a real bool
Browse files Browse the repository at this point in the history
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
Luiz Capitulino committed Feb 22, 2012
1 parent 329c0a4 commit f36f394
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion block.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion block.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions block/raw-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion block/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion block_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit f36f394

Please sign in to comment.