diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2022-09-06 14:14:45 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2022-09-06 14:14:45 +0000 |
commit | d6accfc0a573be103c5d36870cee49733e1a5172 (patch) | |
tree | bd0fd10d34a828ca9347d1e199d195851dbc3bef /sbin/disklabel/disklabel.c | |
parent | c161e00bacdad7aa3848e387173f45f146cc9310 (diff) |
Delete some unreferenced SMD, ST506 and archaic SCSI #define's
that use d_drivedata.
Since nothing else in the tree refers to d_drivedata other than
/etc/disktab parsing and no /etc/disktab entry utilizes the
:d[0-4]: attributes, stop disklabel(8) both printing "drivedata:
0" and paying attention to any "drivedata: ..." lines in ascii
labels being read.
ok jsg@ miod@
Diffstat (limited to 'sbin/disklabel/disklabel.c')
-rw-r--r-- | sbin/disklabel/disklabel.c | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c index ba8d30083bc..1dafdc9ec6b 100644 --- a/sbin/disklabel/disklabel.c +++ b/sbin/disklabel/disklabel.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disklabel.c,v 1.243 2022/09/01 13:35:02 krw Exp $ */ +/* $OpenBSD: disklabel.c,v 1.244 2022/09/06 14:14:44 krw Exp $ */ /* * Copyright (c) 1987, 1993 @@ -418,9 +418,6 @@ makedisktab(FILE *f, struct disklabel *lp) * XXX We do not print have disktab information yet for * XXX DL_GETBSTART DL_GETBEND */ - for (i = 0; i < NDDATA; i++) - if (lp->d_drivedata[i]) - (void)fprintf(f, "d%d#%u", i, lp->d_drivedata[i]); pp = lp->d_partitions; for (i = 0; i < lp->d_npartitions; i++, pp++) { if (DL_GETPSIZE(pp)) { @@ -556,7 +553,7 @@ canonical_unit(struct disklabel *lp, char unit) void display(FILE *f, struct disklabel *lp, char unit, int all) { - int i, j; + int i; double d; unit = canonical_unit(lp, unit); @@ -595,15 +592,6 @@ display(FILE *f, struct disklabel *lp, char unit, int all) fprintf(f, "boundstart: %llu\n", DL_GETBSTART(lp)); fprintf(f, "boundend: %llu\n", DL_GETBEND(lp)); - fprintf(f, "drivedata: "); - for (i = NDDATA - 1; i >= 0; i--) - if (lp->d_drivedata[i]) - break; - if (i < 0) - i = 0; - for (j = 0; j <= i; j++) - fprintf(f, "%d ", lp->d_drivedata[j]); - fprintf(f, "\n"); if (all) { fprintf(f, "\n%hu partitions:\n", lp->d_npartitions); fprintf(f, "# %16.16s %16.16s fstype [fsize bsize cpg]\n", @@ -889,19 +877,6 @@ getasciilabel(FILE *f, struct disklabel *lp) lp->d_flags = v; continue; } - if (!strcmp(cp, "drivedata")) { - int i; - - for (i = 0; (cp = tp) && *cp != '\0' && i < NDDATA;) { - v = GETNUM(lp->d_drivedata[i], cp, 0, &errstr); - if (errstr) - warnx("line %d: bad drivedata %s", - lineno, cp); - lp->d_drivedata[i++] = v; - tp = word(cp); - } - continue; - } if (sscanf(cp, "%d partitions", &v) == 1) { if (v == 0 || v > MAXPARTITIONS) { warnx("line %d: bad # of partitions", lineno); @@ -929,13 +904,14 @@ getasciilabel(FILE *f, struct disklabel *lp) continue; } - /* Ignore fields that are no longer in the disklabel. */ + /* Ignore fields that are no longer used. */ if (!strcmp(cp, "rpm") || !strcmp(cp, "interleave") || !strcmp(cp, "trackskew") || !strcmp(cp, "cylinderskew") || !strcmp(cp, "headswitch") || - !strcmp(cp, "track-to-track seek")) + !strcmp(cp, "track-to-track seek") || + !strcmp(cp, "drivedata")) continue; /* Ignore fields that are forcibly set when label is read. */ |