From nobody Tue Feb 10 16:22:25 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=1652470370; cv=none; d=zohomail.com; s=zohoarc; b=TJtcndzOVeCKECjqyRi4VG2TfFMfq8qxyUCeBVtgctePHXje9CpnKOSrrUotksMXJbhW8ChAOhXiidHB/xIwIIWJ6DW1gUXNEiwK15V+eelnw1YuNv+0f93LmpBDQ09iLQODZ/9BLUKrU7H4CYneZhsHM+wrlGkNIBaJWKf8VfQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652470370; 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=WUVqlpwCaVr4pDGScNdED9DC3I+ZIxnSA4Kzld3v/MM=; b=OKC1AfAO6xlbxj8AtbzDqa8Bp2r+FVyw9YY+XdpibOuaKZ8sh0/fzDiYzhgi20WeozQ/C3fQ8y1JQt1LsB+OknXBmLb1NCY5EUI/rJxC5OlGrcrxdbg+xIQeHnbFqrzijmHd2e3k4q9NZjYaUKtumMbp5AAt+j+jxRaLZrFavXU= 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 1652470370902912.1638442646288; Fri, 13 May 2022 12:32: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-164-SD4JnPMJPzWBNRjLLhfsGw-1; Fri, 13 May 2022 15:32:47 -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 53A0F80B71A; 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 3E66314E043A; 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 4CF63193223E; 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 D7B1E194975B for ; Fri, 13 May 2022 19:32:43 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CB53740CFD02; Fri, 13 May 2022 19:32:43 +0000 (UTC) Received: from himantopus.redhat.com (unknown [10.22.19.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A0E3940CFD00; 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=1652470369; 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=WUVqlpwCaVr4pDGScNdED9DC3I+ZIxnSA4Kzld3v/MM=; b=GRbQz53KufROlqXxS3IrcNZDJIHThrFnliiycpr1jGeuKoqhLMxZ2g9JiXU7SYVVOyRK1Z 95eTNsyKK1WzK6el/KR9G5KvRr9R35xiRmSPsoDIde7O/3SxulhCynn2TAmbgGezC4oWeC RHGILt4IXWPRHE/Kir3yQRU8cGWX8MU= X-MC-Unique: SD4JnPMJPzWBNRjLLhfsGw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] util: remove virCommandPassFDGetFDIndex() Date: Fri, 13 May 2022 14:32:41 -0500 Message-Id: <20220513193242.1197894-2-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.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: 1652470372077100001 Content-Type: text/plain; charset="utf-8"; x-default="true" commit f9236200 removed the last use of this function, so it can be dropped. Signed-off-by: Jonathon Jongsma Reviewed-by: Peter Krempa --- src/libvirt_private.syms | 1 - src/util/vircommand.c | 27 --------------------------- src/util/vircommand.h | 3 --- 3 files changed, 31 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 9309259751..66f73e84aa 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2057,7 +2057,6 @@ virCommandNewArgs; virCommandNewVAList; virCommandNonblockingFDs; virCommandPassFD; -virCommandPassFDGetFDIndex; virCommandPassFDIndex; virCommandRawStatus; virCommandRequireHandshake; diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 41cf552d7b..f3c26a2673 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -1077,33 +1077,6 @@ virCommandPassFD(virCommand *cmd, int fd, unsigned i= nt flags) virCommandPassFDIndex(cmd, fd, flags, NULL); } =20 -/* - * virCommandPassFDGetFDIndex: - * @cmd: pointer to virCommand - * @fd: FD to get index of - * - * Determine the index of the FD in the transfer set. - * - * Returns index >=3D 0 if @set contains @fd, - * -1 otherwise. - */ -int -virCommandPassFDGetFDIndex(virCommand *cmd, int fd) -{ - size_t i =3D 0; - - if (virCommandHasError(cmd)) - return -1; - - while (i < cmd->npassfd) { - if (cmd->passfd[i].fd =3D=3D fd) - return i; - i++; - } - - return -1; -} - /** * virCommandSetPidFile: * @cmd: the command to modify diff --git a/src/util/vircommand.h b/src/util/vircommand.h index 600806a987..c534a9bb16 100644 --- a/src/util/vircommand.h +++ b/src/util/vircommand.h @@ -61,9 +61,6 @@ void virCommandPassFDIndex(virCommand *cmd, unsigned int flags, size_t *idx) G_GNUC_NO_INLINE; =20 -int virCommandPassFDGetFDIndex(virCommand *cmd, - int fd); - void virCommandSetPidFile(virCommand *cmd, const char *pidfile) ATTRIBUTE_NONNULL(2); =20 --=20 2.35.3