summaryrefslogtreecommitdiffstats
path: root/Create.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-01-20 01:36:51 -0700
committerDan Williams <dan.j.williams@intel.com>2009-01-20 01:36:51 -0700
commit5615172f1d9daba1d5927758322f7addda803159 (patch)
treef078ea522d858db56d0ec47cb450680c5a8a87d9 /Create.c
parenta20d2ba5f32c76903ab6e32d83fa8c5e9c78d13f (diff)
downloadmdadm-5615172f1d9daba1d5927758322f7addda803159.tar.gz
mdadm-5615172f1d9daba1d5927758322f7addda803159.tar.xz
mdadm-5615172f1d9daba1d5927758322f7addda803159.zip
Create: warn when a metadata format's platform components are missing
If the metadata handler can not find its platform support components then there is no way for it to verify that the raid configuration will be supported by the option-rom. Provide a generic method for metadata handlers to warn the user that the array they are about to create may not work as intended with a given platform. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'Create.c')
-rw-r--r--Create.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Create.c b/Create.c
index a7275d3..f63afa8 100644
--- a/Create.c
+++ b/Create.c
@@ -404,6 +404,14 @@ int Create(struct supertype *st, char *mddev,
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? ")) {