int do_balloon(Monitor *mon, const QDict *params,

	       MonitorCompletion cb, void *opaque)

{

    int ret;



    if (kvm_enabled() && !kvm_has_sync_mmu()) {

        qerror_report(QERR_KVM_MISSING_CAP, "synchronous MMU", "balloon");

        return -1;

    }



    ret = qemu_balloon(qdict_get_int(params, "value"));

    if (ret == 0) {

        qerror_report(QERR_DEVICE_NOT_ACTIVE, "balloon");

        return -1;

    }



    cb(opaque, NULL);

    return 0;

}

int do_balloon(Monitor *mon, const QDict *params,

	       MonitorCompletion cb, void *opaque)

{

    int ret;



    if (kvm_enabled() && !kvm_has_sync_mmu()) {

        qerror_report(QERR_KVM_MISSING_CAP, "synchronous MMU", "balloon");

        return -1;

    }



    ret = qemu_balloon(qdict_get_int(params, "value"));

    if (ret == 0) {

        qerror_report(QERR_DEVICE_NOT_ACTIVE, "balloon");

        return -1;

    }



    cb(opaque, NULL);

    return 0;

}

int FUNC_0(Monitor *VAR_0, const QDict *VAR_1,

	       MonitorCompletion VAR_2, void *VAR_3)

{

    int VAR_4;



    if (kvm_enabled() && !kvm_has_sync_mmu()) {

        qerror_report(QERR_KVM_MISSING_CAP, "synchronous MMU", "balloon");

        return -1;

    }



    VAR_4 = qemu_balloon(qdict_get_int(VAR_1, "value"));

    if (VAR_4 == 0) {

        qerror_report(QERR_DEVICE_NOT_ACTIVE, "balloon");

        return -1;

    }



    VAR_2(VAR_3, NULL);

    return 0;

}

int FUNC_0(Monitor *VAR_0, const QDict *VAR_1,
MonitorCompletion VAR_2, void *VAR_3)
{ int VAR_4; if (kvm_enabled() && !kvm_has_sync_mmu()) { qerror_report(QERR_KVM_MISSING_CAP, "synchronous MMU", "balloon"); return -1; } VAR_4 = qemu_balloon(qdict_get_int(VAR_1, "value")); if (VAR_4 == 0) { qerror_report(QERR_DEVICE_NOT_ACTIVE, "balloon"); return -1; } VAR_2(VAR_3, NULL); return 0; }