warn = 1;
}
+ if (st->ss->detail_platform && st->ss->detail_platform(0, 1) != 0) {
+ if (runstop != 1 || verbose >= 0)
+ fprintf(stderr, Name ": %s unable to enumerate platform support\n"
+ " array may not be compatible with hardware/firmware\n",
+ st->ss->name);
+ warn = 1;
+ }
+
if (warn) {
if (runstop!= 1) {
if (!ask("Continue creating array? ")) {
int err = 1;
if (ss && ss->detail_platform)
- err = ss->detail_platform(verbose);
+ err = ss->detail_platform(verbose, 0);
else if (ss) {
if (verbose)
fprintf(stderr, Name ": %s metadata is platform independent\n",
fprintf(stderr, Name ": %s metadata is platform independent\n",
meta->name ? : "[no name]");
} else
- err |= meta->detail_platform(verbose);
+ err |= meta->detail_platform(verbose, 0);
}
return err;
void (*export_detail_super)(struct supertype *st);
/* Optional: platform hardware / firmware details */
- int (*detail_platform)(int verbose);
+ int (*detail_platform)(int verbose, int enumerate_only);
/* Used:
* to get uuid to storing in bitmap metadata
return err;
}
-static int detail_platform_imsm(int verbose)
+static int detail_platform_imsm(int verbose, int enumerate_only)
{
/* There are two components to imsm platform support, the ahci SATA
* controller and the option-rom. To find the SATA controller we
int host_base = 0;
int port_count = 0;
+ if (enumerate_only) {
+ if (check_env("IMSM_NO_PLATFORM") || find_imsm_orom())
+ return 0;
+ return 2;
+ }
+
list = find_driver_devices("pci", "ahci");
for (hba = list; hba; hba = hba->next)
if (devpath_to_vendor(hba->path) == 0x8086)