Home | History | Annotate | Download | only in qemu

Lines Matching defs:option

2  * Commandline option parsing functions
32 #include "qemu-option.h"
36 * Extracts the name of an option from the parameter string (p points at the
37 * first byte of the option name)
39 * The option name is delimited by delim (usually , or =) or the string end
40 * and is copied into buf. If the option name is longer than buf_size, it is
43 * The return value is the position of the delimiter/zero byte after the option
63 * Extracts the value of an option from the parameter string p (p points at the
64 * first byte of the option value)
67 * delimiter is fixed to be comma which starts a new option. To specify an
68 * option value that contains commas, double each comma.
95 char option[128];
99 p = get_opt_name(option, sizeof(option), p, '=');
103 if (!strcmp(tag, option)) {
156 * Searches an option list for an option with the given name
242 * Sets the value of a parameter in a given option list. The parsing of the
243 * value depends on the type of option:
250 * value is strdup()ed and assigned as option value
266 fprintf(stderr, "Unknown option '%s'\n", name);
282 fprintf(stderr, "Option '%s' needs a parameter\n", name);
293 fprintf(stderr, "Bug: Option '%s' has an unknown type\n", name);
312 fprintf(stderr, "Unknown option '%s'\n", name);
332 * Frees a option list. If it contains strings, the strings are freed as well.
364 * Append an option list (list) to an option list (dest).
395 * Parses a parameter string (param) into an option list (dest).
397 * list is the template option list. If dest is NULL, a new copy of list is
776 char option[128], value[1024];
785 /* implicitly named first option */
786 pstrcpy(option, sizeof(option), firstname);
789 /* option without value, probably a flag */
790 p = get_opt_name(option, sizeof(option), p, ',');
791 if (strncmp(option, "no", 2) == 0) {
792 memmove(option, option+2, strlen(option+2)+1);
800 p = get_opt_name(option, sizeof(option), p, '=');
807 if (strcmp(option, "id") != 0) {
809 if (qemu_opt_set(opts, option, value) == -1) {