From c0a65584a79812e87f592860ebd3a49db8c371ec Mon Sep 17 00:00:00 2001 From: krw Date: Mon, 7 Nov 2022 10:21:17 +0000 Subject: [PATCH] Nuke last references to d_drivedata. --- lib/libc/gen/disklabel.c | 7 ------- share/man/man5/disktab.5 | 5 ++--- sys/kern/subr_disk.c | 5 +---- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/lib/libc/gen/disklabel.c b/lib/libc/gen/disklabel.c index db5878ae25d..f935875d2a2 100644 --- a/lib/libc/gen/disklabel.c +++ b/lib/libc/gen/disklabel.c @@ -55,7 +55,6 @@ getdiskbyname(const char *name) char *cp, *cq; char p, max, psize[3], pbsize[3], pfsize[3], poffset[3], ptype[3]; - u_int32_t *dx; if (cgetent(&buf, db_array, (char *) name) < 0) return NULL; @@ -127,12 +126,6 @@ getdiskbyname(const char *name) } } dp->d_npartitions = max + 1 - 'a'; - (void)strlcpy(psize, "dx", sizeof psize); - dx = dp->d_drivedata; - for (p = '0'; p < '0' + NDDATA; p++, dx++) { - psize[1] = p; - getnumdflt(*dx, psize, 0); - } dp->d_magic = DISKMAGIC; dp->d_magic2 = DISKMAGIC; free(buf); diff --git a/share/man/man5/disktab.5 b/share/man/man5/disktab.5 index fc6fc289a97..6ff8bab79b1 100644 --- a/share/man/man5/disktab.5 +++ b/share/man/man5/disktab.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: disktab.5,v 1.22 2022/10/12 23:11:32 krw Exp $ +.\" $OpenBSD: disktab.5,v 1.23 2022/11/07 10:21:17 krw Exp $ .\" $NetBSD: disktab.5,v 1.4 1994/11/30 19:31:15 jtc Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)disktab.5 8.1 (Berkeley) 6/5/93 .\" -.Dd $Mdocdate: October 12 2022 $ +.Dd $Mdocdate: November 7 2022 $ .Dt DISKTAB 5 .Os .Sh NAME @@ -67,7 +67,6 @@ The following list indicates the normal values stored for each disk entry: .It \&su Ta num Ta "Number of sectors per unit (default: sc*nc)." .It \&se Ta num Ta "Sector size in bytes (default:" .Dv DEV_BSIZE ) . -.It \&d[0-4] Ta num Ta "Drive-type-dependent parameters." .Pp .It \&ba Ta num Ta "Block size for partition" .Dq a diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index 7ff23bc77ea..37e0829f07d 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.265 2022/10/11 23:39:08 krw Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.266 2022/11/07 10:21:17 krw Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -225,9 +225,6 @@ checkdisklabel(dev_t dev, void *rlp, struct disklabel *lp, u_int64_t boundstart, dlp->d_flags = swap32(dlp->d_flags); - for (i = 0; i < NDDATA; i++) - dlp->d_drivedata[i] = swap32(dlp->d_drivedata[i]); - dlp->d_secperunith = swap16(dlp->d_secperunith); dlp->d_version = swap16(dlp->d_version); -- 2.20.1