summaryrefslogtreecommitdiff
path: root/platform-intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'platform-intel.c')
-rw-r--r--platform-intel.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/platform-intel.c b/platform-intel.c
index 5160227b..d568ca61 100644
--- a/platform-intel.c
+++ b/platform-intel.c
@@ -90,7 +90,7 @@ struct sys_dev *find_driver_devices(const char *bus, const char *driver)
list->path = canonicalize_file_name(path);
list->next = NULL;
}
-
+ closedir(driver_dir);
return head;
}
@@ -157,6 +157,7 @@ static int scan(const void *start, const void *end)
const struct imsm_orom *find_imsm_orom(void)
{
static int populated = 0;
+ unsigned long align;
/* it's static data so we only need to read it once */
if (populated)
@@ -184,7 +185,11 @@ const struct imsm_orom *find_imsm_orom(void)
return NULL;
/* scan option-rom memory looking for an imsm signature */
- if (probe_roms_init() != 0)
+ if (check_env("IMSM_SAFE_OROM_SCAN"))
+ align = 2048;
+ else
+ align = 512;
+ if (probe_roms_init(align) != 0)
return NULL;
probe_roms();
populated = scan_adapter_roms(scan);