From nobody Thu Apr 25 21:11:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1595838783; cv=none; d=zohomail.com; s=zohoarc; b=Tf3YgZLxA76Bw21UUowJ1X+IkOkMyEc9/nmbKGspTvfAJQ2q+4se3zd4rU5JmeIt17SULT/IixFbwUCmlU7MeONoX60Zw6U8rcmeF3v86FKpW9Yco0uIgUaLJho0vUOY365edrqPrB/Tf2DbPMSIEgvfLahoxZ4vYF16GGZzm9o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595838783; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SxogL/mccdWtBle+d2X01Glf1oQInZp7FqxFwyoea44=; b=ac2hau/Ja7dD3MBDq6liX6VYvZsYAOpLkjJ9LhanjTLVdTQe89dpmZV/MrD5Ol7o0pmwnWknWo08OZsx7aD5930vZwbJ2uwN3Yd8X+L5D1DBO63qEPMVxT8mIBa8i2fyHIdVe7PmGUqBotRYzhOl9od9gJUqjHA9IQX3X3+VvhI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 159583878342292.55012703489024; Mon, 27 Jul 2020 01:33:03 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-153-Pt898V1BO8WgW2w3HioTWA-1; Mon, 27 Jul 2020 04:31:36 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2E6301932487; Mon, 27 Jul 2020 08:31:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D91C10013C4; Mon, 27 Jul 2020 08:31:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CCA061809554; Mon, 27 Jul 2020 08:31:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06R8VQ2Z013592 for ; Mon, 27 Jul 2020 04:31:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 199CF60F96; Mon, 27 Jul 2020 08:31:26 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.193.218]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BFC9610F3 for ; Mon, 27 Jul 2020 08:31:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595838782; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=SxogL/mccdWtBle+d2X01Glf1oQInZp7FqxFwyoea44=; b=gxVdNNHFsIkCbohc6IbjiB6u/9iHXTNNECPPFT35qQ0ZjpZMFjCPqzbtuVOF6n8O4kC8fq 3Xmx91XhcuBsaeDHAyWXOURUP+Lla93q0OWLn2rfgZc4lVeOtojIOuv5liU34pjrMhlENx hwEUNxcvjGFS/W0cyE0CKcgA+dkFeIM= X-MC-Unique: Pt898V1BO8WgW2w3HioTWA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/4] virdevmapper.c: Join two WITH_DEVMAPPER sections together Date: Mon, 27 Jul 2020 10:31:09 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) There are two distinct WITH_DEVMAPPER sections in the file, for different functions each. Rearrange the code to make some of future commits smaller. Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrang=C3=A9 --- src/util/virdevmapper.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/util/virdevmapper.c b/src/util/virdevmapper.c index 40a82285f9..118dc82e94 100644 --- a/src/util/virdevmapper.c +++ b/src/util/virdevmapper.c @@ -195,19 +195,7 @@ virDevMapperGetTargets(const char *path, return virDevMapperGetTargetsImpl(path, devPaths, ttl); } =20 -#else /* ! WITH_DEVMAPPER */ =20 -int -virDevMapperGetTargets(const char *path G_GNUC_UNUSED, - char ***devPaths G_GNUC_UNUSED) -{ - errno =3D ENOSYS; - return -1; -} -#endif /* ! WITH_DEVMAPPER */ - - -#if WITH_DEVMAPPER bool virIsDevMapperDevice(const char *dev_name) { @@ -223,6 +211,15 @@ virIsDevMapperDevice(const char *dev_name) =20 #else /* ! WITH_DEVMAPPER */ =20 +int +virDevMapperGetTargets(const char *path G_GNUC_UNUSED, + char ***devPaths G_GNUC_UNUSED) +{ + errno =3D ENOSYS; + return -1; +} + + bool virIsDevMapperDevice(const char *dev_name G_GNUC_UNUSED) { --=20 2.26.2