Revision 7d0d6950 block.c

b/block.c
1299 1299
    return is_read ? bs->on_read_error : bs->on_write_error;
1300 1300
}
1301 1301

  
1302
void bdrv_set_removable(BlockDriverState *bs, int removable)
1303
{
1304
    bs->removable = removable;
1305
    if (removable && bs == bs_snapshots) {
1306
        bs_snapshots = NULL;
1307
    }
1308
}
1309

  
1302 1310
int bdrv_is_removable(BlockDriverState *bs)
1303 1311
{
1304 1312
    return bs->removable;

Also available in: Unified diff