/qemu/qobject/ |
H A D | qjson.c | 53 * Parse @string as JSON value. 62 static QObject *qobject_from_jsonv(const char *string, va_list *ap, in qobject_from_jsonv() argument 68 json_message_parser_feed(&state.parser, string, strlen(string)); in qobject_from_jsonv() 80 QObject *qobject_from_json(const char *string, Error **errp) in qobject_from_json() argument 82 return qobject_from_jsonv(string, NULL, errp); in qobject_from_json() 86 * Parse @string as JSON value with %-escapes interpolated. 87 * Abort on error. Do not use with untrusted @string. 90 QObject *qobject_from_vjsonf_nofail(const char *string, va_list ap) in qobject_from_vjsonf_nofail() argument 97 obj = qobject_from_jsonv(string, &ap_copy, &error_abort); in qobject_from_vjsonf_nofail() 105 * Parse @string as JSON value with %-escapes interpolated. [all …]
|
H A D | qstring.c | 28 * qstring_from_substr(): Create a new QString from a C string substring 30 * Return string reference 39 qstring->string = g_strndup(str + start, end - start); in qstring_from_substr() 44 * qstring_from_str(): Create a new QString from a regular C string 65 qstring->string = g_string_free(gstr, false); in qstring_from_gstring() 71 * qstring_get_str(): Return a pointer to the stored string 78 return qstring->string; in qstring_get_str() 86 return !strcmp(qobject_to(QString, x)->string, in qstring_is_equal() 87 qobject_to(QString, y)->string); in qstring_is_equal() 100 g_free((char *)qs->string); in qstring_destroy_obj()
|
/qemu/tests/unit/ |
H A D | test-string-output-visitor.c | 2 * String Output Visitor unit-tests. 16 #include "qapi/string-output-visitor.h" 142 char *string = (char *) "Q E M U"; in test_visitor_out_string() local 146 visit_type_str(data->ov, NULL, &string, &error_abort); in test_visitor_out_string() 152 g_assert_cmpstr(str, ==, string); in test_visitor_out_string() 159 char *string = NULL; in test_visitor_out_no_string() local 162 /* A null string should return "" */ in test_visitor_out_no_string() 163 visit_type_str(data->ov, NULL, &string, &error_abort); in test_visitor_out_no_string() 213 output_visitor_test_add("/string-visitor/output/int", in main() 215 output_visitor_test_add("/string-visitor/output/int-human", in main() [all …]
|
H A D | test-qobject-output-visitor.c | 103 char *string = (char *) "Q E M U"; in test_visitor_out_string() local 106 visit_type_str(data->ov, NULL, &string, &error_abort); in test_visitor_out_string() 110 g_assert_cmpstr(qstring_get_str(qstr), ==, string); in test_visitor_out_string() 116 char *string = NULL; in test_visitor_out_no_string() local 119 /* A null string should return "" */ in test_visitor_out_no_string() 120 visit_type_str(data->ov, NULL, &string, &error_abort); in test_visitor_out_no_string() 148 .string = (char *) "foo"}; in test_visitor_out_struct() 159 g_assert_cmpstr(qdict_get_str(qdict, "string"), ==, "foo"); in test_visitor_out_struct() 168 const char *string = "user def string"; in test_visitor_out_struct_nested() local 180 ud2->dict1->dict2->userdef->string = g_strdup(string); in test_visitor_out_struct_nested() [all …]
|
H A D | test-clone-visitor.c | 21 src->string = g_strdup("Hello"); in test_clone_struct() 28 g_assert(dst->string != src->string); in test_clone_struct() 29 g_assert_cmpstr(dst->string, ==, "Hello"); in test_clone_struct() 105 src->string = g_strdup("abc"); in test_clone_complex1() 113 g_assert_cmpstr(dst->string, ==, "abc"); in test_clone_complex1() 132 src->alt->u.udfu.string = NULL; in test_clone_complex2() 143 g_assert_cmpstr(dst->alt->u.udfu.string, ==, ""); in test_clone_complex2() 161 elt->string = g_strdup("three"); in test_clone_complex3() 167 elt->string = g_strdup("two"); in test_clone_complex3() 171 elt->string = g_strdup("one"); in test_clone_complex3() [all …]
|
H A D | test-visitor-serialization.c | 23 #include "qapi/string-input-visitor.h" 24 #include "qapi/string-output-visitor.h" 45 const char *string; member 99 visit_type_str(v, NULL, (char **)&pt->value.string, errp); in visit_primitive_type() 190 ts->string = strdup("test string"); in struct_create() 200 g_assert_cmpstr(ts1->string, ==, ts2->string); in struct_compare() 205 g_free(ts->string); in struct_cleanup() 223 udnp->dict1->dict2->userdef->string = strdup("test_string"); in nested_struct_create() 224 udnp->dict1->dict2->string = strdup("test_string2"); in nested_struct_create() 228 udnp->dict1->dict3->userdef->string = strdup("test_string"); in nested_struct_create() [all …]
|
H A D | test-qmp-cmds.c | 87 ud1c->string = strdup(ud1a->string); in qmp_user_def_cmd2() 89 ud1d->string = strdup(ud1b ? ud1b->string : "blah0"); in qmp_user_def_cmd2() 98 ret->dict1->dict2->string = strdup("blah3"); in qmp_user_def_cmd2() 101 ret->dict1->dict3->string = strdup("blah4"); in qmp_user_def_cmd2() 247 " 'ud1a': { 'integer': 42, 'string': 'hello' }," in test_dispatch_cmd_io() 248 " 'ud1b': { 'integer': 422, 'string': 'hello2' } } }")); in test_dispatch_cmd_io() 256 assert(!strcmp(qdict_get_str(ret_dict_dict_userdef, "string"), "hello")); in test_dispatch_cmd_io() 257 assert(!strcmp(qdict_get_str(ret_dict_dict, "string"), "blah3")); in test_dispatch_cmd_io() 261 assert(!strcmp(qdict_get_str(ret_dict_dict2_userdef, "string"), "hello2")); in test_dispatch_cmd_io() 262 assert(!strcmp(qdict_get_str(ret_dict_dict2, "string"), "blah4")); in test_dispatch_cmd_io() [all …]
|
H A D | test-qobject-input-visitor.c | 47 function so that the JSON string used by the tests are kept in the test 95 /* similar to visitor_input_test_init(), but does not expect a string 100 * string) 405 v = visitor_input_test_init(data, "{ 'integer': -42, 'boolean': true, 'string': 'foo' }"); in test_visitor_in_struct() 410 g_assert_cmpstr(p->string, ==, "foo"); in test_visitor_in_struct() 412 g_free(p->string); in test_visitor_in_struct() 425 "'string': 'string' }, 'string': 'string2'}}}"); in test_visitor_in_struct_nested() 432 g_assert_cmpstr(udp->dict1->dict2->userdef->string, ==, "string"); in test_visitor_in_struct_nested() 433 g_assert_cmpstr(udp->dict1->dict2->string, ==, "string2"); in test_visitor_in_struct_nested() 444 …itor_input_test_init(data, "[ { 'string': 'string0', 'integer': 42 }, { 'string': 'string1', 'inte… in test_visitor_in_list() [all …]
|
H A D | test-qmp-event.c | 72 UserDefOne b = { .integer = 2, .string = (char *)"test1" }; in test_event_c() 76 " 'a': 1, 'b': { 'integer': 2, 'string': 'test1' }, 'c': 'test2' } }"); in test_event_c() 85 .integer = 2, .string = (char *)"test1", in test_event_d() 90 .string = (char *)"test2", in test_event_d() 98 " 'struct1': { 'integer': 2, 'string': 'test1', 'enum1': 'value1' }," in test_event_d() 99 " 'string': 'test2', 'enum2': 'value2' }," in test_event_d()
|
H A D | test-string-input-visitor.c | 2 * String Input Visitor unit-tests. 16 #include "qapi/string-input-visitor.h" 33 string used by the tests are kept in the test functions (and not 37 const char *string) in visitor_input_test_init() argument 41 data->v = string_input_visitor_new(string); in visitor_input_test_init() 480 input_visitor_test_add("/string-visitor/input/int", in main() 482 input_visitor_test_add("/string-visitor/input/intList", in main() 484 input_visitor_test_add("/string-visitor/input/uintList", in main() 486 input_visitor_test_add("/string-visitor/input/bool", in main() 488 input_visitor_test_add("/string-visitor/input/number", in main() [all …]
|
/qemu/include/qemu/ |
H A D | cutils.h | 24 * @buf: buffer to copy string into 26 * @str: string to copy 30 * always NUL terminated (even if the source string was too long). 43 * @buf: buffer to copy string into 45 * @str: string to copy 56 * @buf: buffer containing existing string 58 * @s: string to concatenate to @buf 60 * Append a copy of @s to the string already in @buf, but do not 65 * @buf must already contain a NUL-terminated string, or the 73 * @str: string to test [all …]
|
/qemu/qapi/ |
H A D | string-output-visitor.c | 2 * String printing Visitor 15 #include "qapi/string-output-visitor.h" 59 GString *string; member 76 static void string_output_set(StringOutputVisitor *sov, char *string) in string_output_set() argument 83 if (sov->string) { in string_output_set() 84 g_string_free(sov->string, true); in string_output_set() 86 sov->string = g_string_new(string); in string_output_set() 87 g_free(string); in string_output_set() 92 g_string_append(sov->string, ", "); in string_output_set() 93 g_string_append(sov->string, string); in string_output_set() [all …]
|
H A D | string-input-visitor.c | 2 * String parsing visitor 15 #include "qapi/string-input-visitor.h" 25 /* we have an unparsed string remaining */ 31 /* we have parsed the string completely and no range is remaining */ 54 /* The original string to parse */ 55 const char *string; member 70 siv->unparsed_string = siv->string; in start_list() 72 if (!siv->string[0]) { in start_list() 96 /* we have an unparsed string or something left in a range */ in next_list() 191 if (qemu_strtoi64(siv->string, NULL, 0, &val)) { in parse_type_int64() [all …]
|
/qemu/libdecnumber/ |
H A D | decContext.c | 246 /* decContextSetStatusFromString -- set status from a string + trap */ 249 /* string is a string exactly equal to one that might be returned */ 252 /* The status bit corresponding to the string is set, and a trap */ 255 /* returns the context structure, unless the string is equal to */ 260 const char *string) { in decContextSetStatusFromString() argument 261 if (strcmp(string, DEC_Condition_CS)==0) in decContextSetStatusFromString() 263 if (strcmp(string, DEC_Condition_DZ)==0) in decContextSetStatusFromString() 265 if (strcmp(string, DEC_Condition_DI)==0) in decContextSetStatusFromString() 267 if (strcmp(string, DEC_Condition_DU)==0) in decContextSetStatusFromString() 269 if (strcmp(string, DEC_Condition_IE)==0) in decContextSetStatusFromString() [all …]
|
/qemu/rust/qemu-api/src/ |
H A D | callbacks.rs | 59 /// fn call_it<F: for<'a> FnCall<(&'a str,), String>>(_f: &F, s: &str) -> String { 63 /// let s: String = call_it(&str::to_owned, "hello world"); 75 /// # fn call_it<'a, F: FnCall<(&'a str,), String>>(_f: &F, s: &'a str) -> String { 79 /// call_it(&move |_| String::from(x), "hello workd"); 86 /// fn optional<F: for<'a> FnCall<(&'a str,), String>>(_f: &F, s: &str) -> Option<String> { 101 /// # fn call_it<F: for<'a> FnCall<(&'a str,), String>>(_f: &F, s: &str) -> String { 104 /// let s: String = call_it(&(), "hello world"); // panics 129 /// fn call_it<F: for<'a> FnCall<(&'a str,), String>>(_f: &F, s: &str) -> String { 134 /// let s: String = call_it((), "hello world"); // does not compile 149 /// fn call_it<F: for<'a> FnCall<(&'a str,), String>>(_f: &F, s: &str) -> String { [all …]
|
/qemu/docs/devel/ |
H A D | qapi-code-gen.rst | 56 string, and extend to the end of the line. 79 * String literals enclosed in ``'single quotes'`` are terminal, and match 80 this JSON string, with a leading ``*`` stripped off 83 * The symbol ``STRING`` is a terminal, and matches any JSON string 85 * ALL-CAPS words other than ``STRING`` are non-terminals 118 ``str`` ``char *`` any JSON string, UTF-8 135 ``QType`` ``QType`` JSON string matching enum ``QType`` values 144 INCLUDE = { 'include': STRING } 169 '*command-name-exceptions': [ STRING, ... ], 170 '*command-returns-exceptions': [ STRING, ... ], [all …]
|
/qemu/hw/virtio/ |
H A D | virtio-nsm.c | 72 * key = String("Error"), 73 * value = String(error_name) 129 * key = String("GetRandom"), 131 * key = String("random"), 188 * key = String("DescribeNSM"), 190 * key = String("digest"), 191 * value = String("SHA384"), 192 * key = String("max_pcrs"), 194 * key = String("module_id"), 195 * value = String("i-1234-enc5678"), [all …]
|
/qemu/include/qobject/ |
H A D | qjson.h | 17 QObject *qobject_from_json(const char *string, Error **errp); 19 QObject *qobject_from_vjsonf_nofail(const char *string, va_list ap) 21 QObject *qobject_from_jsonf_nofail(const char *string, ...) 23 QDict *qdict_from_vjsonf_nofail(const char *string, va_list ap) 25 QDict *qdict_from_jsonf_nofail(const char *string, ...)
|
/qemu/target/hexagon/ |
H A D | gen_printinsn.py | 22 import string 28 ## Generate data for printing each instruction (format string + operands) 75 # t is the string that matched opswithequal_re. 76 t = m.string[ms:me] 80 # Check if the entire string t is an assignment. 91 # string. 94 # Append the remaining part of the string. 101 … "Emit opaque macro calls with information for printing string representations of instrucions" 127 # Print out a literal "%s" at the end, used to match empty string 178 # append empty string so there is at least one more arg
|
/qemu/docs/interop/ |
H A D | qemu-ga.rst | 147 method string 148 path string 149 logfile string 150 pidfile string 151 fsfreeze-hook string 152 statedir string 154 block-rpcs string list 155 allow-rpcs string list
|
/qemu/libdecnumber/dpd/ |
H A D | decimal32.c | 35 /* Conversions are supplied to and from decNumber and String. */ 238 /* to-scientific-string -- conversion to numeric string */ 239 /* to-engineering-string -- conversion to numeric string */ 241 /* decimal32ToString(d32, string); */ 242 /* decimal32ToEngString(d32, string); */ 245 /* string is the string where the result will be laid out */ 247 /* string must be at least 24 characters */ 251 char * decimal32ToEngString(const decimal32 *d32, char *string){ in decimal32ToEngString() argument 254 decNumberToEngString(&dn, string); in decimal32ToEngString() 255 return string; in decimal32ToEngString() [all …]
|
H A D | decimal128.c | 35 /* Conversions are supplied to and from decNumber and String. */ 265 /* to-scientific-string -- conversion to numeric string */ 266 /* to-engineering-string -- conversion to numeric string */ 268 /* decimal128ToString(d128, string); */ 269 /* decimal128ToEngString(d128, string); */ 272 /* string is the string where the result will be laid out */ 274 /* string must be at least 24 characters */ 278 char * decimal128ToEngString(const decimal128 *d128, char *string){ in decimal128ToEngString() argument 281 decNumberToEngString(&dn, string); in decimal128ToEngString() 282 return string; in decimal128ToEngString() [all …]
|
/qemu/include/gdbstub/ |
H A D | commands.h | 42 * 's' -> string (stored in .data) 70 * gdb_put_packet() - put string into gdb server's buffer so it is sent 92 * gdb_extend_qsupported_features() - Extend the qSupported features string. 93 * @qsupported_features: The additional qSupported feature(s) string. The string 103 * Convert a hex string to bytes. Conversion is done per byte, so 2 hex digits
|
/qemu/tests/tcg/hexagon/ |
H A D | test_call.S | 3 * The string "Hello there, I'm a test string!" with the first letter replaced 62 .string "Hello there, I'm a test string!\n"
|
/qemu/ |
H A D | meson_options.txt | 5 option('qemu_suffix', type : 'string', value: 'qemu', 7 option('docdir', type : 'string', value : 'share/doc', 11 option('pkgversion', type : 'string', value : '', 12 description: 'use specified string as sub-version of the package') 13 option('smbd', type : 'string', value : '', 15 option('iasl', type : 'string', value : '', 17 option('tls_priority', type : 'string', value : 'NORMAL', 18 description: 'Default TLS protocol/cipher priority string') 24 option('block_drv_rw_whitelist', type : 'string', value : '', 26 option('block_drv_ro_whitelist', type : 'string', value : '', [all …]
|