int bdrv_create(BlockDriver *drv, const char* filename,

    QEMUOptionParameter *options)

{

    int ret;



    Coroutine *co;

    CreateCo cco = {

        .drv = drv,

        .filename = g_strdup(filename),

        .options = options,

        .ret = NOT_DONE,

    };



    if (!drv->bdrv_create) {

        return -ENOTSUP;

    }



    if (qemu_in_coroutine()) {

        /* Fast-path if already in coroutine context */

        bdrv_create_co_entry(&cco);

    } else {

        co = qemu_coroutine_create(bdrv_create_co_entry);

        qemu_coroutine_enter(co, &cco);

        while (cco.ret == NOT_DONE) {

            qemu_aio_wait();

        }

    }



    ret = cco.ret;

    g_free(cco.filename);



    return ret;

}

int bdrv_create(BlockDriver *drv, const char* filename,

    QEMUOptionParameter *options)

{

    int ret;



    Coroutine *co;

    CreateCo cco = {

        .drv = drv,

        .filename = g_strdup(filename),

        .options = options,

        .ret = NOT_DONE,

    };



    if (!drv->bdrv_create) {

        return -ENOTSUP;

    }



    if (qemu_in_coroutine()) {

        

        bdrv_create_co_entry(&cco);

    } else {

        co = qemu_coroutine_create(bdrv_create_co_entry);

        qemu_coroutine_enter(co, &cco);

        while (cco.ret == NOT_DONE) {

            qemu_aio_wait();

        }

    }



    ret = cco.ret;

    g_free(cco.filename);



    return ret;

}

        return -ENOTSUP;     g_free(cco.filename);
int FUNC_0(BlockDriver *VAR_0, const char* VAR_1,

    QEMUOptionParameter *VAR_2)

{

    int VAR_3;



    Coroutine *co;

    CreateCo cco = {

        .VAR_0 = VAR_0,

        .VAR_1 = g_strdup(VAR_1),

        .VAR_2 = VAR_2,

        .VAR_3 = NOT_DONE,

    };



    if (!VAR_0->FUNC_0) {

        return -ENOTSUP;

    }



    if (qemu_in_coroutine()) {

        

        bdrv_create_co_entry(&cco);

    } else {

        co = qemu_coroutine_create(bdrv_create_co_entry);

        qemu_coroutine_enter(co, &cco);

        while (cco.VAR_3 == NOT_DONE) {

            qemu_aio_wait();

        }

    }



    VAR_3 = cco.VAR_3;

    g_free(cco.VAR_1);



    return VAR_3;

}

int FUNC_0(BlockDriver *VAR_0, const char* VAR_1,
QEMUOptionParameter *VAR_2)
{ int VAR_3; Coroutine *co; CreateCo cco = { .VAR_0 = VAR_0,
.VAR_1 = g_strdup(VAR_1),
.VAR_2 = VAR_2,
.VAR_3 = NOT_DONE,
}; if (!VAR_0->FUNC_0) { return -ENOTSUP; } if (qemu_in_coroutine()) { bdrv_create_co_entry(&cco); } else { co = qemu_coroutine_create(bdrv_create_co_entry); qemu_coroutine_enter(co, &cco); while (cco.VAR_3 == NOT_DONE) { qemu_aio_wait(); } } VAR_3 = cco.VAR_3; g_free(cco.VAR_1); return VAR_3; }