/qemu/tests/unit/ |
H A D | test-cutils.c | 402 endptr = &f; in test_qemu_strtoi_octal() 426 endptr = &f; in test_qemu_strtoi_decimal() 450 endptr = &f; in test_qemu_strtoi_hex() 459 endptr = &f; in test_qemu_strtoi_hex() 846 endptr = &f; in test_qemu_strtoui_octal() 870 endptr = &f; in test_qemu_strtoui_decimal() 894 endptr = &f; in test_qemu_strtoui_hex() 903 endptr = &f; in test_qemu_strtoui_hex() 1284 endptr = &f; in test_qemu_strtol_octal() 1308 endptr = &f; in test_qemu_strtol_decimal() [all …]
|
/qemu/util/ |
H A D | cutils.c | 238 if (retval == 0 && val == 0 && (*endptr == 'x' || *endptr == 'X')) { in do_strtosz() 244 if (*endptr == '.' || suffix_mul(*endptr, unit) > 0) { in do_strtosz() 249 } else if (*endptr == '.' || (endptr == nptr && strchr(nptr, '.'))) { in do_strtosz() 258 if (retval == 0 && *endptr == '.' && !isdigit(endptr[1])) { in do_strtosz() 260 endptr++; in do_strtosz() 312 c = *endptr; in do_strtosz() 315 endptr++; in do_strtosz() 403 if (endptr) { in check_strtox_error() 404 *endptr = ep; in check_strtox_error() 852 if (endptr) { in parse_uint() [all …]
|
H A D | mmap-alloc.c | 91 const char *endptr; in map_noreserve_effective() local 126 !qemu_strtoui(content, &endptr, 0, &tmp) && in map_noreserve_effective() 127 (!endptr || *endptr == '\n')) { in map_noreserve_effective()
|
/qemu/qapi/ |
H A D | string-input-visitor.c | 136 const char *endptr; in try_parse_int64_list_entry() local 145 switch (endptr[0]) { in try_parse_int64_list_entry() 147 siv->unparsed_string = endptr; in try_parse_int64_list_entry() 150 siv->unparsed_string = endptr + 1; in try_parse_int64_list_entry() 154 if (qemu_strtoi64(endptr + 1, &endptr, 0, &end)) { in try_parse_int64_list_entry() 160 switch (endptr[0]) { in try_parse_int64_list_entry() 226 const char *endptr; in try_parse_uint64_list_entry() local 235 switch (endptr[0]) { in try_parse_uint64_list_entry() 237 siv->unparsed_string = endptr; in try_parse_uint64_list_entry() 244 if (qemu_strtou64(endptr + 1, &endptr, 0, &end)) { in try_parse_uint64_list_entry() [all …]
|
H A D | opts-visitor.c | 401 char *endptr; in opts_type_int64() local 418 val = strtoll(str, &endptr, 0); in opts_type_int64() 420 if (*endptr == '\0') { in opts_type_int64() 425 if (*endptr == '-' && ov->list_mode == LM_IN_PROGRESS) { in opts_type_int64() 428 str = endptr + 1; in opts_type_int64() 429 val2 = strtoll(str, &endptr, 0); in opts_type_int64() 430 if (errno == 0 && endptr > str && *endptr == '\0' && in opts_type_int64() 458 const char *endptr; in opts_type_uint64() local 474 if (parse_uint(str, &endptr, 0, &val) == 0) { in opts_type_uint64() 475 if (*endptr == '\0') { in opts_type_uint64() [all …]
|
/qemu/include/qemu/ |
H A D | cutils.h | 151 int qemu_strtoi(const char *nptr, const char **endptr, int base, 153 int qemu_strtoui(const char *nptr, const char **endptr, int base, 155 int qemu_strtol(const char *nptr, const char **endptr, int base, 157 int qemu_strtoul(const char *nptr, const char **endptr, int base, 159 int qemu_strtoi64(const char *nptr, const char **endptr, int base, 161 int qemu_strtou64(const char *nptr, const char **endptr, int base, 163 int qemu_strtod(const char *nptr, const char **endptr, double *result); 164 int qemu_strtod_finite(const char *nptr, const char **endptr, double *result); 166 int parse_uint(const char *s, const char **endptr, int base, uint64_t *value);
|
/qemu/hw/xen/ |
H A D | xen-host-pci-device.c | 55 char *endptr, *s; in xen_host_pci_get_resource() local 79 start = strtoll(s, &endptr, 16); in xen_host_pci_get_resource() 80 if (*endptr != ' ' || s == endptr) { in xen_host_pci_get_resource() 83 s = endptr + 1; in xen_host_pci_get_resource() 84 end = strtoll(s, &endptr, 16); in xen_host_pci_get_resource() 85 if (*endptr != ' ' || s == endptr) { in xen_host_pci_get_resource() 88 s = endptr + 1; in xen_host_pci_get_resource() 89 flags = strtoll(s, &endptr, 16); in xen_host_pci_get_resource() 90 if (*endptr != '\n' || s == endptr) { in xen_host_pci_get_resource() 93 s = endptr + 1; in xen_host_pci_get_resource() [all …]
|
/qemu/target/ppc/ |
H A D | ppc-qmp-cmds.c | 122 char *endptr = NULL; in ppc_cpu_get_reg_num() local 128 regnum = strtoul(numstr, &endptr, 10); in ppc_cpu_get_reg_num() 129 if (*endptr || (regnum >= maxnum)) { in ppc_cpu_get_reg_num()
|
/qemu/hw/core/ |
H A D | qdev-properties-system.c | 736 const char *endptr; in set_reserved_region() local 745 ret = qemu_strtou64(str, &endptr, 16, &lob); in set_reserved_region() 751 if (*endptr != ':') { in set_reserved_region() 755 ret = qemu_strtou64(endptr + 1, &endptr, 16, &upb); in set_reserved_region() 761 if (*endptr != ':') { in set_reserved_region() 767 ret = qemu_strtoui(endptr + 1, &endptr, 10, &rr->type); in set_reserved_region()
|
/qemu/tests/qtest/ |
H A D | arm-cpu-features.c | 236 char *endptr; in resp_get_sve_vls() local 239 bits = g_ascii_strtoll(&e->key[3], &endptr, 10); in resp_get_sve_vls() 240 if (!bits || *endptr != '\0') { in resp_get_sve_vls()
|
/qemu/hw/nvme/ |
H A D | ns.c | 405 const char *endptr, *token; in nvme_ns_init_fdp() local 443 if (qemu_strtoui(token, &endptr, 0, &n) < 0) { in nvme_ns_init_fdp() 452 if (*endptr == '-') { in nvme_ns_init_fdp() 453 token = endptr + 1; in nvme_ns_init_fdp()
|
/qemu/ |
H A D | qemu-io-cmds.c | 321 char *endptr = NULL; in parse_pattern() local 324 pattern = strtol(arg, &endptr, 0); in parse_pattern() 325 if (pattern < 0 || pattern > UCHAR_MAX || *endptr != '\0') { in parse_pattern() 2617 char *endptr; in sleep_f() local 2622 ms = strtol(argv[1], &endptr, 0); in sleep_f() 2623 if (ms < 0 || *endptr != '\0') { in sleep_f()
|
/qemu/hw/virtio/ |
H A D | virtio-mem.c | 94 const char *endptr; in virtio_mem_thp_size() local 106 !qemu_strtou64(content, &endptr, 0, &tmp) && in virtio_mem_thp_size() 107 (!endptr || *endptr == '\n')) { in virtio_mem_thp_size()
|