From nobody Tue Feb 10 16:22:18 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=1652470445; cv=none; d=zohomail.com; s=zohoarc; b=XXCmyUqfo/AaoIsNcIppDNBiGcXPIGMgW32KFj2n5zoTXCQ2LaiWWTKUohxARzeHm+mfIWwb8rAylHB9UIqwaVsWP+FbP6sLxy5JVknfh8dhx5xkxnhaB+bkImOZbUAaUMZtAdHkqj2GdwdMYLcMrWSYPe4yYDvcx6+Pe1TyZyY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652470445; h=Content-Type:Content-Transfer-Encoding:Cc: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=0gK9a69YRNYdHJ6aoLC0k6CVvYSzBjNTiidG0tTZvFM=; b=j8sX/WfCgtd4ac/uQkrt6ynPtKb31Oztm6YuieNtB37OPwHJm1NykUTdgVCba5qUHA8gP6zcAomDXSa6czVlB2K+i4Xz2A5ODp7yxLN2QyoQIzUW6+mtawSWy0Yg5Upy2YIHgz+4FzHyBuG5oFGB1bKQBzdQC625Gj6ZF2Ec15w= 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 1652470445257196.72996667943937; Fri, 13 May 2022 12:34:05 -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-179-unK9zRQAPP2qmVRPAY3Xjg-1; Fri, 13 May 2022 15:32:48 -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 CFF1286B8C2; Fri, 13 May 2022 19:32:45 +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 B643B43FD41; Fri, 13 May 2022 19:32:45 +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 E6F1F1932235; Fri, 13 May 2022 19:32:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 34662193223E for ; Fri, 13 May 2022 19:32:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 16C0D40CFD02; Fri, 13 May 2022 19:32:44 +0000 (UTC) Received: from himantopus.redhat.com (unknown [10.22.19.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DFC4A40CFD00; Fri, 13 May 2022 19:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652470444; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=0gK9a69YRNYdHJ6aoLC0k6CVvYSzBjNTiidG0tTZvFM=; b=EAul9jMBrsFnTccDVstflVTL9pZWtxV3JQKwRy3e1qmweqwr3SdeA6d/ZTzfRYOW0F79VB hkCjaMLiguidQgsXcoleivJkCki9VkU0PlwAlTGuG/x02LKORA5Uk+LwnLUKwMOTJaYslU qPafHyQgBtNqEaxpyas/Mg9+j3wW2Wg= X-MC-Unique: unK9zRQAPP2qmVRPAY3Xjg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] util: Remove virCommandPassFDIndex() Date: Fri, 13 May 2022 14:32:42 -0500 Message-Id: <20220513193242.1197894-3-jjongsma@redhat.com> In-Reply-To: <20220513193242.1197894-1-jjongsma@redhat.com> References: <20220513193242.1197894-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 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: , Cc: pkrempa@redhat.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 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: 1652470446600100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The last use of this function was removed in commit 6d161bcc, so the function is no longer used except as an internal implementation for virCommandPassFD(). Signed-off-by: Jonathon Jongsma Reviewed-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/util/vircommand.c | 28 ++-------------------------- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 66f73e84aa..d95c181793 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2057,7 +2057,6 @@ virCommandNewArgs; virCommandNewVAList; virCommandNonblockingFDs; virCommandPassFD; -virCommandPassFDIndex; virCommandRawStatus; virCommandRequireHandshake; virCommandRun; diff --git a/src/util/vircommand.c b/src/util/vircommand.c index f3c26a2673..d78c666f28 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -1021,11 +1021,10 @@ virCommandNewVAList(const char *binary, va_list lis= t) VIR_FORCE_CLOSE(fd) =20 /** - * virCommandPassFDIndex: + * virCommandPassFD: * @cmd: the command to modify * @fd: fd to reassign to the child * @flags: extra flags; binary-OR of virCommandPassFDFlags - * @idx: pointer to fill with the index of the FD in the transfer set * * Transfer the specified file descriptor to the child, instead * of closing it on exec. @fd must not be one of the three @@ -1036,7 +1035,7 @@ virCommandNewVAList(const char *binary, va_list list) * should cease using the @fd when this call completes */ void -virCommandPassFDIndex(virCommand *cmd, int fd, unsigned int flags, size_t = *idx) +virCommandPassFD(virCommand *cmd, int fd, unsigned int flags) { if (!cmd) { VIR_COMMAND_MAYBE_CLOSE_FD(fd, flags); @@ -1052,29 +1051,6 @@ virCommandPassFDIndex(virCommand *cmd, int fd, unsig= ned int flags, size_t *idx) } =20 virCommandFDSet(cmd, fd, flags); - - if (idx) - *idx =3D cmd->npassfd - 1; -} - -/** - * virCommandPassFD: - * @cmd: the command to modify - * @fd: fd to reassign to the child - * @flags: extra flags; binary-OR of virCommandPassFDFlags - * - * Transfer the specified file descriptor to the child, instead - * of closing it on exec. @fd must not be one of the three - * standard streams. - * - * If the flag VIR_COMMAND_PASS_FD_CLOSE_PARENT is set then fd will - * be closed in the parent no later than Run/RunAsync/Free. The parent - * should cease using the @fd when this call completes - */ -void -virCommandPassFD(virCommand *cmd, int fd, unsigned int flags) -{ - virCommandPassFDIndex(cmd, fd, flags, NULL); } =20 /** --=20 2.35.3