diff options
author | NeilBrown <neilb@suse.de> | 2009-07-14 14:32:30 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-07-14 14:32:30 +1000 |
commit | 5f4fc0e1916c47c1b172801f53362e50d32cd4dc (patch) | |
tree | 878345ba1b1b0b2679124a2f27880f8fa5a6edda /mdadm.c | |
parent | 19678e536d5b7aba8b721a3065f2550b79ddd208 (diff) | |
download | mdadm-5f4fc0e1916c47c1b172801f53362e50d32cd4dc.tar.gz |
Grow: --size improvements.
1/ allow --size to be given with 'G' or 'T' suffix.
2/ allow size to exceed 32bits, and in that case write through sysfs.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -389,12 +389,14 @@ int main(int argc, char *argv[]) if (strcmp(optarg, "max")==0) size = 0; else { - size = strtoll(optarg, &c, 10); - if (!optarg[0] || *c || size < 4) { + size = parse_size(optarg); + if (size < 8) { fprintf(stderr, Name ": invalid size: %s\n", optarg); exit(2); } + /* convert sectors to K */ + size /= 2; } continue; |