fwupd/libfwupdplugin/fu-smbios-private.h
Peter Marheine 464425fb5c SMBIOS: try reading from /sys/class/dmi if direct access fails
The raw SMBIOS tables that Linux exposes in /sys/firmware/dmi
are restricted to being readable by root only. If running as
non-root access is still permitted by fields that have been
pre-parsed by the kernel in /sys/class/dmi, most of which are
world-readable. This allows the daemon to load most HWIDs even
if running as a non-root user, as is done on Chromium OS.
2021-07-23 09:46:45 +01:00

28 lines
692 B
C

/*
* Copyright (C) 2017 Richard Hughes <richard@hughsie.com>
*
* SPDX-License-Identifier: LGPL-2.1+
*/
#pragma once
#include <glib-object.h>
#include "fu-smbios.h"
gboolean fu_smbios_setup (FuSmbios *self,
GError **error)
G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_smbios_setup_from_path (FuSmbios *self,
const gchar *path,
GError **error)
G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_smbios_setup_from_file (FuSmbios *self,
const gchar *filename,
GError **error)
G_GNUC_WARN_UNUSED_RESULT;
gboolean fu_smbios_setup_from_kernel (FuSmbios *self,
const gchar *path,
GError **error)
G_GNUC_WARN_UNUSED_RESULT;