mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
hw: Use IEC binary prefix definitions from "qemu/units.h"
Code change produced with: $ git ls-files | egrep '\.[ch]$' | \ xargs sed -i -e 's/\(\W[KMGTPE]\)_BYTE/\1iB/g' Suggested-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: David Gibson <david@gibson.dropbear.id.au> (ppc parts) Message-Id: <20180625124238.25339-6-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
5fa96cad01
commit
d23b6caadb
19 changed files with 76 additions and 80 deletions
|
@ -11,6 +11,7 @@
|
|||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/units.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/qmp/qdict.h"
|
||||
#include "qapi/qmp/qlist.h"
|
||||
|
@ -457,11 +458,11 @@ static void test_keyval_visit_size(void)
|
|||
visit_type_size(v, "sz2", &sz, &error_abort);
|
||||
g_assert_cmpuint(sz, ==, 1536);
|
||||
visit_type_size(v, "sz3", &sz, &error_abort);
|
||||
g_assert_cmphex(sz, ==, 2 * M_BYTE);
|
||||
g_assert_cmphex(sz, ==, 2 * MiB);
|
||||
visit_type_size(v, "sz4", &sz, &error_abort);
|
||||
g_assert_cmphex(sz, ==, G_BYTE / 10);
|
||||
g_assert_cmphex(sz, ==, GiB / 10);
|
||||
visit_type_size(v, "sz5", &sz, &error_abort);
|
||||
g_assert_cmphex(sz, ==, 16777215 * T_BYTE);
|
||||
g_assert_cmphex(sz, ==, 16777215ULL * TiB);
|
||||
visit_check_struct(v, &error_abort);
|
||||
visit_end_struct(v, NULL);
|
||||
visit_free(v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue