|
|
ae23c9 |
From e32685151297109c3b502ffdc7bda2288605029a Mon Sep 17 00:00:00 2001
|
|
|
ae23c9 |
From: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
ae23c9 |
Date: Fri, 6 Jul 2018 17:56:54 +0200
|
|
|
ae23c9 |
Subject: [PATCH 194/268] pr-manager: put stubs in .c file
|
|
|
ae23c9 |
|
|
|
ae23c9 |
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
ae23c9 |
Message-id: <20180706175659.30615-5-pbonzini@redhat.com>
|
|
|
ae23c9 |
Patchwork-id: 81253
|
|
|
ae23c9 |
O-Subject: [RHEL7.6 qemu-kvm-rhev PATCH 4/9] pr-manager: put stubs in .c file
|
|
|
ae23c9 |
Bugzilla: 1533158
|
|
|
ae23c9 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
ae23c9 |
(cherry picked from commit 58b3017f7fba15e8c440115dfd5d380f490d0b61)
|
|
|
ae23c9 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
ae23c9 |
---
|
|
|
ae23c9 |
include/scsi/pr-manager.h | 9 ---------
|
|
|
ae23c9 |
scsi/Makefile.objs | 1 +
|
|
|
ae23c9 |
scsi/pr-manager-stub.c | 24 ++++++++++++++++++++++++
|
|
|
ae23c9 |
3 files changed, 25 insertions(+), 9 deletions(-)
|
|
|
ae23c9 |
create mode 100644 scsi/pr-manager-stub.c
|
|
|
ae23c9 |
|
|
|
ae23c9 |
diff --git a/include/scsi/pr-manager.h b/include/scsi/pr-manager.h
|
|
|
ae23c9 |
index 5d2f13a..71971ae 100644
|
|
|
ae23c9 |
--- a/include/scsi/pr-manager.h
|
|
|
ae23c9 |
+++ b/include/scsi/pr-manager.h
|
|
|
ae23c9 |
@@ -41,15 +41,6 @@ BlockAIOCB *pr_manager_execute(PRManager *pr_mgr,
|
|
|
ae23c9 |
BlockCompletionFunc *complete,
|
|
|
ae23c9 |
void *opaque);
|
|
|
ae23c9 |
|
|
|
ae23c9 |
-#ifdef CONFIG_LINUX
|
|
|
ae23c9 |
PRManager *pr_manager_lookup(const char *id, Error **errp);
|
|
|
ae23c9 |
-#else
|
|
|
ae23c9 |
-static inline PRManager *pr_manager_lookup(const char *id, Error **errp)
|
|
|
ae23c9 |
-{
|
|
|
ae23c9 |
- /* The classes do not exist at all! */
|
|
|
ae23c9 |
- error_setg(errp, "No persistent reservation manager with id '%s'", id);
|
|
|
ae23c9 |
- return NULL;
|
|
|
ae23c9 |
-}
|
|
|
ae23c9 |
-#endif
|
|
|
ae23c9 |
|
|
|
ae23c9 |
#endif
|
|
|
ae23c9 |
diff --git a/scsi/Makefile.objs b/scsi/Makefile.objs
|
|
|
ae23c9 |
index 4d25e47..bb8789c 100644
|
|
|
ae23c9 |
--- a/scsi/Makefile.objs
|
|
|
ae23c9 |
+++ b/scsi/Makefile.objs
|
|
|
ae23c9 |
@@ -1,3 +1,4 @@
|
|
|
ae23c9 |
block-obj-y += utils.o
|
|
|
ae23c9 |
|
|
|
ae23c9 |
block-obj-$(CONFIG_LINUX) += pr-manager.o pr-manager-helper.o
|
|
|
ae23c9 |
+block-obj-$(call lnot,$(CONFIG_LINUX)) += pr-manager-stub.o
|
|
|
ae23c9 |
diff --git a/scsi/pr-manager-stub.c b/scsi/pr-manager-stub.c
|
|
|
ae23c9 |
new file mode 100644
|
|
|
ae23c9 |
index 0000000..632f17c
|
|
|
ae23c9 |
--- /dev/null
|
|
|
ae23c9 |
+++ b/scsi/pr-manager-stub.c
|
|
|
ae23c9 |
@@ -0,0 +1,24 @@
|
|
|
ae23c9 |
+/*
|
|
|
ae23c9 |
+ * Persistent reservation manager - stub for non-Linux platforms
|
|
|
ae23c9 |
+ *
|
|
|
ae23c9 |
+ * Copyright (c) 2018 Red Hat, Inc.
|
|
|
ae23c9 |
+ *
|
|
|
ae23c9 |
+ * Author: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
ae23c9 |
+ *
|
|
|
ae23c9 |
+ * This code is licensed under the LGPL.
|
|
|
ae23c9 |
+ *
|
|
|
ae23c9 |
+ */
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
+#include "qemu/osdep.h"
|
|
|
ae23c9 |
+#include "qapi/error.h"
|
|
|
ae23c9 |
+#include "scsi/pr-manager.h"
|
|
|
ae23c9 |
+#include "trace.h"
|
|
|
ae23c9 |
+#include "qapi/qapi-types-block.h"
|
|
|
ae23c9 |
+#include "qapi/qapi-commands-block.h"
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
+PRManager *pr_manager_lookup(const char *id, Error **errp)
|
|
|
ae23c9 |
+{
|
|
|
ae23c9 |
+ /* The classes do not exist at all! */
|
|
|
ae23c9 |
+ error_setg(errp, "No persistent reservation manager with id '%s'", id);
|
|
|
ae23c9 |
+ return NULL;
|
|
|
ae23c9 |
+}
|
|
|
ae23c9 |
--
|
|
|
ae23c9 |
1.8.3.1
|
|
|
ae23c9 |
|