summaryrefslogtreecommitdiff
path: root/Kill.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-11-22 19:35:25 +1100
committerNeilBrown <neilb@suse.de>2010-11-22 19:35:25 +1100
commitfeab51f8f710f28a63a5b01ec59a5a609a45525b (patch)
treea12fafbfb76d636720f869a394051eb972609988 /Kill.c
parent8d86ffefdf9c91d1d01e27c671735b7bd5301e66 (diff)
downloadmdadm-feab51f8f710f28a63a5b01ec59a5a609a45525b.tar.gz
open_subarray: pass subarray name as explicit arg.
Rather than hiding this arg in the 'st' structure, pass it explicitly. This is a first step to getting rid of 'subarray' from 'supertype'. The strcpy in open_subarray should have better error checking, but it will disappear soon so there is little point. Signed-off-by: NeilBrown <neilb@suse.de.
Diffstat (limited to 'Kill.c')
-rw-r--r--Kill.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/Kill.c b/Kill.c
index f5c30e9..29a43ea 100644
--- a/Kill.c
+++ b/Kill.c
@@ -96,16 +96,7 @@ int Kill_subarray(char *dev, char *subarray, int quiet)
memset(st, 0, sizeof(*st));
- if (snprintf(st->subarray, sizeof(st->subarray), "%s", subarray) >=
- (int)sizeof(st->subarray)) {
- if (!quiet)
- fprintf(stderr,
- Name ": Input overflow for subarray '%s' > %zu bytes\n",
- subarray, sizeof(st->subarray) - 1);
- return 2;
- }
-
- fd = open_subarray(dev, st, quiet);
+ fd = open_subarray(dev, subarray, st, quiet);
if (fd < 0)
return 2;