mirror of
https://github.com/mborgerson/xemu.git
synced 2025-12-01 16:10:01 +00: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:
committed by
Paolo Bonzini
parent
5fa96cad01
commit
d23b6caadb
@ -2,6 +2,7 @@
|
||||
#define QEMU_CUTILS_H
|
||||
|
||||
#include "qemu/fprintf-fn.h"
|
||||
#include "qemu/units.h"
|
||||
|
||||
/**
|
||||
* pstrcpy:
|
||||
@ -155,13 +156,6 @@ int qemu_strtosz(const char *nptr, char **end, uint64_t *result);
|
||||
int qemu_strtosz_MiB(const char *nptr, char **end, uint64_t *result);
|
||||
int qemu_strtosz_metric(const char *nptr, char **end, uint64_t *result);
|
||||
|
||||
#define K_BYTE (1ULL << 10)
|
||||
#define M_BYTE (1ULL << 20)
|
||||
#define G_BYTE (1ULL << 30)
|
||||
#define T_BYTE (1ULL << 40)
|
||||
#define P_BYTE (1ULL << 50)
|
||||
#define E_BYTE (1ULL << 60)
|
||||
|
||||
/* used to print char* safely */
|
||||
#define STR_OR_NULL(str) ((str) ? (str) : "null")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user