Revision 145feb17 hw/ide/core.c
b/hw/ide/core.c | ||
---|---|---|
783 | 783 |
} |
784 | 784 |
|
785 | 785 |
/* called when the inserted state of the media has changed */ |
786 |
static void cdrom_change_cb(void *opaque, int reason)
|
|
786 |
static void ide_cd_change_cb(void *opaque)
|
|
787 | 787 |
{ |
788 | 788 |
IDEState *s = opaque; |
789 | 789 |
uint64_t nb_sectors; |
790 | 790 |
|
791 |
if (!(reason & CHANGE_MEDIA)) { |
|
792 |
return; |
|
793 |
} |
|
794 |
|
|
795 | 791 |
bdrv_get_geometry(s->bs, &nb_sectors); |
796 | 792 |
s->nb_sectors = nb_sectors; |
797 | 793 |
|
... | ... | |
1743 | 1739 |
} |
1744 | 1740 |
|
1745 | 1741 |
static const BlockDevOps ide_cd_block_ops = { |
1746 |
.change_cb = cdrom_change_cb,
|
|
1742 |
.change_media_cb = ide_cd_change_cb,
|
|
1747 | 1743 |
}; |
1748 | 1744 |
|
1749 | 1745 |
int ide_init_drive(IDEState *s, BlockDriverState *bs, IDEDriveKind kind, |
Also available in: Unified diff