From nobody Sun Feb 8 11:07:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1614701564; cv=none; d=zohomail.com; s=zohoarc; b=JqQnf+c2tTGP+3pjIlsCa3TOmrVv8Zu0FxokrTbM/CXvWPLbbqI6TpVgNniIvJ9EGTOs7f9MqFR0lFO04/SfYYJmFHrS+2aXm4papkWjRfbbCx/mSp/XDqf8Dkl3L4nVrQeA0dZw/9LnecSbYNQDqPL+bpj+uy0HQMxG3h2l2V4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614701564; 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=rQiyqTFU8H8Qx8G5fr7JZ5jK1JDfnY46pdJs4o1cBNw=; b=J7gPRyuhakoFtUFQcGuDovZGfQwy1/5rL1oY3TzTYAUk5b+1XTPrsyNh8iB/aIDSjAEsXdA26+z63lYiObXShJKlr6iEPH5HdrK4O5R8t13XJBe105OLfiWptQGbUUfcnlkmXp4Y26QduWAb4wmYE+FfWFsf0bu8R2ttJAqp5vk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1614701564226560.1709564318832; Tue, 2 Mar 2021 08:12:44 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-315-bhspl4s6MBWMoZoHemPO6g-1; Tue, 02 Mar 2021 11:12:40 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B67A1801985; Tue, 2 Mar 2021 16:12:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 915DE60BFA; Tue, 2 Mar 2021 16:12:33 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4A8ED18095CE; Tue, 2 Mar 2021 16:12:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 122GCJUk024002 for ; Tue, 2 Mar 2021 11:12:19 -0500 Received: by smtp.corp.redhat.com (Postfix) id D0CFD60C43; Tue, 2 Mar 2021 16:12:19 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BB0260C05 for ; Tue, 2 Mar 2021 16:12:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614701563; 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=rQiyqTFU8H8Qx8G5fr7JZ5jK1JDfnY46pdJs4o1cBNw=; b=WhrNxzpeGKStc7W7DVU6hT8/YH69qUp6/nv39vEAQHpwN0NLhNe3J7ncTXQN1VHDlq6cwr ZA6bBsRTRdvesq0YdB2wASazSgBE0oWGtYriUb8Cxs2uVXk6iGP4MP9YTAQKQl3a7gOuCi Zuz1hezVw9ZjbB0ueX+6aS0rihQQyXE= X-MC-Unique: bhspl4s6MBWMoZoHemPO6g-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/6] virCommandAddEnvBuffer: Remove unused function Date: Tue, 2 Mar 2021 17:12:04 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/libvirt_private.syms | 1 - src/util/vircommand.c | 26 -------------------------- src/util/vircommand.h | 3 --- 3 files changed, 30 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 2a3bbdc577..90c02a250c 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1965,7 +1965,6 @@ virCommandAddArgFormat; virCommandAddArgList; virCommandAddArgPair; virCommandAddArgSet; -virCommandAddEnvBuffer; virCommandAddEnvFormat; virCommandAddEnvPair; virCommandAddEnvPass; diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 1a4b77ea24..28a903e117 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -1409,32 +1409,6 @@ virCommandAddEnvString(virCommandPtr cmd, const char= *str) } -/** - * virCommandAddEnvBuffer: - * @cmd: the command to modify - * @buf: buffer that contains name=3Dvalue string, which will be reset on = return - * - * Convert a buffer containing preformatted name=3Dvalue into an - * environment variable of the child. - * Correctly transfers memory errors or contents from buf to cmd. - */ -void -virCommandAddEnvBuffer(virCommandPtr cmd, virBufferPtr buf) -{ - if (!cmd || cmd->has_error) { - virBufferFreeAndReset(buf); - return; - } - - if (!virBufferUse(buf)) { - cmd->has_error =3D EINVAL; - return; - } - - virCommandAddEnv(cmd, virBufferContentAndReset(buf)); -} - - /** * virCommandAddEnvPass: * @cmd: the command to modify diff --git a/src/util/vircommand.h b/src/util/vircommand.h index 0ea6c8229f..9fb625ec4b 100644 --- a/src/util/vircommand.h +++ b/src/util/vircommand.h @@ -109,9 +109,6 @@ void virCommandAddEnvPair(virCommandPtr cmd, void virCommandAddEnvString(virCommandPtr cmd, const char *str) ATTRIBUTE_NONNULL(2); -void virCommandAddEnvBuffer(virCommandPtr cmd, - virBufferPtr buf); - void virCommandAddEnvPass(virCommandPtr cmd, const char *name) ATTRIBUTE_NONNULL(2); --=20 2.29.2