hmp-cmds.c (d22b854dc5a859eb6d1fa27616308d633bc584e3) hmp-cmds.c (54aa3de72ea2aaa2e903e7e879a4f3dda515a00e)
1/*
2 * Human Monitor Interface commands
3 *
4 * Copyright IBM, Corp. 2011
5 *
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
8 *

--- 1241 unchanged lines hidden (view full) ---

1250 hmp_handle_error(mon, err);
1251}
1252
1253void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict)
1254{
1255 const char *cap = qdict_get_str(qdict, "capability");
1256 bool state = qdict_get_bool(qdict, "state");
1257 Error *err = NULL;
1/*
2 * Human Monitor Interface commands
3 *
4 * Copyright IBM, Corp. 2011
5 *
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
8 *

--- 1241 unchanged lines hidden (view full) ---

1250 hmp_handle_error(mon, err);
1251}
1252
1253void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict)
1254{
1255 const char *cap = qdict_get_str(qdict, "capability");
1256 bool state = qdict_get_bool(qdict, "state");
1257 Error *err = NULL;
1258 MigrationCapabilityStatusList *caps = g_malloc0(sizeof(*caps));
1258 MigrationCapabilityStatusList *caps = NULL;
1259 MigrationCapabilityStatus *value;
1259 int val;
1260
1261 val = qapi_enum_parse(&MigrationCapability_lookup, cap, -1, &err);
1262 if (val < 0) {
1263 goto end;
1264 }
1265
1260 int val;
1261
1262 val = qapi_enum_parse(&MigrationCapability_lookup, cap, -1, &err);
1263 if (val < 0) {
1264 goto end;
1265 }
1266
1266 caps->value = g_malloc0(sizeof(*caps->value));
1267 caps->value->capability = val;
1268 caps->value->state = state;
1269 caps->next = NULL;
1267 value = g_malloc0(sizeof(*value));
1268 value->capability = val;
1269 value->state = state;
1270 QAPI_LIST_PREPEND(caps, value);
1270 qmp_migrate_set_capabilities(caps, &err);
1271 qmp_migrate_set_capabilities(caps, &err);
1272 qapi_free_MigrationCapabilityStatusList(caps);
1271
1272end:
1273
1274end:
1273 qapi_free_MigrationCapabilityStatusList(caps);
1274 hmp_handle_error(mon, err);
1275}
1276
1277void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
1278{
1279 const char *param = qdict_get_str(qdict, "parameter");
1280 const char *valuestr = qdict_get_str(qdict, "value");
1281 Visitor *v = string_input_visitor_new(valuestr);

--- 262 unchanged lines hidden (view full) ---

1544 !!arg, arg, !!read_only, read_only_mode,
1545 &err);
1546 }
1547
1548end:
1549 hmp_handle_error(mon, err);
1550}
1551
1275 hmp_handle_error(mon, err);
1276}
1277
1278void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
1279{
1280 const char *param = qdict_get_str(qdict, "parameter");
1281 const char *valuestr = qdict_get_str(qdict, "value");
1282 Visitor *v = string_input_visitor_new(valuestr);

--- 262 unchanged lines hidden (view full) ---

1545 !!arg, arg, !!read_only, read_only_mode,
1546 &err);
1547 }
1548
1549end:
1550 hmp_handle_error(mon, err);
1551}
1552
1552typedef struct HMPMigrationStatus {
1553typedef struct HMPMigrationStatus
1554{
1553 QEMUTimer *timer;
1554 Monitor *mon;
1555 bool is_block_migration;
1556} HMPMigrationStatus;
1557
1558static void hmp_migrate_status_cb(void *opaque)
1559{
1560 HMPMigrationStatus *status = opaque;

--- 712 unchanged lines hidden ---
1555 QEMUTimer *timer;
1556 Monitor *mon;
1557 bool is_block_migration;
1558} HMPMigrationStatus;
1559
1560static void hmp_migrate_status_cb(void *opaque)
1561{
1562 HMPMigrationStatus *status = opaque;

--- 712 unchanged lines hidden ---