Displaying 2 results from an estimated 2 matches for "qopt_arg_list".
2018 May 04
1
[PATCH] common/qemuopts: ensure arg lists are never empty
...qemuopts.c
@@ -453,7 +453,15 @@ qemuopts_append_arg_list_format (struct qemuopts *qopts,
int
qemuopts_end_arg_list (struct qemuopts *qopts)
{
- /* Nothing to do, the list is already well-formed. */
+ struct qopt *qopt;
+ size_t len;
+
+ qopt = last_option (qopts);
+ assert (qopt->type == QOPT_ARG_LIST);
+ len = count_strings (qopt->values);
+ if (len == 0)
+ return -1;
+
return 0;
}
@@ -816,7 +824,9 @@ qemuopts_to_argv (struct qemuopts *qopts)
case QOPT_ARG_LIST:
/* We only have to do comma-quoting here. */
values = qopts->options[i].values;
- len = count...
2017 Apr 27
4
[PATCH 0/4] common: Add a simple mini-library for handling qemu command and config files.
Currently we have an OCaml library for generating the qemu command
line (used only by ‘virt-v2v -o qemu’). However we also generate a
qemu command line in ‘lib/launch-direct.c’, and we might in future
need to generate a ‘-readconfig’-compatible configuration file if we
want to go beyond 10,000 drives for scalability testing.
Therefore this patch series reimplements the qemu command line code as