summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-12-01 11:07:01 +0000
committerphk <phk@FreeBSD.org>1995-12-01 11:07:01 +0000
commitf0378d7d2fba3b8fc0a0ad0029bfea70b29536bf (patch)
tree992a24c708e5a31bd958f60c2907a20b3717c920 /usr.sbin
parent564adf2abc21b1c74cdc2daef151b9283c987c81 (diff)
downloadFreeBSD-src-f0378d7d2fba3b8fc0a0ad0029bfea70b29536bf.zip
FreeBSD-src-f0378d7d2fba3b8fc0a0ad0029bfea70b29536bf.tar.gz
Commit the longstanding bin/410 & kern/411 fix, in the hope that somebody
will find out if it works/breaks before we do our next release. It's all about bad blocks in the remap area of the disk.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bad144/bad144.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bad144/bad144.c b/usr.sbin/bad144/bad144.c
index 628b80d..a1b402a 100644
--- a/usr.sbin/bad144/bad144.c
+++ b/usr.sbin/bad144/bad144.c
@@ -133,7 +133,7 @@ bad_scan(argc, argv, dp, f, bstart, bend)
* If we do, we may have to read twice over the block to find
* exactly which one failed, and it may not fail second time.
*/
- for (curr_sec = bstart; curr_sec < bend; curr_sec++) {
+ for (curr_sec = bstart; curr_sec < size; curr_sec++) {
if (verbose) {
if ((curr_sec % spc) == 0)
@@ -349,9 +349,9 @@ usage:
while (argc > 0) {
sn = atoi(*argv++);
argc--;
- if (sn < 0 || sn >= size) {
+ if (sn < 0 || sn >= bend) {
printf("%ld: out of range [0,%ld) for disk %s\n",
- sn, size, dp->d_typename);
+ sn, bend, dp->d_typename);
errs++;
continue;
}
OpenPOWER on IntegriCloud