]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - platform-intel.c
imsm: add support for checkpointing via 'curr_migr_unit'
[thirdparty/mdadm.git] / platform-intel.c
index 5160227be222e20682ef73d631566c98b4bc018e..d568ca614887bf154adb6a6206115ce462c24f7c 100644 (file)
@@ -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);