(added in 076b35b5a56) Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> --- include/qemu/cutils.h | 8 +------- include/qemu/units.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 include/qemu/units.h
diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h index a663340b23..056e6629bb 100644 --- a/include/qemu/cutils.h +++ b/include/qemu/cutils.h @@ -2,6 +2,7 @@ #define QEMU_CUTILS_H #include "qemu/fprintf-fn.h" +#include "qemu/units.h" /** * pstrcpy: @@ -147,13 +148,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") diff --git a/include/qemu/units.h b/include/qemu/units.h new file mode 100644 index 0000000000..81f5cc6f7f --- /dev/null +++ b/include/qemu/units.h @@ -0,0 +1,11 @@ +#ifndef QEMU_UNITS_H +#define QEMU_UNITS_H + +#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) + +#endif -- 2.17.0