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