summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-12-21 17:10:52 +1100
committerNeil Brown <neilb@suse.de>2006-12-21 17:10:52 +1100
commit8382f19bdcc6d2d1de92154e11129acdcaab10fa (patch)
tree3b3c93a6ad6189d6354de81714fc8959de8378f5 /config.c
parent350f29f90d1f6bb3ddfafea368327911f9e8b27c (diff)
downloadmdadm-8382f19bdcc6d2d1de92154e11129acdcaab10fa.tar.gz
mdadm-8382f19bdcc6d2d1de92154e11129acdcaab10fa.tar.xz
mdadm-8382f19bdcc6d2d1de92154e11129acdcaab10fa.zip
Add new mode: --incremental
--incremental allows arrays to be assembled one device at a time. This is expected to be used with udev.
Diffstat (limited to 'config.c')
-rw-r--r--config.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/config.c b/config.c
index 7101c3b..73031b7 100644
--- a/config.c
+++ b/config.c
@@ -86,7 +86,7 @@ char *keywords[] = {
[Mailaddr] = "mailaddr",
[Mailfrom] = "mailfrom",
[Program] = "program",
- [CreateDev] = "create",
+ [CreateDev]= "create",
[Homehost] = "homehost",
[LTEnd] = NULL
};
@@ -747,6 +747,22 @@ mddev_dev_t conf_get_devs()
return dlist;
}
+int conf_test_dev(char *devname)
+{
+ struct conf_dev *cd;
+ if (cdevlist == NULL)
+ /* allow anything by default */
+ return 1;
+ for (cd = cdevlist ; cd ; cd = cd->next) {
+ if (strcasecmp(cd->name, "partitions") == 0)
+ return 1;
+ if (fnmatch(cd->name, devname, FNM_PATHNAME) == 0)
+ return 1;
+ }
+ return 0;
+}
+
+
int match_oneof(char *devices, char *devname)
{
/* check if one of the comma separated patterns in devices