-/* $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
* 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)) {
void
display(FILE *f, struct disklabel *lp, char unit, int all)
{
- int i, j;
+ int i;
double d;
unit = canonical_unit(lp, unit);
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",
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);
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. */
-/* $OpenBSD: disklabel.h,v 1.79 2022/09/01 15:48:51 krw Exp $ */
+/* $OpenBSD: disklabel.h,v 1.80 2022/09/06 14:14:44 krw Exp $ */
/* $NetBSD: disklabel.h,v 1.41 1996/05/10 23:07:37 mark Exp $ */
/*
#define D_BADSECT 0x04 /* supports bad sector forw. */
#define D_VENDOR 0x08 /* vendor disklabel */
-/*
- * Drive data for SMD.
- */
-#define d_smdflags d_drivedata[0]
-#define D_SSE 0x1 /* supports skip sectoring */
-#define d_mindist d_drivedata[1]
-#define d_maxdist d_drivedata[2]
-#define d_sdist d_drivedata[3]
-
-/*
- * Drive data for ST506.
- */
-#define d_precompcyl d_drivedata[0]
-#define d_gap3 d_drivedata[1] /* used only when formatting */
-
-/*
- * Drive data for SCSI.
- */
-#define d_blind d_drivedata[0]
-
#ifndef _LOCORE
/*
* Structure used internally to retrieve information about a partition