From nobody Tue Nov 4 15:26:27 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530216123486195.14728145032961; Thu, 28 Jun 2018 13:02:03 -0700 (PDT) Received: from localhost ([::1]:38269 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYd7C-0005Q2-Mw for importer@patchew.org; Thu, 28 Jun 2018 16:02:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYd37-0002DZ-Hc for qemu-devel@nongnu.org; Thu, 28 Jun 2018 15:57:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYd36-0000ZC-JT for qemu-devel@nongnu.org; Thu, 28 Jun 2018 15:57:49 -0400 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:39143) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYd36-0000WI-Al for qemu-devel@nongnu.org; Thu, 28 Jun 2018 15:57:48 -0400 Received: by mail-wr0-x243.google.com with SMTP id b8-v6so6658913wro.6 for ; Thu, 28 Jun 2018 12:57:48 -0700 (PDT) Received: from 640k.lan ([82.84.124.111]) by smtp.gmail.com with ESMTPSA id d102-v6sm12516646wma.10.2018.06.28.12.57.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 12:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=lwGal+cYmL5tuooR3D3HxGQkn5aetGa//QdgjO06iPc=; b=EGq77rVnsyE0rPbztPLKQsA1imu915oGQqmQVYXflN44gc3fr7BgWuh02+ksdvA3r4 SHb3Jrk07ixLCie9ZxFrWrwbBqe8G/YJRykj2DxtRTDoM0fRlYBcJSU04F7atV6CTYcS 0DYr8UmHbUlcHi1dbxh2Ptwzz/VkqBz6OgGE6ZbuK3IfNgEJR1lFB1KrrnJcZfL9gc0q TaL6h7Sx3vdE+8MQEvD+agIxUBmmHj4ux5/wwWygo15bK52tdpAqSc2mB6z/gSKl73kO vV1kCPGV30Xru19biEPr1wVTSWqdsjkOkje/TOtqIbtkM5lpAeGHDVY+6SOcrHghQ2QN 90bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=lwGal+cYmL5tuooR3D3HxGQkn5aetGa//QdgjO06iPc=; b=j+AIDtIcZkNnyLnlgC57EU05oPu7m8pBPzULmQNojdJc0v00ZZa7ujIWCmzDQ3J+th jHh8/QUUTLB1S41p/veytgOM74nR8WS5UodBv9ctqFGfnJnxs9/qly1lIqWpITOcYsCC KOK3vFcz9jx0rUmV8k3md/NvO9VRNtZ83XO6Qn/XKv3LZTCKIKNcAaZzFDBeAda6nKCC TY2jOCT/RnAEe48RLnbl1VT6V0t2w1Xf7NezPMvMnWsWlvmtGhhCUYR2TUeLxj0OWJIx H6z2kM7FPKzHq5mCsqe5WeHXwXgmG4AXBPqOmlL7eWdlvfUGPUSakAjnDfELwipYgSOw LOag== X-Gm-Message-State: APt69E1Rs9haAo7teXZuIiesgtn1yRp4IETUdX5c1IluGCFh9WqJdC4j jro4zpo0IUjEUjme8ZWQowWM2DAt X-Google-Smtp-Source: AAOMgpdpT938RkcpQVK5PowU/+1Kf7wNWrxCuthQcQmBkhuxwIzfE87/fkzSiFSdnpM9fg69Sm1/fg== X-Received: by 2002:adf:9226:: with SMTP id 35-v6mr6334794wrj.44.1530215866915; Thu, 28 Jun 2018 12:57:46 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 28 Jun 2018 21:57:36 +0200 Message-Id: <1530215858-1525-5-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1530215858-1525-1-git-send-email-pbonzini@redhat.com> References: <1530215858-1525-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PATCH 4/6] pr-manager: put stubs in .c file X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- include/scsi/pr-manager.h | 9 --------- scsi/Makefile.objs | 1 + scsi/pr-manager-stub.c | 24 ++++++++++++++++++++++++ 3 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 scsi/pr-manager-stub.c diff --git a/include/scsi/pr-manager.h b/include/scsi/pr-manager.h index 5d2f13a..71971ae 100644 --- a/include/scsi/pr-manager.h +++ b/include/scsi/pr-manager.h @@ -41,15 +41,6 @@ BlockAIOCB *pr_manager_execute(PRManager *pr_mgr, BlockCompletionFunc *complete, void *opaque); =20 -#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 =20 #endif diff --git a/scsi/Makefile.objs b/scsi/Makefile.objs index 4d25e47..bb8789c 100644 --- a/scsi/Makefile.objs +++ b/scsi/Makefile.objs @@ -1,3 +1,4 @@ block-obj-y +=3D utils.o =20 block-obj-$(CONFIG_LINUX) +=3D pr-manager.o pr-manager-helper.o +block-obj-$(call lnot,$(CONFIG_LINUX)) +=3D pr-manager-stub.o diff --git a/scsi/pr-manager-stub.c b/scsi/pr-manager-stub.c new file mode 100644 index 0000000..632f17c --- /dev/null +++ b/scsi/pr-manager-stub.c @@ -0,0 +1,24 @@ +/* + * Persistent reservation manager - stub for non-Linux platforms + * + * Copyright (c) 2018 Red Hat, Inc. + * + * Author: Paolo Bonzini + * + * 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; +} --=20 1.8.3.1