trivial: Add FU_PATH_KIND_SYSFSDIR_DMI for future use

This commit is contained in:
Richard Hughes 2023-01-16 20:12:33 +00:00
parent 0efc1bebce
commit 4057edb24b
3 changed files with 9 additions and 0 deletions

View File

@ -85,6 +85,7 @@ for details.
* `FWUPD_OFFLINE_TRIGGER`
* `FWUPD_PROCFS`
* `FWUPD_SYSCONFDIR`
* `FWUPD_SYSFSDMIDIR`
* `FWUPD_SYSFSDRIVERDIR`
* `FWUPD_SYSFSFWATTRIBDIR`
* `FWUPD_SYSFSFWDIR`

View File

@ -292,6 +292,12 @@ fu_path_from_kind(FuPathKind path_kind)
if (tmp != NULL)
return g_strdup(tmp);
return g_strdup("/sys/kernel/security");
/* /sys/class/dmi/id */
case FU_PATH_KIND_SYSFSDIR_DMI:
tmp = g_getenv("FWUPD_SYSFSDMIDIR");
if (tmp != NULL)
return g_strdup(tmp);
return g_strdup("/sys/class/dmi/id");
/* /sys/firmware/acpi/tables */
case FU_PATH_KIND_ACPI_TABLES:
tmp = g_getenv("FWUPD_ACPITABLESDIR");

View File

@ -44,6 +44,7 @@
* /var/lib/fwupd/remotes.d)
* @FU_PATH_KIND_WIN32_BASEDIR: The root of the install directory on Windows
* @FU_PATH_KIND_LOCALCONFDIR_PKG: The package configuration override (IE /var/etc/fwupd)
* @FU_PATH_KIND_SYSFSDIR_DMI: The sysfs DMI location, (IE /sys/class/dmi/id)
*
* Path types to use when dynamically determining a path at runtime
**/
@ -73,6 +74,7 @@ typedef enum {
FU_PATH_KIND_LOCALSTATEDIR_REMOTES,
FU_PATH_KIND_WIN32_BASEDIR,
FU_PATH_KIND_LOCALCONFDIR_PKG,
FU_PATH_KIND_SYSFSDIR_DMI,
/*< private >*/
FU_PATH_KIND_LAST
} FuPathKind;