From nobody Sun Feb 8 20:59:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1652196426; cv=none; d=zohomail.com; s=zohoarc; b=mXBPxS9pzysq2reE3rSO9aLVnbSEf0hFmtCvxcjmwMduXU4WOJ7YuGi0hV8vI8iIGkouX5FDBOipA5T/G5PBzFhrh4/U7dTEh2QHB0hJwhxXYDhvNVvrmTH+wm9fSVyg+5vEt12s1JggErnqCjXsCP5X2pxzUJK3ns2T24cLaQ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652196426; 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=H6BdxIgiLsuyeuI15Bp7ZIynu9wY3sv7yXRsDrENLXU=; b=N8uAe2+EanyHZVyqAYho4MeFuwdwdS+VYQ9YREcaveVpz8AzyvCIWGOQA7tadROdYQsKtnh7/Xp2RL7nwteBpuM9XoYBFtxYSSBUlo0lR0fwl5k3k5JDq2Yytnjyf0xMCUMJFa/Il4YAK4pkZcr8XyzA/BW1UpCTp1FZq6g4z7A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1652196426297135.70091563241908; Tue, 10 May 2022 08:27:06 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-248-cuWRmDcuNnawV7GzfzG98A-1; Tue, 10 May 2022 11:23:50 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 93EBB1D96CA5; Tue, 10 May 2022 15:23:47 +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 7D51B1460E5C; Tue, 10 May 2022 15:23:47 +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 3B39D194705D; Tue, 10 May 2022 15:23:47 +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 CA0A0194705F for ; Tue, 10 May 2022 15:23:39 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B04302024CC8; Tue, 10 May 2022 15:23:39 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2E4422024CBD for ; Tue, 10 May 2022 15:23:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652196424; 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=H6BdxIgiLsuyeuI15Bp7ZIynu9wY3sv7yXRsDrENLXU=; b=iWYkI76ws5Zi/QcpktgpeT5Zrsw3OLZ9XqhhkuUCB/SWdxI+1BSBybGv70IG1B+uHYSD+S ifse+p4ZTGfMgmTrSLgndkXi7LAiXwT4yKOYqZO+vMfilVXToNX8uZSbczdW0XTNSxVaU/ SFSGlsag8r6bd/qNOADetrtAkDTDHVc= X-MC-Unique: cuWRmDcuNnawV7GzfzG98A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 36/37] qemuMonitorAddNetdev: Remove unneeded 'slirp' variables and useless debug Date: Tue, 10 May 2022 17:20:12 +0200 Message-Id: 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.85 on 10.11.54.7 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: 1652196427375100001 Content-Type: text/plain; charset="utf-8" None of the callers now uses the slirp fd passing feature, so it can be removed. At this point even the VIR_DEBUG doesn't make sense as it would only log the pointer of 'props'. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 6 ++---- src/qemu/qemu_monitor.c | 23 ++--------------------- src/qemu/qemu_monitor.h | 3 +-- 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 0f3b1f4bc4..cae7b0dd3b 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1401,8 +1401,7 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver, charDevPlugged =3D true; } - if (qemuMonitorAddNetdev(priv->mon, &netprops, - -1, NULL) < 0) { + if (qemuMonitorAddNetdev(priv->mon, &netprops) < 0) { qemuDomainObjExitMonitor(vm); virDomainAuditNet(vm, NULL, net, "attach", false); goto try_remove; @@ -2170,8 +2169,7 @@ qemuDomainAttachChrDevice(virQEMUDriver *driver, chardevAttached =3D true; if (netdevprops) { - if (qemuMonitorAddNetdev(priv->mon, &netdevprops, - -1, NULL) < 0) + if (qemuMonitorAddNetdev(priv->mon, &netdevprops) < 0) goto exit_monitor; } diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index a71311d0c4..d44c7f0c60 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2629,31 +2629,12 @@ qemuMonitorCloseFileHandle(qemuMonitor *mon, int qemuMonitorAddNetdev(qemuMonitor *mon, - virJSONValue **props, - int slirpfd, char *slirpfdName) + virJSONValue **props) { - int ret =3D -1; - - VIR_DEBUG("props=3D%p " - "slirpfd=3D%d slirpfdName=3D%s", - props, - slirpfd, slirpfdName); QEMU_CHECK_MONITOR(mon); - if (slirpfd > 0 && - qemuMonitorSendFileHandle(mon, slirpfdName, slirpfd) < 0) - goto cleanup; - - ret =3D qemuMonitorJSONAddNetdev(mon, props); - - cleanup: - if (ret < 0) { - if (qemuMonitorCloseFileHandle(mon, slirpfdName) < 0) - VIR_WARN("failed to close device handle '%s'", slirpfdName); - } - - return ret; + return qemuMonitorJSONAddNetdev(mon, props); } diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index a49ef180c1..b1484fdff8 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -982,8 +982,7 @@ int qemuMonitorCloseFileHandle(qemuMonitor *mon, const char *fdname); int qemuMonitorAddNetdev(qemuMonitor *mon, - virJSONValue **props, - int slirpfd, char *slirpfdName); + virJSONValue **props); int qemuMonitorRemoveNetdev(qemuMonitor *mon, const char *alias); --=20 2.35.1