summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-05-15 11:03:25 +1000
committerNeilBrown <neilb@suse.de>2013-05-15 11:03:25 +1000
commiteca944fa9ca52b24d0aa4d1034066bbd148e529a (patch)
tree79cb8cf17254de953ea67aaafa5e5e2790cb0ea7 /config.c
parent83785d301f83fbda9912446b6bd714f0f82f711b (diff)
create_mddev: add support for /dev/md_XXX non-numeric names.
With the 'devnm' infrastructure fixed, it is quite easy to support names like "md_home" for md arrays. The currently defaults to "off" and can be enabled in mdadm.conf with CREATE names=yes This is incase other tools get confused by the new names. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'config.c')
-rw-r--r--config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/config.c b/config.c
index 798338fb..189714a8 100644
--- a/config.c
+++ b/config.c
@@ -219,6 +219,7 @@ struct mddev_dev *load_containers(void)
struct createinfo createinfo = {
.autof = 2, /* by default, create devices with standard names */
.symlinks = 1,
+ .names = 0, /* By default, stick with numbered md devices. */
#ifdef DEBIAN
.gid = 6, /* disk */
.mode = 0660,
@@ -334,6 +335,10 @@ static void createline(char *line)
createinfo.symlinks = 1;
else if (strncasecmp(w, "symlinks=no", 11) == 0)
createinfo.symlinks = 0;
+ else if (strncasecmp(w, "names=yes", 12) == 0)
+ createinfo.names = 1;
+ else if (strncasecmp(w, "names=no", 11) == 0)
+ createinfo.names = 0;
else {
pr_err("unrecognised word on CREATE line: %s\n",
w);