diff --git a/base/pf-bb-config/debian/patches/0002-Fix-check-return-of-configure_device.patch b/base/pf-bb-config/debian/patches/0001-Fix-check-return-of-configure_device.patch similarity index 100% rename from base/pf-bb-config/debian/patches/0002-Fix-check-return-of-configure_device.patch rename to base/pf-bb-config/debian/patches/0001-Fix-check-return-of-configure_device.patch diff --git a/base/pf-bb-config/debian/patches/0001-Reject-device-configuration-if-not-enabled.patch b/base/pf-bb-config/debian/patches/0001-Reject-device-configuration-if-not-enabled.patch deleted file mode 100644 index 7d3a35f26..000000000 --- a/base/pf-bb-config/debian/patches/0001-Reject-device-configuration-if-not-enabled.patch +++ /dev/null @@ -1,50 +0,0 @@ -From a12967eba299f63f3abe5a906765d5beb16db81c Mon Sep 17 00:00:00 2001 -From: Andre Kantek -Date: Wed, 23 Nov 2022 08:27:52 -0300 -Subject: [PATCH] Reject device configuration if not enabled - -Check if device is enabled in the return logic of get_device_id() - -Signed-off-by: Andre Kantek ---- - config_app.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/config_app.c b/config_app.c -index 6acd8f1..4f72764 100644 ---- a/config_app.c -+++ b/config_app.c -@@ -85,6 +85,7 @@ static bool - get_device_id(hw_device *device, const char *location) - { - unsigned long vendor_id = -1, device_id = -1; -+ unsigned int device_enabled = 0; - struct dirent *dirent; - DIR *dir; - char pci_path[PATH_MAX]; -@@ -112,6 +113,12 @@ get_device_id(hw_device *device, const char *location) - if (snprintf_ret < 0) - LOG(ERR, "Failed to format PCI path"); - -+ /* Is device enabled? */ -+ if (strncmp(dirent->d_name, "enable", -+ strlen(dirent->d_name)) == 0 && -+ dirent->d_type == DT_REG) -+ device_enabled = get_file_val(file_path); -+ - /* Get Device ID */ - if (strncmp(dirent->d_name, DEVICE_FILE, - strlen(dirent->d_name)) == 0 && -@@ -127,7 +134,8 @@ get_device_id(hw_device *device, const char *location) - - closedir(dir); - /* Check if device is found */ -- return (vendor_id == device->vendor_id && -+ return (device_enabled && -+ vendor_id == device->vendor_id && - device_id == device->device_id); - } - --- -2.17.1 - diff --git a/base/pf-bb-config/debian/patches/series b/base/pf-bb-config/debian/patches/series index 6020ab03a..9866ccf63 100644 --- a/base/pf-bb-config/debian/patches/series +++ b/base/pf-bb-config/debian/patches/series @@ -1,2 +1 @@ -0001-Reject-device-configuration-if-not-enabled.patch -0002-Fix-check-return-of-configure_device.patch \ No newline at end of file +0001-Fix-check-return-of-configure_device.patch