diff options
author | Piergiorgio Sartor <piergiorgio.sartor@nexgo.de> | 2011-03-22 00:09:38 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-22 00:09:38 +0100 |
commit | 6f38d7ae107de0615232a64a1b16a470fa1f8a4b (patch) | |
tree | e70680a06152f09cfacc358f1df949d78b7e4804 /restripe.c | |
parent | test: call "udevadm settle" after stopping array. (diff) | |
download | mdadm-6f38d7ae107de0615232a64a1b16a470fa1f8a4b.tar.xz mdadm-6f38d7ae107de0615232a64a1b16a470fa1f8a4b.zip |
restripe: allow test code to have an offset on each device.
If device name ends :number, e.g.
/dev/sda0:1234
then assume the RAID data starts that many sectors from start of
device.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'restripe.c')
-rw-r--r-- | restripe.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -875,6 +875,14 @@ main(int argc, char *argv[]) exit(3); } for (i=0; i<raid_disks; i++) { + char *p; + p = strchr(argv[9+i], ':'); + + if(p != NULL) { + *p++ = '\0'; + offsets[i] = atoll(p) * 512; + } + fds[i] = open(argv[9+i], O_RDWR); if (fds[i] < 0) { perror(argv[9+i]); |