From nobody Tue Nov 4 15:31:24 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530217968767382.6558778334363; Thu, 28 Jun 2018 13:32:48 -0700 (PDT) Received: from localhost ([::1]:38424 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYdaq-0004N4-5G for importer@patchew.org; Thu, 28 Jun 2018 16:32:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYdAs-0007VG-91 for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:05:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYdAr-0000pz-Bs for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:05:50 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:43836) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYdAr-0000p7-5B for qemu-devel@nongnu.org; Thu, 28 Jun 2018 16:05:49 -0400 Received: by mail-wr0-x244.google.com with SMTP id c5-v6so6681814wrs.10 for ; Thu, 28 Jun 2018 13:05:49 -0700 (PDT) Received: from 640k.lan ([82.84.124.111]) by smtp.gmail.com with ESMTPSA id 127-v6sm6211110wmd.18.2018.06.28.13.05.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 13:05:47 -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=d9AyztKelDXh+a3/Aij5c/ib/vKyrdWobCySwpfHNRPkJICcbV9M6fmou/9AfqqYCy OIEWcjRBIIAu/P/MCxmla45y8NxiWfqE4TsqAMIyRJb25KcdwEXYdJAGciruxTCTtj0i S22kgJhC+EsxeowYh/iPemCOabEdWSck25CM9R5FGFHmDoUNang3IllYgUZ9P3Vq3Fen GDgF/+HjHVJq3byqo7fyQJih9kPAvVAtMxX7GkO7W8N0CYyepomtK7D4S5LoFUxhxNRz NiW+94P7kHtN2C+yfu2I/2iJ02dxHtoUR7F+vPN01Y7sZdnGsUuEfhE1c0MGYz/Ki1HC W84Q== 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=Qzko7OG9GltWnQ5i5FVJ/qvQaZmeKaTCdm8XX6Vr6mg4WWgwSxISmV0g60X2cF12kI YcXaT1Q6p3qvrjdnN75LlucImWX/iXg5cXUqwX3T6aPWKxVEz0QSwjjjwNK9HPEAgxk+ Kde2ACxSZoVG9bd0/56kmBbXK2EoX6ORd7V9m39MAZ4dCvGiv1Pl3AN6YbHsuq9xbiq+ 54Alp8iFLXZLV848uhl9FRV3nV3bdr9TuLb7V46DLTX7pJvG+MDFqpAUcdYdi4VZQ9Ez j+9XmVCrXM97eNHug9Wkw6GbuiZpmDkkq8YGN1bByV2CdtDUOuow3KmI9tPkmlR5S4h1 0/+w== X-Gm-Message-State: APt69E1bzYV4iHMiH+WmdQEdYOfkpOZ/MKmlNkIHSZC1oxDlDU02Pw3q uOL07jSlQFVmKtModeF5D8h6xJUm X-Google-Smtp-Source: AAOMgpfUoC7M5PamQj1C+bDhlZHP/zz7mpgoaRx+YeOhXA8JdOx/YpEgS31JYQmgWDIctYGstMEimg== X-Received: by 2002:adf:d4c5:: with SMTP id w5-v6mr9561857wrk.185.1530216347892; Thu, 28 Jun 2018 13:05:47 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 28 Jun 2018 22:04:45 +0200 Message-Id: <1530216310-52873-36-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1530216310-52873-1-git-send-email-pbonzini@redhat.com> References: <1530216310-52873-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::244 Subject: [Qemu-devel] [PULL 35/60] 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