From 9b46f7e8b6445b2f0cbac0414d824063ae6a5bd9 Mon Sep 17 00:00:00 2001 From: krw Date: Sun, 23 Oct 2022 19:33:39 +0000 Subject: [PATCH] bzero(disklabel) or memset(disklabel,0) should be enough for anyone. No need to also set d_flags to 0. --- sys/arch/octeon/dev/amdcf.c | 3 +-- sys/arch/octeon/dev/octcf.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/arch/octeon/dev/amdcf.c b/sys/arch/octeon/dev/amdcf.c index f3053f19d9a..35a60f03fb4 100644 --- a/sys/arch/octeon/dev/amdcf.c +++ b/sys/arch/octeon/dev/amdcf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdcf.c,v 1.8 2022/04/06 18:59:26 naddy Exp $ */ +/* $OpenBSD: amdcf.c,v 1.9 2022/10/23 19:33:39 krw Exp $ */ /* * Copyright (c) 2007, Juniper Networks, Inc. @@ -381,7 +381,6 @@ amdcfgetdisklabel(dev_t dev, struct amdcf_softc *sc, struct disklabel *lp, lp->d_type = DTYPE_SCSI; /* bogus type, can be anything */ strlcpy(lp->d_packname, "CFI Disk", sizeof(lp->d_packname)); DL_SETDSIZE(lp, sc->sc_size / DEV_BSIZE); - lp->d_flags = 0; lp->d_version = 1; lp->d_magic = DISKMAGIC; diff --git a/sys/arch/octeon/dev/octcf.c b/sys/arch/octeon/dev/octcf.c index de167f8b5ae..002d82d07c6 100644 --- a/sys/arch/octeon/dev/octcf.c +++ b/sys/arch/octeon/dev/octcf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octcf.c,v 1.34 2022/04/06 18:59:27 naddy Exp $ */ +/* $OpenBSD: octcf.c,v 1.35 2022/10/23 19:33:39 krw Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -515,7 +515,6 @@ octcfgetdefaultlabel(struct octcf_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; -- 2.20.1