|
|
7711c0 |
From 887a7e12d07315fe03f0b8efe7054d7c4f946bc2 Mon Sep 17 00:00:00 2001
|
|
|
7711c0 |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
7711c0 |
Date: Wed, 7 Nov 2018 17:59:59 +0100
|
|
|
7711c0 |
Subject: [PATCH 25/34] include: Add IEC binary prefixes in "qemu/units.h"
|
|
|
7711c0 |
MIME-Version: 1.0
|
|
|
7711c0 |
Content-Type: text/plain; charset=UTF-8
|
|
|
7711c0 |
Content-Transfer-Encoding: 8bit
|
|
|
7711c0 |
|
|
|
7711c0 |
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
7711c0 |
Message-id: <20181107180007.22954-2-pbonzini@redhat.com>
|
|
|
7711c0 |
Patchwork-id: 82941
|
|
|
7711c0 |
O-Subject: [RHEL7.6.z qemu-kvm-rhev PATCH 1/9] include: Add IEC binary prefixes in "qemu/units.h"
|
|
|
7711c0 |
Bugzilla: 1566195
|
|
|
7711c0 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
|
|
|
7711c0 |
|
|
|
7711c0 |
Loosely based on 076b35b5a56.
|
|
|
7711c0 |
|
|
|
7711c0 |
Suggested-by: Stefan Weil <sw@weilnetz.de>
|
|
|
7711c0 |
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
|
|
|
7711c0 |
Message-Id: <20180625124238.25339-2-f4bug@amsat.org>
|
|
|
7711c0 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
7711c0 |
(cherry picked from commit 7ecdc94c40f4958a66893c0eac423c6a80f376d4)
|
|
|
7711c0 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
---
|
|
|
7711c0 |
include/qemu/units.h | 20 ++++++++++++++++++++
|
|
|
7711c0 |
1 file changed, 20 insertions(+)
|
|
|
7711c0 |
create mode 100644 include/qemu/units.h
|
|
|
7711c0 |
|
|
|
7711c0 |
diff --git a/include/qemu/units.h b/include/qemu/units.h
|
|
|
7711c0 |
new file mode 100644
|
|
|
7711c0 |
index 0000000..692db3f
|
|
|
7711c0 |
--- /dev/null
|
|
|
7711c0 |
+++ b/include/qemu/units.h
|
|
|
7711c0 |
@@ -0,0 +1,20 @@
|
|
|
7711c0 |
+/*
|
|
|
7711c0 |
+ * IEC binary prefixes definitions
|
|
|
7711c0 |
+ *
|
|
|
7711c0 |
+ * Copyright (C) 2015 Nikunj A Dadhania, IBM Corporation
|
|
|
7711c0 |
+ * Copyright (C) 2018 Philippe Mathieu-Daudé <f4bug@amsat.org>
|
|
|
7711c0 |
+ *
|
|
|
7711c0 |
+ * SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
7711c0 |
+ */
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+#ifndef QEMU_UNITS_H
|
|
|
7711c0 |
+#define QEMU_UNITS_H
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+#define KiB (INT64_C(1) << 10)
|
|
|
7711c0 |
+#define MiB (INT64_C(1) << 20)
|
|
|
7711c0 |
+#define GiB (INT64_C(1) << 30)
|
|
|
7711c0 |
+#define TiB (INT64_C(1) << 40)
|
|
|
7711c0 |
+#define PiB (INT64_C(1) << 50)
|
|
|
7711c0 |
+#define EiB (INT64_C(1) << 60)
|
|
|
7711c0 |
+
|
|
|
7711c0 |
+#endif
|
|
|
7711c0 |
--
|
|
|
7711c0 |
1.8.3.1
|
|
|
7711c0 |
|