void do_commit(Monitor *mon, const QDict *qdict)

{

    const char *device = qdict_get_str(qdict, "device");

    BlockDriverState *bs;



    if (!strcmp(device, "all")) {

        bdrv_commit_all();

    } else {

        int ret;



        bs = bdrv_find(device);

        if (!bs) {

            qerror_report(QERR_DEVICE_NOT_FOUND, device);

            return;

        }

        ret = bdrv_commit(bs);

        if (ret == -EBUSY) {

            qerror_report(QERR_DEVICE_IN_USE, device);

            return;

        }

    }

}

void do_commit(Monitor *mon, const QDict *qdict)

{

    const char *device = qdict_get_str(qdict, "device");

    BlockDriverState *bs;



    if (!strcmp(device, "all")) {

        bdrv_commit_all();

    } else {

        int ret;



        bs = bdrv_find(device);

        if (!bs) {

            qerror_report(QERR_DEVICE_NOT_FOUND, device);

            return;

        }

        ret = bdrv_commit(bs);

        if (ret == -EBUSY) {

            qerror_report(QERR_DEVICE_IN_USE, device);

            return;

        }

    }

}

        bdrv_commit_all();         int ret;
void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)

{

    const char *VAR_2 = qdict_get_str(VAR_1, "VAR_2");

    BlockDriverState *bs;



    if (!strcmp(VAR_2, "all")) {

        bdrv_commit_all();

    } else {

        int VAR_3;



        bs = bdrv_find(VAR_2);

        if (!bs) {

            qerror_report(QERR_DEVICE_NOT_FOUND, VAR_2);

            return;

        }

        VAR_3 = bdrv_commit(bs);

        if (VAR_3 == -EBUSY) {

            qerror_report(QERR_DEVICE_IN_USE, VAR_2);

            return;

        }

    }

}

void FUNC_0(Monitor *VAR_0, const QDict *VAR_1)
{ const char *VAR_2 = qdict_get_str(VAR_1, "VAR_2"); BlockDriverState *bs; if (!strcmp(VAR_2, "all")) { bdrv_commit_all(); } else { int VAR_3; bs = bdrv_find(VAR_2); if (!bs) { qerror_report(QERR_DEVICE_NOT_FOUND, VAR_2); return; } VAR_3 = bdrv_commit(bs); if (VAR_3 == -EBUSY) { qerror_report(QERR_DEVICE_IN_USE, VAR_2); return; } } }