From cb529a4b0f7cd2597c11e49dfd1b5172cfe23a01 Mon Sep 17 00:00:00 2001 From: krw Date: Sun, 23 Oct 2022 14:39:19 +0000 Subject: [PATCH] bzero(disklabel) or memset(disklabel,0) should be enough for anyone. No need to also set d_flags to 0. --- sys/dev/ata/wd.c | 3 +-- sys/dev/vnd.c | 3 +-- sys/scsi/sd.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index feefe5c61cd..6a89ea34d18 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.129 2022/04/06 18:59:27 naddy Exp $ */ +/* $OpenBSD: wd.c,v 1.130 2022/10/23 14:39:19 krw Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -728,7 +728,6 @@ wdgetdefaultlabel(struct wd_softc *wd, struct disklabel *lp) } /* XXX - user viscopy() like sd.c */ strncpy(lp->d_packname, wd->sc_params.atap_model, sizeof lp->d_packname); - lp->d_flags = 0; lp->d_version = 1; lp->d_magic = DISKMAGIC; diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 0834feecdf7..4d865d3b187 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.178 2022/09/01 12:28:53 deraadt Exp $ */ +/* $OpenBSD: vnd.c,v 1.179 2022/10/23 14:39:19 krw Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -227,7 +227,6 @@ vndgetdisklabel(dev_t dev, struct vnd_softc *sc, struct disklabel *lp, lp->d_type = DTYPE_VND; strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname)); DL_SETDSIZE(lp, sc->sc_size); - lp->d_flags = 0; lp->d_version = 1; lp->d_magic = DISKMAGIC; diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 5d7f9db7c2a..d697de784a8 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.332 2022/09/01 13:45:27 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.333 2022/10/23 14:39:19 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -1145,7 +1145,6 @@ sdgetdisklabel(dev_t dev, struct sd_softc *sc, struct disklabel *lp, DL_SETDSIZE(lp, sc->params.disksize); lp->d_version = 1; - lp->d_flags = 0; lp->d_magic = DISKMAGIC; lp->d_magic2 = DISKMAGIC; -- 2.20.1