From b4b4e5635a27025bea7dd5be03b4545e0ca0cbba Mon Sep 17 00:00:00 2001 From: krw Date: Thu, 1 Sep 2022 13:45:26 +0000 Subject: [PATCH] Stop setting d_bbsize and d_sbsize. Nobody has paid any attention for some time. ok otto@ as part of larger diff --- sys/arch/amd64/stand/efi32/efidev.c | 5 +---- sys/arch/amd64/stand/efi64/efidev.c | 5 +---- sys/arch/amd64/stand/efiboot/efidev.c | 5 +---- sys/arch/amd64/stand/libsa/diskprobe.c | 5 +---- sys/arch/arm64/stand/efiboot/efidev.c | 5 +---- sys/arch/armv7/stand/efiboot/efidev.c | 5 +---- sys/arch/hppa/hppa/disksubr.c | 4 +--- sys/arch/i386/stand/libsa/diskprobe.c | 5 +---- sys/arch/luna88k/luna88k/disksubr.c | 5 +---- sys/arch/luna88k/stand/boot/ufs_disksubr.c | 5 +---- sys/arch/riscv64/stand/efiboot/efidev.c | 5 +---- sys/arch/sparc64/sparc64/disksubr.c | 5 +---- sys/arch/sparc64/stand/ofwboot/ofdev.c | 5 +---- sys/isofs/cd9660/cd9660_vfsops.c | 4 +--- sys/isofs/udf/udf_subr.c | 4 +--- sys/kern/subr_disk.c | 6 +----- sys/scsi/cd.c | 6 +----- sys/scsi/sd.c | 6 +----- 18 files changed, 18 insertions(+), 72 deletions(-) diff --git a/sys/arch/amd64/stand/efi32/efidev.c b/sys/arch/amd64/stand/efi32/efidev.c index a841a08fcc1..a78b65e5aa7 100644 --- a/sys/arch/amd64/stand/efi32/efidev.c +++ b/sys/arch/amd64/stand/efi32/efidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efidev.c,v 1.3 2022/08/12 20:17:46 stsp Exp $ */ +/* $OpenBSD: efidev.c,v 1.4 2022/09/01 13:45:26 krw Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -504,9 +504,6 @@ efi_getdisklabel_cd9660(efi_diskinfo_t ed, struct disklabel *label) strncpy(label->d_packname, "fictitious", sizeof(label->d_packname)); DL_SETDSIZE(label, 100); - label->d_bbsize = 2048; - label->d_sbsize = 2048; - /* 'a' partition covering the "whole" disk */ DL_SETPOFFSET(&label->d_partitions[0], 0); DL_SETPSIZE(&label->d_partitions[0], 100); diff --git a/sys/arch/amd64/stand/efi64/efidev.c b/sys/arch/amd64/stand/efi64/efidev.c index a841a08fcc1..a78b65e5aa7 100644 --- a/sys/arch/amd64/stand/efi64/efidev.c +++ b/sys/arch/amd64/stand/efi64/efidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efidev.c,v 1.3 2022/08/12 20:17:46 stsp Exp $ */ +/* $OpenBSD: efidev.c,v 1.4 2022/09/01 13:45:26 krw Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -504,9 +504,6 @@ efi_getdisklabel_cd9660(efi_diskinfo_t ed, struct disklabel *label) strncpy(label->d_packname, "fictitious", sizeof(label->d_packname)); DL_SETDSIZE(label, 100); - label->d_bbsize = 2048; - label->d_sbsize = 2048; - /* 'a' partition covering the "whole" disk */ DL_SETPOFFSET(&label->d_partitions[0], 0); DL_SETPSIZE(&label->d_partitions[0], 100); diff --git a/sys/arch/amd64/stand/efiboot/efidev.c b/sys/arch/amd64/stand/efiboot/efidev.c index 07c3a515a51..5fb9413a1a7 100644 --- a/sys/arch/amd64/stand/efiboot/efidev.c +++ b/sys/arch/amd64/stand/efiboot/efidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efidev.c,v 1.39 2022/08/12 20:17:46 stsp Exp $ */ +/* $OpenBSD: efidev.c,v 1.40 2022/09/01 13:45:26 krw Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -485,9 +485,6 @@ efi_getdisklabel_cd9660(efi_diskinfo_t ed, struct disklabel *label) strncpy(label->d_packname, "fictitious", sizeof(label->d_packname)); DL_SETDSIZE(label, 100); - label->d_bbsize = 2048; - label->d_sbsize = 2048; - /* 'a' partition covering the "whole" disk */ DL_SETPOFFSET(&label->d_partitions[0], 0); DL_SETPSIZE(&label->d_partitions[0], 100); diff --git a/sys/arch/amd64/stand/libsa/diskprobe.c b/sys/arch/amd64/stand/libsa/diskprobe.c index ec274ec62f2..5b15988bf54 100644 --- a/sys/arch/amd64/stand/libsa/diskprobe.c +++ b/sys/arch/amd64/stand/libsa/diskprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diskprobe.c,v 1.26 2020/12/09 18:10:18 krw Exp $ */ +/* $OpenBSD: diskprobe.c,v 1.27 2022/09/01 13:45:26 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -265,9 +265,6 @@ cdprobe(void) sizeof(dip->disklabel.d_packname)); DL_SETDSIZE(&dip->disklabel, 100); - dip->disklabel.d_bbsize = 2048; - dip->disklabel.d_sbsize = 2048; - /* 'a' partition covering the "whole" disk */ DL_SETPOFFSET(&dip->disklabel.d_partitions[0], 0); DL_SETPSIZE(&dip->disklabel.d_partitions[0], 100); diff --git a/sys/arch/arm64/stand/efiboot/efidev.c b/sys/arch/arm64/stand/efiboot/efidev.c index 789108dc242..0b92bef1ee2 100644 --- a/sys/arch/arm64/stand/efiboot/efidev.c +++ b/sys/arch/arm64/stand/efiboot/efidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efidev.c,v 1.10 2021/06/07 13:38:58 krw Exp $ */ +/* $OpenBSD: efidev.c,v 1.11 2022/09/01 13:45:26 krw Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko @@ -475,9 +475,6 @@ efi_getdisklabel_cd9660(efi_diskinfo_t ed, struct disklabel *label) strncpy(label->d_packname, "fictitious", sizeof(label->d_packname)); DL_SETDSIZE(label, 100); - label->d_bbsize = 2048; - label->d_sbsize = 2048; - /* 'a' partition covering the "whole" disk */ DL_SETPOFFSET(&label->d_partitions[0], 0); DL_SETPSIZE(&label->d_partitions[0], 100); diff --git a/sys/arch/armv7/stand/efiboot/efidev.c b/sys/arch/armv7/stand/efiboot/efidev.c index 79027789892..ca1b7090026 100644 --- a/sys/arch/armv7/stand/efiboot/efidev.c +++ b/sys/arch/armv7/stand/efiboot/efidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efidev.c,v 1.9 2021/06/10 18:06:35 krw Exp $ */ +/* $OpenBSD: efidev.c,v 1.10 2022/09/01 13:45:26 krw Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko @@ -475,9 +475,6 @@ efi_getdisklabel_cd9660(efi_diskinfo_t ed, struct disklabel *label) strncpy(label->d_packname, "fictitious", sizeof(label->d_packname)); DL_SETDSIZE(label, 100); - label->d_bbsize = 2048; - label->d_sbsize = 2048; - /* 'a' partition covering the "whole" disk */ DL_SETPOFFSET(&label->d_partitions[0], 0); DL_SETPSIZE(&label->d_partitions[0], 100); diff --git a/sys/arch/hppa/hppa/disksubr.c b/sys/arch/hppa/hppa/disksubr.c index 261ecd2ee75..807e6b0916e 100644 --- a/sys/arch/hppa/hppa/disksubr.c +++ b/sys/arch/hppa/hppa/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.89 2017/02/28 10:49:37 natano Exp $ */ +/* $OpenBSD: disksubr.c,v 1.90 2022/09/01 13:45:26 krw Exp $ */ /* * Copyright (c) 1999 Michael Shalayeff @@ -154,8 +154,6 @@ readliflabel(struct buf *bp, void (*strat)(struct buf *), goto done; } - lp->d_bbsize = 8192; - lp->d_sbsize = 8192; for (i = 0; i < MAXPARTITIONS; i++) { DL_SETPSIZE(&lp->d_partitions[i], 0); DL_SETPOFFSET(&lp->d_partitions[i], 0); diff --git a/sys/arch/i386/stand/libsa/diskprobe.c b/sys/arch/i386/stand/libsa/diskprobe.c index 28c5a55d7c8..d2876cb8d9a 100644 --- a/sys/arch/i386/stand/libsa/diskprobe.c +++ b/sys/arch/i386/stand/libsa/diskprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diskprobe.c,v 1.47 2020/12/09 18:10:18 krw Exp $ */ +/* $OpenBSD: diskprobe.c,v 1.48 2022/09/01 13:45:26 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -340,9 +340,6 @@ cdprobe(void) sizeof(dip->disklabel.d_packname)); DL_SETDSIZE(&dip->disklabel, 100); - dip->disklabel.d_bbsize = 2048; - dip->disklabel.d_sbsize = 2048; - /* 'a' partition covering the "whole" disk */ DL_SETPOFFSET(&dip->disklabel.d_partitions[0], 0); DL_SETPSIZE(&dip->disklabel.d_partitions[0], 100); diff --git a/sys/arch/luna88k/luna88k/disksubr.c b/sys/arch/luna88k/luna88k/disksubr.c index 3536aff92c9..c9dc9c9b741 100644 --- a/sys/arch/luna88k/luna88k/disksubr.c +++ b/sys/arch/luna88k/luna88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.59 2017/02/28 10:49:37 natano Exp $ */ +/* $OpenBSD: disksubr.c,v 1.60 2022/09/01 13:45:26 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.12 2002/02/19 17:09:44 wiz Exp $ */ /* @@ -278,9 +278,6 @@ disklabel_om_to_bsd(struct sun_disklabel *sl, struct disklabel *lp) lp->d_acylinders = sl->sl_acylinders; lp->d_npartitions = MAXPARTITIONS; - /* These are as defined in */ - lp->d_bbsize = 8192; /* XXX */ - lp->d_sbsize = 8192; /* XXX */ for (i = 0; i < 8; i++) { spp = &sl->sl_part[i]; diff --git a/sys/arch/luna88k/stand/boot/ufs_disksubr.c b/sys/arch/luna88k/stand/boot/ufs_disksubr.c index 9b29f64ce07..c146eb47158 100644 --- a/sys/arch/luna88k/stand/boot/ufs_disksubr.c +++ b/sys/arch/luna88k/stand/boot/ufs_disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_disksubr.c,v 1.4 2013/11/05 00:51:58 krw Exp $ */ +/* $OpenBSD: ufs_disksubr.c,v 1.5 2022/09/01 13:45:26 krw Exp $ */ /* $NetBSD: ufs_disksubr.c,v 1.2 2013/01/14 01:37:57 tsutsui Exp $ */ /* @@ -166,9 +166,6 @@ readdisklabel(struct scsi_softc *sc, uint tgt, struct disklabel *lp) lp->d_acylinders = slp->sl_acylinders; lp->d_npartitions = MAXPARTITIONS; - /* These are as defined in */ - lp->d_bbsize = BBSIZE; /* XXX */ - lp->d_sbsize = BBSIZE; /* XXX */ for (i = 0; i < 8; i++) { spp = &slp->sl_part[i]; diff --git a/sys/arch/riscv64/stand/efiboot/efidev.c b/sys/arch/riscv64/stand/efiboot/efidev.c index 5258249343c..1dd9eea7da8 100644 --- a/sys/arch/riscv64/stand/efiboot/efidev.c +++ b/sys/arch/riscv64/stand/efiboot/efidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efidev.c,v 1.3 2021/06/25 17:49:49 krw Exp $ */ +/* $OpenBSD: efidev.c,v 1.4 2022/09/01 13:45:26 krw Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko @@ -475,9 +475,6 @@ efi_getdisklabel_cd9660(efi_diskinfo_t ed, struct disklabel *label) strncpy(label->d_packname, "fictitious", sizeof(label->d_packname)); DL_SETDSIZE(label, 100); - label->d_bbsize = 2048; - label->d_sbsize = 2048; - /* 'a' partition covering the "whole" disk */ DL_SETPOFFSET(&label->d_partitions[0], 0); DL_SETPSIZE(&label->d_partitions[0], 100); diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c index 607826f848e..8b49ef94887 100644 --- a/sys/arch/sparc64/sparc64/disksubr.c +++ b/sys/arch/sparc64/sparc64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.72 2017/02/28 10:49:37 natano Exp $ */ +/* $OpenBSD: disksubr.c,v 1.73 2022/09/01 13:45:26 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */ /* @@ -258,9 +258,6 @@ disklabel_sun_to_bsd(struct sun_disklabel *sl, struct disklabel *lp) lp->d_acylinders = sl->sl_acylinders; lp->d_npartitions = MAXPARTITIONS; - /* These are as defined in */ - lp->d_bbsize = 8192; /* XXX */ - lp->d_sbsize = 8192; /* XXX */ for (i = 0; i < 8; i++) { spp = &sl->sl_part[i]; diff --git a/sys/arch/sparc64/stand/ofwboot/ofdev.c b/sys/arch/sparc64/stand/ofwboot/ofdev.c index 9cd20af1b9a..4ab8b909315 100644 --- a/sys/arch/sparc64/stand/ofwboot/ofdev.c +++ b/sys/arch/sparc64/stand/ofwboot/ofdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofdev.c,v 1.33 2022/07/27 12:32:03 kn Exp $ */ +/* $OpenBSD: ofdev.c,v 1.34 2022/09/01 13:45:26 krw Exp $ */ /* $NetBSD: ofdev.c,v 1.1 2000/08/20 14:58:41 mrg Exp $ */ /* @@ -314,9 +314,6 @@ disklabel_sun_to_bsd(struct sun_disklabel *sl, struct disklabel *lp) lp->d_acylinders = sl->sl_acylinders; lp->d_npartitions = MAXPARTITIONS; - /* These are as defined in */ - lp->d_bbsize = 8192; /* XXX */ - lp->d_sbsize = 8192; /* XXX */ for (i = 0; i < 8; i++) { spp = &sl->sl_part[i]; diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 0bcfbd0270d..f1b5a81b79f 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vfsops.c,v 1.95 2021/03/05 07:10:06 jsg Exp $ */ +/* $OpenBSD: cd9660_vfsops.c,v 1.96 2022/09/01 13:45:26 krw Exp $ */ /* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */ /*- @@ -506,8 +506,6 @@ iso_disklabelspoof(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp) DL_SETPSIZE(&lp->d_partitions[RAW_PART], DL_GETDSIZE(lp)); lp->d_partitions[RAW_PART].p_fstype = FS_ISO9660; lp->d_npartitions = MAXPARTITIONS; - lp->d_bbsize = 8192; /* fake */ - lp->d_sbsize = 64*1024; /* fake */ lp->d_version = 1; lp->d_magic = DISKMAGIC; diff --git a/sys/isofs/udf/udf_subr.c b/sys/isofs/udf/udf_subr.c index 74971612fba..e7082085ceb 100644 --- a/sys/isofs/udf/udf_subr.c +++ b/sys/isofs/udf/udf_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_subr.c,v 1.25 2014/12/16 18:30:03 tedu Exp $ */ +/* $OpenBSD: udf_subr.c,v 1.26 2022/09/01 13:45:26 krw Exp $ */ /* * Copyright (c) 2006, Miodrag Vallat @@ -173,8 +173,6 @@ udf_disklabelspoof(dev_t dev, void (*strat)(struct buf *), lp->d_npartitions = MAXPARTITIONS; lp->d_version = 1; - lp->d_bbsize = 8192; /* Fake. */ - lp->d_sbsize = 64*1024; /* Fake. */ lp->d_magic = DISKMAGIC; lp->d_magic2 = DISKMAGIC; lp->d_checksum = dkcksum(lp); diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index 822d2415b14..94a67927f3e 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.254 2022/08/20 13:10:45 krw Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.255 2022/09/01 13:45:27 krw Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -154,8 +154,6 @@ initdisklabel(struct disklabel *lp) DL_SETBSTART(lp, 0); DL_SETBEND(lp, DL_GETDSIZE(lp)); lp->d_version = 1; - lp->d_bbsize = 8192; - lp->d_sbsize = 64*1024; /* XXX ? */ return (0); } @@ -236,8 +234,6 @@ checkdisklabel(void *rlp, struct disklabel *lp, u_int64_t boundstart, dlp->d_magic2 = swap32(dlp->d_magic2); dlp->d_npartitions = swap16(dlp->d_npartitions); - dlp->d_bbsize = swap32(dlp->d_bbsize); - dlp->d_sbsize = swap32(dlp->d_sbsize); for (i = 0; i < MAXPARTITIONS; i++) { pp = &dlp->d_partitions[i]; diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 6761f2ba9d8..7307f2d912c 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.265 2022/01/11 23:10:11 jsg Exp $ */ +/* $OpenBSD: cd.c,v 1.266 2022/09/01 13:45:27 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -1134,10 +1134,6 @@ cdgetdisklabel(dev_t dev, struct cd_softc *sc, struct disklabel *lp, DL_SETDSIZE(lp, sc->params.disksize); lp->d_version = 1; - /* XXX - these values for BBSIZE and SBSIZE assume ffs */ - lp->d_bbsize = BBSIZE; - lp->d_sbsize = SBSIZE; - lp->d_magic = DISKMAGIC; lp->d_magic2 = DISKMAGIC; lp->d_checksum = dkcksum(lp); diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 7e5570fb9b2..5d7f9db7c2a 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.331 2022/02/27 02:27:55 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.332 2022/09/01 13:45:27 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -1147,10 +1147,6 @@ sdgetdisklabel(dev_t dev, struct sd_softc *sc, struct disklabel *lp, lp->d_version = 1; lp->d_flags = 0; - /* XXX - These values for BBSIZE and SBSIZE assume ffs. */ - lp->d_bbsize = BBSIZE; - lp->d_sbsize = SBSIZE; - lp->d_magic = DISKMAGIC; lp->d_magic2 = DISKMAGIC; lp->d_checksum = dkcksum(lp); -- 2.20.1