summaryrefslogtreecommitdiff
path: root/mdopen.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-12-14 17:31:10 +1100
committerNeil Brown <neilb@suse.de>2006-12-14 17:31:10 +1100
commit757234466509aae6221c2cb96e8366f41ba7e532 (patch)
treec6bebe56053849971f8f2b7fad638bbc125d50a8 /mdopen.c
parentd645b91a1baf44e4674900f1124841fe6c0a2410 (diff)
Default to --auto=yes
so the array devices with 'standard' names get created automatically, as this is almost always what is wanted.
Diffstat (limited to 'mdopen.c')
-rw-r--r--mdopen.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mdopen.c b/mdopen.c
index ce3a12e8..9f3dfb84 100644
--- a/mdopen.c
+++ b/mdopen.c
@@ -135,10 +135,6 @@ int open_mddev(char *dev, int autof)
dev);
return -1;
}
- if (autof == 2 && stb.st_mode == 0 && !is_standard(dev, NULL)) {
- fprintf(stderr, Name ": --auto=yes requires a 'standard' md device name, not %s\n", dev);
- return -1;
- }
/* check major number is correct */
num = -1;
std = is_standard(dev, &num);
@@ -146,19 +142,23 @@ int open_mddev(char *dev, int autof)
switch(autof) {
case 2: /* only create is_standard names */
if (!std && !stb.st_mode) {
- fprintf(stderr, Name ": --auto=yes requires a 'standard' md device name, not %s\n", dev);
+ fprintf(stderr, Name
+ ": %s does not exist and is not a 'standard' name "
+ "so it cannot be created\n", dev);
return -1;
}
break;
case 3: /* create md, reject std>0 */
if (std > 0) {
- fprintf(stderr, Name ": that --auto option not compatable with device named %s\n", dev);
+ fprintf(stderr, Name ": that --auto option "
+ "not compatable with device named %s\n", dev);
return -1;
}
break;
case 4: /* create mdp, reject std<0 */
if (std < 0) {
- fprintf(stderr, Name ": that --auto option not compatable with device named %s\n", dev);
+ fprintf(stderr, Name ": that --auto option "
+ "not compatable with device named %s\n", dev);
return -1;
}
break;