1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-22 07:27:59 -08:00

Nuke D_BADSECT and disktab's 'sf'.

DEC standard 144 bad sector information is no longer a thing. As
evidenced by bad144(8) moving to the attic 16 years ago.

ok miod@, who points out that badsect(8) is now the nail sticking
out.
This commit is contained in:
krw 2022-10-12 23:11:32 +00:00
parent 0701a1582b
commit ea6c4d24ae
5 changed files with 7 additions and 15 deletions

View File

@ -71,9 +71,6 @@ getdiskbyname(const char *name)
cq++, cp++;
*cq = '\0';
if (cgetcap(buf, "sf", ':') != NULL)
dp->d_flags |= D_BADSECT;
#define getnumdflt(field, dname, dflt) \
{ long f; (field) = (cgetnum(buf, dname, &f) == -1) ? (dflt) : f; }
#define getnum(field, dname) \

View File

@ -1,4 +1,4 @@
/* $OpenBSD: badsect.c,v 1.28 2019/06/28 13:32:43 deraadt Exp $ */
/* $OpenBSD: badsect.c,v 1.29 2022/10/12 23:11:32 krw Exp $ */
/* $NetBSD: badsect.c,v 1.10 1995/03/18 14:54:28 cgd Exp $ */
/*
@ -35,8 +35,7 @@
*
* Badsect takes a list of file-system relative sector numbers
* and makes files containing the blocks of which these sectors are a part.
* It can be used to contain sectors which have problems if these sectors
* are not part of the bad file for the pack (see bad144). For instance,
* It can be used to contain sectors which have problems. For instance,
* this program can be used if the driver for the file system in question
* does not support bad block forwarding.
*/

View File

@ -1,4 +1,4 @@
/* $OpenBSD: disklabel.c,v 1.244 2022/09/06 14:14:44 krw Exp $ */
/* $OpenBSD: disklabel.c,v 1.245 2022/10/12 23:11:32 krw Exp $ */
/*
* Copyright (c) 1987, 1993
@ -572,8 +572,6 @@ display(FILE *f, struct disklabel *lp, char unit, int all)
lp->d_uid[0], lp->d_uid[1], lp->d_uid[2], lp->d_uid[3],
lp->d_uid[4], lp->d_uid[5], lp->d_uid[6], lp->d_uid[7]);
fprintf(f, "flags:");
if (lp->d_flags & D_BADSECT)
fprintf(f, " badsect");
if (lp->d_flags & D_VENDOR)
fprintf(f, " vendor");
putc('\n', f);
@ -865,7 +863,7 @@ getasciilabel(FILE *f, struct disklabel *lp)
for (v = 0; (cp = tp) && *cp != '\0';) {
tp = word(cp);
if (!strcmp(cp, "badsect"))
v |= D_BADSECT;
; /* Ignore obsolete flag. */
else if (!strcmp(cp, "vendor"))
v |= D_VENDOR;
else {

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: disktab.5,v 1.21 2022/09/01 13:56:21 krw Exp $
.\" $OpenBSD: disktab.5,v 1.22 2022/10/12 23:11:32 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: September 1 2022 $
.Dd $Mdocdate: October 12 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 \&sf Ta bool Ta "Controller supports bad144-style bad sector forwarding."
.It \&d[0-4] Ta num Ta "Drive-type-dependent parameters."
.Pp
.It \&ba Ta num Ta "Block size for partition"

View File

@ -1,4 +1,4 @@
/* $OpenBSD: disklabel.h,v 1.84 2022/10/11 23:39:08 krw Exp $ */
/* $OpenBSD: disklabel.h,v 1.85 2022/10/12 23:11:33 krw Exp $ */
/* $NetBSD: disklabel.h,v 1.41 1996/05/10 23:07:37 mark Exp $ */
/*
@ -321,7 +321,6 @@ static char *fstypesnames[] = {
/*
* flags shared by various drives:
*/
#define D_BADSECT 0x04 /* supports bad sector forw. */
#define D_VENDOR 0x08 /* vendor disklabel */
#ifndef _LOCORE