|
|
e9bfca |
From 0595e70eaf58a80095db24f4d119148cde577ae7 Mon Sep 17 00:00:00 2001
|
|
|
e9bfca |
From: Pino Toscano <ptoscano@redhat.com>
|
|
|
e9bfca |
Date: Fri, 2 Mar 2018 16:22:35 +0100
|
|
|
e9bfca |
Subject: [PATCH] RHEL 7: move VIRTIO_DEVICE_NAME() macro to guestfs-internal.h
|
|
|
e9bfca |
|
|
|
e9bfca |
This way it can be used also in other places than launch-direct.c.
|
|
|
e9bfca |
---
|
|
|
e9bfca |
lib/guestfs-internal.h | 11 +++++++++++
|
|
|
e9bfca |
lib/launch-direct.c | 11 -----------
|
|
|
e9bfca |
2 files changed, 11 insertions(+), 11 deletions(-)
|
|
|
e9bfca |
|
|
|
e9bfca |
diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h
|
|
|
e9bfca |
index adeb9478a..8e4e30a20 100644
|
|
|
e9bfca |
--- a/lib/guestfs-internal.h
|
|
|
e9bfca |
+++ b/lib/guestfs-internal.h
|
|
|
e9bfca |
@@ -136,6 +136,17 @@
|
|
|
e9bfca |
/* Maximum size of Windows explorer.exe. 2.6MB on Windows 7. */
|
|
|
e9bfca |
#define MAX_WINDOWS_EXPLORER_SIZE (4 * 1000 * 1000)
|
|
|
e9bfca |
|
|
|
e9bfca |
+/* Differences in qemu device names on ARMv7 (virtio-mmio), s/390x
|
|
|
e9bfca |
+ * (CCW) vs normal hardware with PCI.
|
|
|
e9bfca |
+ */
|
|
|
e9bfca |
+#if defined(__arm__)
|
|
|
e9bfca |
+#define VIRTIO_DEVICE_NAME(type) type "-device"
|
|
|
e9bfca |
+#elif defined(__s390x__)
|
|
|
e9bfca |
+#define VIRTIO_DEVICE_NAME(type) type "-ccw"
|
|
|
e9bfca |
+#else
|
|
|
e9bfca |
+#define VIRTIO_DEVICE_NAME(type) type "-pci"
|
|
|
e9bfca |
+#endif
|
|
|
e9bfca |
+
|
|
|
e9bfca |
/* Machine types. */
|
|
|
e9bfca |
#ifdef __arm__
|
|
|
e9bfca |
#define MACHINE_TYPE "virt"
|
|
|
e9bfca |
diff --git a/lib/launch-direct.c b/lib/launch-direct.c
|
|
|
e9bfca |
index 47e8f37de..f6c494d69 100644
|
|
|
e9bfca |
--- a/lib/launch-direct.c
|
|
|
e9bfca |
+++ b/lib/launch-direct.c
|
|
|
e9bfca |
@@ -49,17 +49,6 @@
|
|
|
e9bfca |
#include "guestfs_protocol.h"
|
|
|
e9bfca |
#include "qemuopts.h"
|
|
|
e9bfca |
|
|
|
e9bfca |
-/* Differences in qemu device names on ARMv7 (virtio-mmio), s/390x
|
|
|
e9bfca |
- * (CCW) vs normal hardware with PCI.
|
|
|
e9bfca |
- */
|
|
|
e9bfca |
-#if defined(__arm__)
|
|
|
e9bfca |
-#define VIRTIO_DEVICE_NAME(type) type "-device"
|
|
|
e9bfca |
-#elif defined(__s390x__)
|
|
|
e9bfca |
-#define VIRTIO_DEVICE_NAME(type) type "-ccw"
|
|
|
e9bfca |
-#else
|
|
|
e9bfca |
-#define VIRTIO_DEVICE_NAME(type) type "-pci"
|
|
|
e9bfca |
-#endif
|
|
|
e9bfca |
-
|
|
|
e9bfca |
/* Per-handle data. */
|
|
|
e9bfca |
struct backend_direct_data {
|
|
|
e9bfca |
pid_t pid; /* Qemu PID. */
|
|
|
e9bfca |
--
|
|
|
e9bfca |
2.17.1
|
|
|
e9bfca |
|