From nobody Mon Feb 9 10:30:36 2026 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=1652196230; cv=none; d=zohomail.com; s=zohoarc; b=CnRUo187zCvkEnK+Gbs6/uCOi3nbCIyYmbxCP7GfiYQGXhaev1cMldTVdhnju4CgCrbEPb7QppTPqxDaDKBTSRa9Ry/suF1AHo4NSsSeiU0lyALyuiF5Z7d7qZQ15PEiQFq8w6Yt3ziKjrVwKgVdvMQ1qLOBDUduXDMVJC4kgbw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652196230; 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=un7DlggJdqsbOy/PNxt0BdDF06LB7p9ByMRR6czXQDw=; b=l0H0e7+Eabq2CrIGyUDOQ1CHJa/PgQEfUAujjI4Flr1dVm5jfRSGhEocEnfjMyToJvSoXZgHzBg9Gt41Zf2uMmvHJmPpo/oSZ01XWJGfz12SUnKzgdi/HzZtDZ7+3jpxMpQWOg/1umBYzKooTIDcTBkn0vA7zCLrL1MXJPkb9tk= 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 165219623086892.00146108807485; Tue, 10 May 2022 08:23:50 -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-443-RRsh-LWTNw-6rZSAAcN2bg-1; Tue, 10 May 2022 11:23:46 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E9D72A18EE9; Tue, 10 May 2022 15:23:42 +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 D5F684087D63; Tue, 10 May 2022 15:23:42 +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 891AF194704D; Tue, 10 May 2022 15:23:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 788F61947072 for ; Tue, 10 May 2022 15:23:34 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 56C8C2024CBD; Tue, 10 May 2022 15:23:34 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id D03BF200C0DA for ; Tue, 10 May 2022 15:23:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652196229; 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=un7DlggJdqsbOy/PNxt0BdDF06LB7p9ByMRR6czXQDw=; b=Cxmjrd3MmRLwtHUiIIDMDLXB9YHJB5RqQbdQDXnSdewU6P9vmBcs/+p2o4TpZoz3iX4TIG eEmI3scxeH7BfxWoplynYY3M8JTxsVifAn5CdlaFxZ6vO61rHaY5UwVYvbYszM8MAXfV7C IH2k8mPX4Zp/4XF3As2FCxtBY/yx2l8= X-MC-Unique: RRsh-LWTNw-6rZSAAcN2bg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 30/37] qemuMonitorAddNetdev: Remove unused 'tapfd' infrastructure Date: Tue, 10 May 2022 17:20:06 +0200 Message-Id: <740de48601da548a538a4b44642a78f4922ceebf.1652195735.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1652196232973100001 Content-Type: text/plain; charset="utf-8" All callers pass NULL/0. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 3 +-- src/qemu/qemu_monitor.c | 15 ++------------- src/qemu/qemu_monitor.h | 1 - 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 9f71977a4d..e126632507 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1414,7 +1414,6 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, } if (qemuMonitorAddNetdev(priv->mon, &netprops, - NULL, NULL, 0, slirpfd, slirpfdName) < 0) { qemuDomainObjExitMonitor(vm); virDomainAuditNet(vm, NULL, net, "attach", false); @@ -2185,7 +2184,7 @@ qemuDomainAttachChrDevice(virQEMUDriver *driver, if (netdevprops) { if (qemuMonitorAddNetdev(priv->mon, &netdevprops, - NULL, NULL, 0, -1, NULL) < 0) + -1, NULL) < 0) goto exit_monitor; } diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 57a9e9af62..a71311d0c4 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2630,24 +2630,17 @@ qemuMonitorCloseFileHandle(qemuMonitor *mon, int qemuMonitorAddNetdev(qemuMonitor *mon, virJSONValue **props, - int *tapfd, char **tapfdName, int tapfdSize, int slirpfd, char *slirpfdName) { int ret =3D -1; - size_t i =3D 0; - VIR_DEBUG("props=3D%p tapfd=3D%p tapfdName=3D%p tapfdSize=3D%d" + VIR_DEBUG("props=3D%p " "slirpfd=3D%d slirpfdName=3D%s", - props, tapfd, tapfdName, tapfdSize, + props, slirpfd, slirpfdName); QEMU_CHECK_MONITOR(mon); - for (i =3D 0; i < tapfdSize; i++) { - if (qemuMonitorSendFileHandle(mon, tapfdName[i], tapfd[i]) < 0) - goto cleanup; - } - if (slirpfd > 0 && qemuMonitorSendFileHandle(mon, slirpfdName, slirpfd) < 0) goto cleanup; @@ -2656,10 +2649,6 @@ qemuMonitorAddNetdev(qemuMonitor *mon, cleanup: if (ret < 0) { - while (i--) { - if (qemuMonitorCloseFileHandle(mon, tapfdName[i]) < 0) - VIR_WARN("failed to close device handle '%s'", tapfdName[i= ]); - } if (qemuMonitorCloseFileHandle(mon, slirpfdName) < 0) VIR_WARN("failed to close device handle '%s'", slirpfdName); } diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 1008b33671..a49ef180c1 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -983,7 +983,6 @@ int qemuMonitorCloseFileHandle(qemuMonitor *mon, int qemuMonitorAddNetdev(qemuMonitor *mon, virJSONValue **props, - int *tapfd, char **tapfdName, int tapfdSize, int slirpfd, char *slirpfdName); int qemuMonitorRemoveNetdev(qemuMonitor *mon, --=20 2.35.1