diff --git a/libfwupdplugin/fu-common.c b/libfwupdplugin/fu-common.c index d67edfc37..598066a71 100644 --- a/libfwupdplugin/fu-common.c +++ b/libfwupdplugin/fu-common.c @@ -1175,6 +1175,12 @@ fu_common_get_path (FuPathKind path_kind) if (tmp != NULL) return g_strdup (tmp); return g_strdup ("/sys/firmware/acpi/tables"); + /* /sys/module/firmware_class/parameters/path */ + case FU_PATH_KIND_FIRMWARE_SEARCH: + tmp = g_getenv ("FWUPD_FIRMWARESEARCH"); + if (tmp != NULL) + return g_strdup (tmp); + return g_strdup ("/sys/module/firmware_class/parameters/path"); /* /etc */ case FU_PATH_KIND_SYSCONFDIR: tmp = g_getenv ("FWUPD_SYSCONFDIR"); diff --git a/libfwupdplugin/fu-common.h b/libfwupdplugin/fu-common.h index 31fc63ede..75dbc384c 100644 --- a/libfwupdplugin/fu-common.h +++ b/libfwupdplugin/fu-common.h @@ -68,6 +68,7 @@ typedef guint FuEndianType; * @FU_PATH_KIND_ACPI_TABLES: The location of the ACPI tables * @FU_PATH_KIND_LOCKDIR: The lock directory (IE /run/lock) * @FU_PATH_KIND_SYSFSDIR_FW_ATTRIB The firmware attributes directory (IE /sys/class/firmware-attributes) + * @FU_PATH_KIND_FIRMWARE_SEARCH: The path to configure the kernel policy for runtime loading other than /lib/firmware (IE /sys/module/firmware_class/parameters/path) * * Path types to use when dynamically determining a path at runtime **/ @@ -90,6 +91,7 @@ typedef enum { FU_PATH_KIND_ACPI_TABLES, FU_PATH_KIND_LOCKDIR, FU_PATH_KIND_SYSFSDIR_FW_ATTRIB, + FU_PATH_KIND_FIRMWARE_SEARCH, /*< private >*/ FU_PATH_KIND_LAST } FuPathKind;