[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 01/40] include: Add IEC binary prefixes in "qemu/
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH v4 01/40] include: Add IEC binary prefixes in "qemu/units.h" |
Date: |
Sun, 10 Jun 2018 22:14:22 -0300 |
Loosely based on 076b35b5a56.
Suggested-by: Stefan Weil <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
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é <address@hidden>
+ *
+ * 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
- [Qemu-devel] [PATCH v4 00/40] Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 01/40] include: Add IEC binary prefixes in "qemu/units.h",
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH v4 02/40] vdi: Use definitions from "qemu/units.h", Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 03/40] x86/cpu: Use definitions from "qemu/units.h", Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 04/40] checkpatch: Recognize IEC binary prefix definitions, Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 05/40] hw: Use IEC binary prefix definitions from "qemu/units.h", Philippe Mathieu-Daudé, 2018/06/10
- [Qemu-devel] [PATCH v4 06/40] hw: Directly use "qemu/units.h" instead of "qemu/cutils.h", Philippe Mathieu-Daudé, 2018/06/10