From nobody Sun Feb 8 06:05:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1592495464; cv=none; d=zohomail.com; s=zohoarc; b=VEKskepJRXMqFNLLtq2GdK18bQ23XeeyFqkmmyMnArI7F0qrnz/ztXtqCSReo/Nb/C3/T6TIb/ECfhqZbZBkDP6G+ogzr9US/aY6lJFUzOAbFgnKm8+pBi+Gr2t/oIUVsjKxwQ+Dzwx43hLQHc68VE4t+v3QsHMCAG2QSqE2BS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592495464; 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=jH1RCj+JSHUMb1fRQiGaHfuR0ZNj2qnLRLLjoilW7Ug=; b=kJhnpkXkArhNKvyaifSvfRELguGmMigbHQIYNyTZP5LyxKYwHZIUDRTF/18tSq5eF7RdqqMAZcx/716CVeZt0PPj5uvo4qWZHfgrTVX+cTO1cwB8x810+TnyOsDd0hNMu5pAB8n2zEQUK0xLxOsrW2s+QoDJd7InLbJP9DUEdYY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 159249546471162.10065489219858; Thu, 18 Jun 2020 08:51:04 -0700 (PDT) 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-59-tDalmDdxNQKGEgaxLuuZ0A-1; Thu, 18 Jun 2020 11:50:14 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5C056100A8EE; Thu, 18 Jun 2020 15:50:09 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3D40B7166A; Thu, 18 Jun 2020 15:50:09 +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 0E129833C9; Thu, 18 Jun 2020 15:50:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05IFnpkT025323 for ; Thu, 18 Jun 2020 11:49:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 26F135D9E5; Thu, 18 Jun 2020 15:49:51 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (mustard.gsslab.fab.redhat.com [10.33.8.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8914C5D9E8; Thu, 18 Jun 2020 15:49:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592495463; 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=jH1RCj+JSHUMb1fRQiGaHfuR0ZNj2qnLRLLjoilW7Ug=; b=ZeSJkV/mdoCSFEoMqIXQLo4B/syMbAwq9ngl2/1pQydGuOt+U1HG7lc47IbbgIg0ia47BM zScHFQLQFZNs2POdDrBXi80jEKuiCV+JCUzNAuugGQ9CyIJIQXzs2ScKFWDP3QfQhUFul0 G64vX0S/5fUmwAtycT6GO/JrurmA5XQ= X-MC-Unique: tDalmDdxNQKGEgaxLuuZ0A-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] util: remove unused virKModConfig method Date: Thu, 18 Jun 2020 16:42:46 +0100 Message-Id: <20200618154246.2093672-3-berrange@redhat.com> In-Reply-To: <20200618154246.2093672-1-berrange@redhat.com> References: <20200618154246.2093672-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Using virKModConfig would not simplify any existing code. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/libvirt_private.syms | 1 - src/util/virkmod.c | 19 ------------------- src/util/virkmod.h | 1 - tests/virkmodtest.c | 29 ----------------------------- 4 files changed, 50 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 7509916dfd..691b5bc5bc 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2402,7 +2402,6 @@ virKeycodeValueTranslate; =20 =20 # util/virkmod.h -virKModConfig; virKModIsBlacklisted; virKModLoad; virKModUnload; diff --git a/src/util/virkmod.c b/src/util/virkmod.c index 59cec69816..4400245906 100644 --- a/src/util/virkmod.c +++ b/src/util/virkmod.c @@ -59,25 +59,6 @@ doRmmod(const char *module, char **errbuf) return 0; } =20 -/** - * virKModConfig: - * - * Get the current kernel module configuration - * - * Returns NULL on failure or a pointer to the output which - * must be VIR_FREE()'d by the caller - */ -char * -virKModConfig(void) -{ - char *outbuf =3D NULL; - - if (doModprobe("-c", NULL, &outbuf, NULL) < 0) - return NULL; - - return outbuf; -} - =20 /** * virKModLoad: diff --git a/src/util/virkmod.h b/src/util/virkmod.h index 605da74416..3bb161df52 100644 --- a/src/util/virkmod.h +++ b/src/util/virkmod.h @@ -23,7 +23,6 @@ =20 #include "internal.h" =20 -char *virKModConfig(void); char *virKModLoad(const char *) ATTRIBUTE_NONNULL(1); char *virKModUnload(const char *) diff --git a/tests/virkmodtest.c b/tests/virkmodtest.c index 2906ad992e..3ba8c542d1 100644 --- a/tests/virkmodtest.c +++ b/tests/virkmodtest.c @@ -31,33 +31,6 @@ =20 # define VIR_FROM_THIS VIR_FROM_NONE =20 -static int -testKModConfig(const void *args G_GNUC_UNUSED) -{ - int ret =3D -1; - char *outbuf =3D NULL; - - /* This will return the contents of a 'modprobe -c' which can differ - * from machine to machine - be happy that we get something. - */ - outbuf =3D virKModConfig(); - if (!outbuf) { - if (virFileIsExecutable(MODPROBE)) { - fprintf(stderr, "Failed to get config\n"); - } else { - /* modprobe doesn't exist, do not claim error. */ - ret =3D 0; - } - goto cleanup; - } - ret =3D 0; - - cleanup: - VIR_FREE(outbuf); - return ret; -} - - static int checkOutput(virBufferPtr buf, const char *exp_cmd) { @@ -141,8 +114,6 @@ mymain(void) { int ret =3D 0; =20 - if (virTestRun("config", testKModConfig, NULL) < 0) - ret =3D -1; if (virTestRun("load", testKModLoad, NULL) < 0) ret =3D -1; if (virTestRun("unload", testKModUnload, NULL) < 0) --=20 2.24.1