static void bdrv_move_feature_fields(BlockDriverState *bs_dest,

                                     BlockDriverState *bs_src)

{

    /* move some fields that need to stay attached to the device */

    bs_dest->open_flags         = bs_src->open_flags;



    /* dev info */

    bs_dest->dev_ops            = bs_src->dev_ops;

    bs_dest->dev_opaque         = bs_src->dev_opaque;

    bs_dest->dev                = bs_src->dev;

    bs_dest->buffer_alignment   = bs_src->buffer_alignment;

    bs_dest->copy_on_read       = bs_src->copy_on_read;



    bs_dest->enable_write_cache = bs_src->enable_write_cache;



    /* i/o timing parameters */

    bs_dest->slice_time         = bs_src->slice_time;

    bs_dest->slice_start        = bs_src->slice_start;

    bs_dest->slice_end          = bs_src->slice_end;

    bs_dest->io_limits          = bs_src->io_limits;

    bs_dest->io_base            = bs_src->io_base;

    bs_dest->throttled_reqs     = bs_src->throttled_reqs;

    bs_dest->block_timer        = bs_src->block_timer;

    bs_dest->io_limits_enabled  = bs_src->io_limits_enabled;



    /* geometry */

    bs_dest->cyls               = bs_src->cyls;

    bs_dest->heads              = bs_src->heads;

    bs_dest->secs               = bs_src->secs;

    bs_dest->translation        = bs_src->translation;



    /* r/w error */

    bs_dest->on_read_error      = bs_src->on_read_error;

    bs_dest->on_write_error     = bs_src->on_write_error;



    /* i/o status */

    bs_dest->iostatus_enabled   = bs_src->iostatus_enabled;

    bs_dest->iostatus           = bs_src->iostatus;



    /* dirty bitmap */

    bs_dest->dirty_count        = bs_src->dirty_count;

    bs_dest->dirty_bitmap       = bs_src->dirty_bitmap;



    /* job */

    bs_dest->in_use             = bs_src->in_use;

    bs_dest->job                = bs_src->job;



    /* keep the same entry in bdrv_states */

    pstrcpy(bs_dest->device_name, sizeof(bs_dest->device_name),

            bs_src->device_name);

    bs_dest->list = bs_src->list;

}

static void bdrv_move_feature_fields(BlockDriverState *bs_dest,

                                     BlockDriverState *bs_src)

{

    

    bs_dest->open_flags         = bs_src->open_flags;



    

    bs_dest->dev_ops            = bs_src->dev_ops;

    bs_dest->dev_opaque         = bs_src->dev_opaque;

    bs_dest->dev                = bs_src->dev;

    bs_dest->buffer_alignment   = bs_src->buffer_alignment;

    bs_dest->copy_on_read       = bs_src->copy_on_read;



    bs_dest->enable_write_cache = bs_src->enable_write_cache;



    

    bs_dest->slice_time         = bs_src->slice_time;

    bs_dest->slice_start        = bs_src->slice_start;

    bs_dest->slice_end          = bs_src->slice_end;

    bs_dest->io_limits          = bs_src->io_limits;

    bs_dest->io_base            = bs_src->io_base;

    bs_dest->throttled_reqs     = bs_src->throttled_reqs;

    bs_dest->block_timer        = bs_src->block_timer;

    bs_dest->io_limits_enabled  = bs_src->io_limits_enabled;



    

    bs_dest->cyls               = bs_src->cyls;

    bs_dest->heads              = bs_src->heads;

    bs_dest->secs               = bs_src->secs;

    bs_dest->translation        = bs_src->translation;



    

    bs_dest->on_read_error      = bs_src->on_read_error;

    bs_dest->on_write_error     = bs_src->on_write_error;



    

    bs_dest->iostatus_enabled   = bs_src->iostatus_enabled;

    bs_dest->iostatus           = bs_src->iostatus;



    

    bs_dest->dirty_count        = bs_src->dirty_count;

    bs_dest->dirty_bitmap       = bs_src->dirty_bitmap;



    

    bs_dest->in_use             = bs_src->in_use;

    bs_dest->job                = bs_src->job;



    

    pstrcpy(bs_dest->device_name, sizeof(bs_dest->device_name),

            bs_src->device_name);

    bs_dest->list = bs_src->list;

}

static void FUNC_0(BlockDriverState *VAR_0,

                                     BlockDriverState *VAR_1)

{

    

    VAR_0->open_flags         = VAR_1->open_flags;



    

    VAR_0->dev_ops            = VAR_1->dev_ops;

    VAR_0->dev_opaque         = VAR_1->dev_opaque;

    VAR_0->dev                = VAR_1->dev;

    VAR_0->buffer_alignment   = VAR_1->buffer_alignment;

    VAR_0->copy_on_read       = VAR_1->copy_on_read;



    VAR_0->enable_write_cache = VAR_1->enable_write_cache;



    

    VAR_0->slice_time         = VAR_1->slice_time;

    VAR_0->slice_start        = VAR_1->slice_start;

    VAR_0->slice_end          = VAR_1->slice_end;

    VAR_0->io_limits          = VAR_1->io_limits;

    VAR_0->io_base            = VAR_1->io_base;

    VAR_0->throttled_reqs     = VAR_1->throttled_reqs;

    VAR_0->block_timer        = VAR_1->block_timer;

    VAR_0->io_limits_enabled  = VAR_1->io_limits_enabled;



    

    VAR_0->cyls               = VAR_1->cyls;

    VAR_0->heads              = VAR_1->heads;

    VAR_0->secs               = VAR_1->secs;

    VAR_0->translation        = VAR_1->translation;



    

    VAR_0->on_read_error      = VAR_1->on_read_error;

    VAR_0->on_write_error     = VAR_1->on_write_error;



    

    VAR_0->iostatus_enabled   = VAR_1->iostatus_enabled;

    VAR_0->iostatus           = VAR_1->iostatus;



    

    VAR_0->dirty_count        = VAR_1->dirty_count;

    VAR_0->dirty_bitmap       = VAR_1->dirty_bitmap;



    

    VAR_0->in_use             = VAR_1->in_use;

    VAR_0->job                = VAR_1->job;



    

    pstrcpy(VAR_0->device_name, sizeof(VAR_0->device_name),

            VAR_1->device_name);

    VAR_0->list = VAR_1->list;

}

static void FUNC_0(BlockDriverState *VAR_0,
BlockDriverState *VAR_1)
{ VAR_0->open_flags         = VAR_1->open_flags; VAR_0->dev_ops            = VAR_1->dev_ops; VAR_0->dev_opaque         = VAR_1->dev_opaque; VAR_0->dev                = VAR_1->dev; VAR_0->buffer_alignment   = VAR_1->buffer_alignment; VAR_0->copy_on_read       = VAR_1->copy_on_read; VAR_0->enable_write_cache = VAR_1->enable_write_cache; VAR_0->slice_time         = VAR_1->slice_time; VAR_0->slice_start        = VAR_1->slice_start; VAR_0->slice_end          = VAR_1->slice_end; VAR_0->io_limits          = VAR_1->io_limits; VAR_0->io_base            = VAR_1->io_base; VAR_0->throttled_reqs     = VAR_1->throttled_reqs; VAR_0->block_timer        = VAR_1->block_timer; VAR_0->io_limits_enabled  = VAR_1->io_limits_enabled; VAR_0->cyls               = VAR_1->cyls; VAR_0->heads              = VAR_1->heads; VAR_0->secs               = VAR_1->secs; VAR_0->translation        = VAR_1->translation; VAR_0->on_read_error      = VAR_1->on_read_error; VAR_0->on_write_error     = VAR_1->on_write_error; VAR_0->iostatus_enabled   = VAR_1->iostatus_enabled; VAR_0->iostatus           = VAR_1->iostatus; VAR_0->dirty_count        = VAR_1->dirty_count; VAR_0->dirty_bitmap       = VAR_1->dirty_bitmap; VAR_0->in_use             = VAR_1->in_use; VAR_0->job                = VAR_1->job; pstrcpy(VAR_0->device_name, sizeof(VAR_0->device_name),
VAR_1->device_name); VAR_0->list = VAR_1->list; }