Revision abd7f68d block.c

b/block.c
1206 1206
    return bs->translation;
1207 1207
}
1208 1208

  
1209
void bdrv_set_on_error(BlockDriverState *bs, BlockErrorAction on_read_error,
1210
                       BlockErrorAction on_write_error)
1211
{
1212
    bs->on_read_error = on_read_error;
1213
    bs->on_write_error = on_write_error;
1214
}
1215

  
1216
BlockErrorAction bdrv_get_on_error(BlockDriverState *bs, int is_read)
1217
{
1218
    return is_read ? bs->on_read_error : bs->on_write_error;
1219
}
1220

  
1209 1221
int bdrv_is_removable(BlockDriverState *bs)
1210 1222
{
1211 1223
    return bs->removable;

Also available in: Unified diff