util: remove support for hex numbers with a scaling suffix

This was deprecated in 6.0 and can now be removed.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2022-12-16 10:50:05 +01:00
parent eaaaf8abdc
commit 8b902e3d23
4 changed files with 19 additions and 19 deletions

View file

@ -2315,6 +2315,14 @@ static void test_qemu_strtosz_invalid(void)
g_assert_cmpint(res, ==, 0xbaadf00d);
g_assert(endptr == str);
/* No suffixes */
str = "0x18M";
endptr = NULL;
err = qemu_strtosz(str, &endptr, &res);
g_assert_cmpint(err, ==, -EINVAL);
g_assert_cmpint(res, ==, 0xbaadf00d);
g_assert(endptr == str);
/* No negative values */
str = "-0";
endptr = NULL;