From nobody Mon Apr 29 16:30:22 2024 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=1601566651; cv=none; d=zohomail.com; s=zohoarc; b=UaAGe6B0zQsMVl8s6aqVQ8PLh9fHIguSFjUnHJLTvinTGpjWsE6G4fsv6wdld1a8k1wOj83bRfmCygmQzsqvuafQz/1evOORe/noihH5KFqzu/keEL2UwvqT66O4HSppZ1qTcn3rB9BTI5ie53BkiqZTnQmNzEaFMpzjz1owt+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601566651; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=JpNjslsJyI/XqsyggLaCyIJGVNp9dxoqgB2GS7GwWXA=; b=N3w6PRhUcT02c9A93RNQYzDddrtvUZvOFrv5WC/O8GNw4c2LLqwxq0LoBOpdGmsD/WRALD5yWYq8RY4dTkPFB4ymGGD4AgHiUHPVhvGWgzfRtcwWZ/6GysHH1yu8PRXlVTkv/D3OEPAAYOcYWBS4qEf2DcoImEB5ErnxrG53QAU= 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 160156665163590.93749317679112; Thu, 1 Oct 2020 08:37:31 -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-95-SxDnAjyONdCamp7LpWlcmA-1; Thu, 01 Oct 2020 11:37:27 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1333F801AC2; Thu, 1 Oct 2020 15:37:21 +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 8E73B7367B; Thu, 1 Oct 2020 15:37:19 +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 54EC91826D2E; Thu, 1 Oct 2020 15:37:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 091FRVut010338 for ; Thu, 1 Oct 2020 11:27:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 937C973685; Thu, 1 Oct 2020 15:27:31 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id E003873678 for ; Thu, 1 Oct 2020 15:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601566650; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=JpNjslsJyI/XqsyggLaCyIJGVNp9dxoqgB2GS7GwWXA=; b=h50snlKCfg+AAk/n0HjjhB2Qr/580sxcUkFm5ebSQUiO1463ZccZDLgG4OWEcdssZw7tI/ 33iTv/8aBj/HPr75n5lhozWwpmY64ZZZ2Zn0kH95fb9E86qpxlGP8G0J7eEYPoBDkJMUjk 7nM0M314CLOE7cSk0WVA4xMuCpREq7E= X-MC-Unique: SxDnAjyONdCamp7LpWlcmA-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH] Revert "Also look for dmi information in /sys/class" Date: Thu, 1 Oct 2020 17:27:22 +0200 Message-Id: <352f7fdeb0a6c290cea3d88a0cca168d42071644.1601566027.git.jtomko@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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.13 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Assume nobody runs current libvirt on kernels such as 2.6.26. Kernel commit 9f9c9cbb60576a1518d0bf93fb8e499cffccf377 (released in 3.8) mentions the new path and I believe it was added by: commit 948af1f0bbc8526448e8cbe3f8d3bf211bdf5181 firmware: Basic dmi-sysfs support (released in 2.6.39), but I cannot figure out how all that kernel automagic works. This reverts commit 4c81b0fdc57b23d80b1b4752cd6143d15c02e9c8 Signed-off-by: J=C3=A1n Tomko Reviewed-by: Michal Privoznik --- src/node_device/node_device_udev.c | 13 +++++-------- src/node_device/node_device_udev.h | 1 - 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index 2d0ca27fc6..29a7eaa07c 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1731,14 +1731,11 @@ udevGetDMIData(virNodeDevCapSystemPtr syscap) =20 device =3D udev_device_new_from_syspath(udev, DMI_DEVPATH); if (device =3D=3D NULL) { - device =3D udev_device_new_from_syspath(udev, DMI_DEVPATH_FALLBACK= ); - if (device =3D=3D NULL) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Failed to get udev device for syspath '%s' o= r '%s'"), - DMI_DEVPATH, DMI_DEVPATH_FALLBACK); - virObjectUnlock(priv); - return; - } + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Failed to get udev device for syspath '%s'"), + DMI_DEVPATH); + virObjectUnlock(priv); + return; } virObjectUnlock(priv); =20 diff --git a/src/node_device/node_device_udev.h b/src/node_device/node_devi= ce_udev.h index 996677dfe0..eab22a9182 100644 --- a/src/node_device/node_device_udev.h +++ b/src/node_device/node_device_udev.h @@ -24,4 +24,3 @@ =20 #define SYSFS_DATA_SIZE 4096 #define DMI_DEVPATH "/sys/devices/virtual/dmi/id" -#define DMI_DEVPATH_FALLBACK "/sys/class/dmi/id" --=20 2.26.2