]> git.proxmox.com Git - fwupd.git/commitdiff
trivial: Add FU_PATH_KIND_SYSFSDIR_DMI for future use
authorRichard Hughes <richard@hughsie.com>
Mon, 16 Jan 2023 20:12:33 +0000 (20:12 +0000)
committerRichard Hughes <richard@hughsie.com>
Mon, 16 Jan 2023 20:23:28 +0000 (20:23 +0000)
docs/env.md
libfwupdplugin/fu-path.c
libfwupdplugin/fu-path.h

index 8f80af1561f488efaaf630c17dbfb7e25eb2d7bf..ffe9cb59a56d4ce80fcdd288c88034b5f2fb4dcc 100644 (file)
@@ -85,6 +85,7 @@ for details.
 * `FWUPD_OFFLINE_TRIGGER`
 * `FWUPD_PROCFS`
 * `FWUPD_SYSCONFDIR`
+* `FWUPD_SYSFSDMIDIR`
 * `FWUPD_SYSFSDRIVERDIR`
 * `FWUPD_SYSFSFWATTRIBDIR`
 * `FWUPD_SYSFSFWDIR`
index 859a6cd0925266872fe7b9cecc8a22c097c13d08..0df8144cf63a67b6391d0a6b86881ecc23f6aab1 100644 (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");
index 6329cc982b4d3ecbb9e7410b23185f3d39c730be..7c4a507674fe75c173d2267db0502f99ddf4b415 100644 (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;