From nobody Sat Nov 23 05:42:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1682065623; cv=none; d=zohomail.com; s=zohoarc; b=n+IO2y4LBSizHYmfuzPRL4mGhSC1WXnRrBvoLp+KSaLVjPdwtKs2ViPSW5wwxQPlFbYKxAkE/R7BTMi6roZFO8X3ARxYdCjaYqLglJT4FGZ0ANMkgfk74RPLsKiEdwJKe5hSfxRjJDC0WFrsmQtQaRySzh0NK/KWMPfglMx9sw4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682065623; 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=TJ0uldsIBdCGnmgxmqTndC1YjjcziZ2S4+NSp3EnXlo=; b=UgOdkVgAigV2Vrbms1Nxf5E9ac2+c+sRIBoyvbH9Ym4n3HcSOK4RwadLSkEl4Pt1SuPrQYM3YJdTIP1XH0zBsAxIEklhh0HCzRtWglSFbEu2kUfkq5SE3q4gkoMc5Kd1QZvQGqhvAs8jnPirRtM076O+MeEHEdAyhsmlnhbfsA8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1682065623017745.2285411735505; Fri, 21 Apr 2023 01:27:03 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-624-PpYdw1vyMtCwM5Y6clQ0Ag-1; Fri, 21 Apr 2023 04:25:22 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E47DA101470E; Fri, 21 Apr 2023 08:25:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D16DD492C13; Fri, 21 Apr 2023 08:25:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7BA6E1946A68; Fri, 21 Apr 2023 08:25:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8F2A619466DF for ; Fri, 21 Apr 2023 08:25:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 75ACE63A51; Fri, 21 Apr 2023 08:25:16 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1A6D518EC7 for ; Fri, 21 Apr 2023 08:25:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682065622; 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=TJ0uldsIBdCGnmgxmqTndC1YjjcziZ2S4+NSp3EnXlo=; b=Fsxc1aQDuPRf5IDpEGqJY+WZ/d0ZTDnnw9Pezkpw6+ZkgHbjRuXBykMe6rLkK+nKhWMDCb gNuRv3Wf+Nhj/7JPveZ7OWkRMS5Du0iztEukPpRh+jp0Ih/gDs6QA7+w9AswiL/SxK/LVL LDnKLgBhPuWixRerpEnZJOIMcOCMYIc= X-MC-Unique: PpYdw1vyMtCwM5Y6clQ0Ag-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 07/11] qemu_hotplug.h: Expose less functions Date: Fri, 21 Apr 2023 10:25:06 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1682065623413100001 Content-Type: text/plain; charset="utf-8"; x-default="true" After previous cleanups a lot of functions from qemu_hotplug.c are called only within the file. Make them static and drop their declaration from the header file. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 56 +++++++++++++++++++++---------------- src/qemu/qemu_hotplug.h | 61 ----------------------------------------- 2 files changed, 32 insertions(+), 85 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index f72bb7722d..13b1872ea3 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -75,6 +75,11 @@ VIR_LOG_INIT("qemu.qemu_hotplug"); static void qemuDomainResetDeviceRemoval(virDomainObj *vm); =20 +static int +qemuDomainAttachHostDevice(virQEMUDriver *driver, + virDomainObj *vm, + virDomainHostdevDef *hostdev); + /** * qemuDomainDeleteDevice: * @vm: domain object @@ -546,7 +551,7 @@ qemuDomainChangeMediaBlockdev(virDomainObj *vm, * * Returns 0 on success, -1 on error and reports libvirt error */ -int +static int qemuDomainChangeEjectableMedia(virQEMUDriver *driver, virDomainObj *vm, virDomainDiskDef *disk, @@ -754,8 +759,9 @@ qemuDomainAttachDiskGeneric(virDomainObj *vm, } =20 =20 -int qemuDomainAttachControllerDevice(virDomainObj *vm, - virDomainControllerDef *controller) +static int +qemuDomainAttachControllerDevice(virDomainObj *vm, + virDomainControllerDef *controller) { int ret =3D -1; const char* type =3D virDomainControllerTypeToString(controller->type); @@ -1033,7 +1039,7 @@ qemuDomainAttachDeviceDiskLiveInternal(virQEMUDriver = *driver, * This function handles all the necessary steps to attach a new storage s= ource * to the VM. */ -int +static int qemuDomainAttachDeviceDiskLive(virQEMUDriver *driver, virDomainObj *vm, virDomainDeviceDef *dev) @@ -1077,7 +1083,7 @@ qemuDomainNetDeviceVportRemove(virDomainNetDef *net) } =20 =20 -int +static int qemuDomainAttachNetDevice(virQEMUDriver *driver, virDomainObj *vm, virDomainNetDef *net) @@ -1768,9 +1774,10 @@ qemuDomainDelChardevTLSObjects(virQEMUDriver *driver, } =20 =20 -int qemuDomainAttachRedirdevDevice(virQEMUDriver *driver, - virDomainObj *vm, - virDomainRedirdevDef *redirdev) +static int +qemuDomainAttachRedirdevDevice(virQEMUDriver *driver, + virDomainObj *vm, + virDomainRedirdevDef *redirdev) { int ret =3D -1; qemuDomainObjPrivate *priv =3D vm->privateData; @@ -1995,7 +2002,7 @@ qemuDomainAttachChrDeviceAssignAddr(virDomainObj *vm, } =20 =20 -int +static int qemuDomainAttachChrDevice(virQEMUDriver *driver, virDomainObj *vm, virDomainDeviceDef *dev) @@ -2125,7 +2132,7 @@ qemuDomainAttachChrDevice(virQEMUDriver *driver, } =20 =20 -int +static int qemuDomainAttachRNGDevice(virQEMUDriver *driver, virDomainObj *vm, virDomainRNGDef *rng) @@ -2240,7 +2247,7 @@ qemuDomainAttachRNGDevice(virQEMUDriver *driver, * * Returns 0 on success -1 on error. */ -int +static int qemuDomainAttachMemory(virQEMUDriver *driver, virDomainObj *vm, virDomainMemoryDef *mem) @@ -2757,7 +2764,7 @@ qemuDomainAttachMediatedDevice(virQEMUDriver *driver, } =20 =20 -int +static int qemuDomainAttachHostDevice(virQEMUDriver *driver, virDomainObj *vm, virDomainHostdevDef *hostdev) @@ -2808,7 +2815,7 @@ qemuDomainAttachHostDevice(virQEMUDriver *driver, } =20 =20 -int +static int qemuDomainAttachShmemDevice(virDomainObj *vm, virDomainShmemDef *shmem) { @@ -2914,7 +2921,7 @@ qemuDomainAttachShmemDevice(virDomainObj *vm, } =20 =20 -int +static int qemuDomainAttachWatchdog(virDomainObj *vm, virDomainWatchdogDef *watchdog) { @@ -3017,7 +3024,7 @@ qemuDomainAttachWatchdog(virDomainObj *vm, } =20 =20 -int +static int qemuDomainAttachInputDevice(virDomainObj *vm, virDomainInputDef *input) { @@ -3118,7 +3125,7 @@ qemuDomainAttachInputDevice(virDomainObj *vm, } =20 =20 -int +static int qemuDomainAttachVsockDevice(virDomainObj *vm, virDomainVsockDef *vsock) { @@ -3195,7 +3202,7 @@ qemuDomainAttachVsockDevice(virDomainObj *vm, } =20 =20 -int +static int qemuDomainAttachFSDevice(virQEMUDriver *driver, virDomainObj *vm, virDomainFSDef *fs) @@ -3288,7 +3295,7 @@ qemuDomainAttachFSDevice(virQEMUDriver *driver, } =20 =20 -int +static int qemuDomainAttachLease(virQEMUDriver *driver, virDomainObj *vm, virDomainLeaseDef *lease) @@ -3596,9 +3603,10 @@ qemuDomainChangeNetFilter(virDomainObj *vm, return 0; } =20 -int qemuDomainChangeNetLinkState(virDomainObj *vm, - virDomainNetDef *dev, - int linkstate) +static int +qemuDomainChangeNetLinkState(virDomainObj *vm, + virDomainNetDef *dev, + int linkstate) { int ret =3D -1; qemuDomainObjPrivate *priv =3D vm->privateData; @@ -3626,7 +3634,7 @@ int qemuDomainChangeNetLinkState(virDomainObj *vm, return ret; } =20 -int +static int qemuDomainChangeNet(virQEMUDriver *driver, virDomainObj *vm, virDomainDeviceDef *dev) @@ -4232,7 +4240,7 @@ qemuDomainChangeGraphicsPasswords(virDomainObj *vm, } =20 =20 -int +static int qemuDomainChangeGraphics(virQEMUDriver *driver, virDomainObj *vm, virDomainGraphicsDef *dev) @@ -6896,7 +6904,7 @@ qemuDomainSetVcpuInternal(virQEMUDriver *driver, } =20 =20 -int +static int qemuDomainChangeMemoryRequestedSize(virDomainObj *vm, const char *alias, unsigned long long requestedsize) diff --git a/src/qemu/qemu_hotplug.h b/src/qemu/qemu_hotplug.h index d9a5ac1164..4fe7f4923e 100644 --- a/src/qemu/qemu_hotplug.h +++ b/src/qemu/qemu_hotplug.h @@ -24,12 +24,6 @@ #include "qemu_conf.h" #include "qemu_domain.h" =20 -int qemuDomainChangeEjectableMedia(virQEMUDriver *driver, - virDomainObj *vm, - virDomainDiskDef *disk, - virStorageSource *newsrc, - bool force); - void qemuDomainDelTLSObjects(virDomainObj *vm, virDomainAsyncJob asyncJob, const char *secAlias, @@ -48,68 +42,17 @@ int qemuDomainGetTLSObjects(qemuDomainSecretInfo *secin= fo, virJSONValue **tlsProps, virJSONValue **secProps); =20 -int qemuDomainAttachControllerDevice(virDomainObj *vm, - virDomainControllerDef *controller); -int qemuDomainAttachDeviceDiskLive(virQEMUDriver *driver, - virDomainObj *vm, - virDomainDeviceDef *dev); - int qemuDomainAttachDiskGeneric(virDomainObj *vm, virDomainDiskDef *disk, virDomainAsyncJob asyncJob); =20 -int qemuDomainAttachNetDevice(virQEMUDriver *driver, - virDomainObj *vm, - virDomainNetDef *net); -int qemuDomainAttachRedirdevDevice(virQEMUDriver *driver, - virDomainObj *vm, - virDomainRedirdevDef *hostdev); -int qemuDomainAttachHostDevice(virQEMUDriver *driver, - virDomainObj *vm, - virDomainHostdevDef *hostdev); -int qemuDomainAttachShmemDevice(virDomainObj *vm, - virDomainShmemDef *shmem); -int qemuDomainAttachWatchdog(virDomainObj *vm, - virDomainWatchdogDef *watchdog); int qemuDomainFindGraphicsIndex(virDomainDef *def, virDomainGraphicsDef *dev); -int qemuDomainAttachMemory(virQEMUDriver *driver, - virDomainObj *vm, - virDomainMemoryDef *mem); -int qemuDomainChangeGraphics(virQEMUDriver *driver, - virDomainObj *vm, - virDomainGraphicsDef *dev); int qemuDomainChangeGraphicsPasswords(virDomainObj *vm, int type, virDomainGraphicsAuthDef *auth, const char *defaultPasswd, int asyncJob); -int qemuDomainChangeNet(virQEMUDriver *driver, - virDomainObj *vm, - virDomainDeviceDef *dev); -int qemuDomainChangeNetLinkState(virDomainObj *vm, - virDomainNetDef *dev, - int linkstate); - -int qemuDomainAttachInputDevice(virDomainObj *vm, - virDomainInputDef *input); - -int qemuDomainAttachVsockDevice(virDomainObj *vm, - virDomainVsockDef *vsock); -int -qemuDomainAttachFSDevice(virQEMUDriver *driver, - virDomainObj *vm, - virDomainFSDef *fs); - -int qemuDomainAttachLease(virQEMUDriver *driver, - virDomainObj *vm, - virDomainLeaseDef *lease); -int qemuDomainAttachChrDevice(virQEMUDriver *driver, - virDomainObj *vm, - virDomainDeviceDef *dev); -int qemuDomainAttachRNGDevice(virQEMUDriver *driver, - virDomainObj *vm, - virDomainRNGDef *rng); =20 int qemuDomainAttachDeviceLive(virDomainObj *vm, virDomainDeviceDef *dev, @@ -165,7 +108,3 @@ int qemuHotplugAttachDBusVMState(virQEMUDriver *driver, =20 int qemuHotplugRemoveDBusVMState(virDomainObj *vm, virDomainAsyncJob asyncJob); - -int qemuDomainChangeMemoryRequestedSize(virDomainObj *vm, - const char *alias, - unsigned long long requestedsize); --=20 2.39.2