diff options
author | NeilBrown <neilb@suse.de> | 2010-11-22 19:35:25 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-11-22 19:35:25 +1100 |
commit | feab51f8f710f28a63a5b01ec59a5a609a45525b (patch) | |
tree | a12fafbfb76d636720f869a394051eb972609988 /Kill.c | |
parent | 8d86ffefdf9c91d1d01e27c671735b7bd5301e66 (diff) | |
download | mdadm-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.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -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; |