mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
pr-manager: put stubs in .c file
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
aad10040d4
commit
58b3017f7f
3 changed files with 25 additions and 9 deletions
|
@ -41,15 +41,6 @@ BlockAIOCB *pr_manager_execute(PRManager *pr_mgr,
|
|||
BlockCompletionFunc *complete,
|
||||
void *opaque);
|
||||
|
||||
#ifdef CONFIG_LINUX
|
||||
PRManager *pr_manager_lookup(const char *id, Error **errp);
|
||||
#else
|
||||
static inline PRManager *pr_manager_lookup(const char *id, Error **errp)
|
||||
{
|
||||
/* The classes do not exist at all! */
|
||||
error_setg(errp, "No persistent reservation manager with id '%s'", id);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
block-obj-y += utils.o
|
||||
|
||||
block-obj-$(CONFIG_LINUX) += pr-manager.o pr-manager-helper.o
|
||||
block-obj-$(call lnot,$(CONFIG_LINUX)) += pr-manager-stub.o
|
||||
|
|
24
scsi/pr-manager-stub.c
Normal file
24
scsi/pr-manager-stub.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Persistent reservation manager - stub for non-Linux platforms
|
||||
*
|
||||
* Copyright (c) 2018 Red Hat, Inc.
|
||||
*
|
||||
* Author: Paolo Bonzini <pbonzini@redhat.com>
|
||||
*
|
||||
* This code is licensed under the LGPL.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "scsi/pr-manager.h"
|
||||
#include "trace.h"
|
||||
#include "qapi/qapi-types-block.h"
|
||||
#include "qapi/qapi-commands-block.h"
|
||||
|
||||
PRManager *pr_manager_lookup(const char *id, Error **errp)
|
||||
{
|
||||
/* The classes do not exist at all! */
|
||||
error_setg(errp, "No persistent reservation manager with id '%s'", id);
|
||||
return NULL;
|
||||
}
|
Loading…
Reference in a new issue