summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mdadm.c b/mdadm.c
index 5f395714..42544f1a 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -465,7 +465,11 @@ int main(int argc, char *argv[])
"Second value is %s.\n", optarg);
exit(2);
}
- data_offset = parse_size(optarg);
+ if (mode == CREATE &&
+ strcmp(optarg, "variable") == 0)
+ data_offset = VARIABLE_OFFSET;
+ else
+ data_offset = parse_size(optarg);
if (data_offset == INVALID_SECTORS) {
fprintf(stderr, Name ": invalid data-offset: %s\n",
optarg);