From 757234466509aae6221c2cb96e8366f41ba7e532 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 14 Dec 2006 17:31:10 +1100 Subject: Default to --auto=yes so the array devices with 'standard' names get created automatically, as this is almost always what is wanted. --- mdopen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mdopen.c') 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; -- cgit v1.2.3