Loosely based on 076b35b5a56. Suggested-by: Stefan Weil <s...@weilnetz.de> Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- I suppose the following warning is irrelevant:
WARNING: 1 added file, does MAINTAINERS need updating include/qemu/units.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 include/qemu/units.h diff --git a/include/qemu/units.h b/include/qemu/units.h new file mode 100644 index 0000000000..e3a39ed59e --- /dev/null +++ b/include/qemu/units.h @@ -0,0 +1,20 @@ +/* + * IEC binary prefixes definitions + * + * Copyright (C) 2015 Nikunj A Dadhania, IBM Corporation + * Copyright (C) 2018 Philippe Mathieu-Daudé <f4...@amsat.org> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef QEMU_UNITS_H +#define QEMU_UNITS_H + +#define KiB (1ULL << 10) +#define MiB (1ULL << 20) +#define GiB (1ULL << 30) +#define TiB (1ULL << 40) +#define PiB (1ULL << 50) +#define EiB (1ULL << 60) + +#endif -- 2.17.1