/* Returns 0 on success, -1 in error cases  */
int set_option_parameter_int(QEMUOptionParameter *list, const char *name, uint64_t value)
/* Returns 0 on success, -1 in error cases  */
int set_option_parameter_int(QEMUOptionParameter *list, const char *name, uint64_t value)
{
    list = get_option_parameter(list, name);
    if (list == NULL) {
        fprintf(stderr, "Unknown option '%s'\n", name);
        return -1;
    }
    switch (list->type) {
    case OPT_FLAG:
    case OPT_NUMBER:
    case OPT_SIZE:
        list->value.n = value;
        break;
    default:
        return -1;
    }
    list->assigned = true;
    return 0;
}