+ case 'X':
+ fp = fopen(optarg, "r");
+ if (!fp)
+ bail_syserr(errno, "failed to open bad-blocks file `%s'", optarg);
+ i = 0; last = -1;
+ for (;;) {
+ BUF_REWIND(&buf); if (read_line(fp, &buf)) break;
+ p = buf.p; i++;
+ while (ISSPACE(*p)) p++;
+ if (!*p || *p == '#') continue;
+ if (parse_range(p, 0, &start, &end) ||
+ (last <= SECLIMIT && start < last))
+ bail("bad range `%s' at `%s' line %zu", buf.p, optarg, i);
+ if (start < end)
+ { VEC_PUSH(bad, &badblocks); bad->start = start; bad->end = end; }
+ }
+ if (ferror(fp))
+ bail_syserr(errno, "failed to read bad-blocks file `%s'", optarg);
+ break;