diff options
author | attilio <attilio@FreeBSD.org> | 2013-02-04 22:10:01 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-02-04 22:10:01 +0000 |
commit | d3b7ec3a087fe017933d12d65a35cae1d1a00914 (patch) | |
tree | ab3d468dc0be6c80a1fb354da0786f9b3853ac34 /sbin | |
parent | 0d3b58aee00948d85d75a9d3d222deb454afc98e (diff) | |
parent | cfd3c02e72a8574bd02f57cd649cc2a4138d83ef (diff) | |
download | FreeBSD-src-d3b7ec3a087fe017933d12d65a35cae1d1a00914.zip FreeBSD-src-d3b7ec3a087fe017933d12d65a35cae1d1a00914.tar.gz |
MFC
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/recoverdisk/recoverdisk.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sbin/recoverdisk/recoverdisk.c b/sbin/recoverdisk/recoverdisk.c index 3a92d1d..caa8ebd 100644 --- a/sbin/recoverdisk/recoverdisk.c +++ b/sbin/recoverdisk/recoverdisk.c @@ -156,6 +156,7 @@ main(int argc, char * const argv[]) int error, state; u_char *buf; u_int sectorsize; + u_int stripesize; time_t t1, t2; struct stat sb; u_int n, snapshot = 60; @@ -201,6 +202,10 @@ main(int argc, char * const argv[]) if (error < 0) err(1, "DIOCGSECTORSIZE failed"); + error = ioctl(fdr, DIOCGSTRIPESIZE, &stripesize); + if (error == 0 && stripesize > sectorsize) + sectorsize = stripesize; + minsize = sectorsize; bigsize = (bigsize / sectorsize) * sectorsize; |