From: miod Date: Tue, 13 Jan 2015 20:40:11 +0000 (+0000) Subject: Initialize d_type to DTYPE_SMD in the default label to avoid disklabel(8) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0532a46636b856485187ee6b4864f86bda800705;p=openbsd Initialize d_type to DTYPE_SMD in the default label to avoid disklabel(8) asking for the device type upon labeling a freshly formatted disk. --- diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c index 4f52ccdc865..0d4153f81f0 100644 --- a/sys/arch/sparc/dev/xd.c +++ b/sys/arch/sparc/dev/xd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xd.c,v 1.63 2015/01/12 21:31:06 miod Exp $ */ +/* $OpenBSD: xd.c,v 1.64 2015/01/13 20:40:11 miod Exp $ */ /* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */ /* @@ -298,6 +298,7 @@ xdgetdisklabel(xd, b) } else { lp->d_secpercyl = 1; } + lp->d_type = DTYPE_SMD; /* We already have the label data in `b'; setup for dummy strategy */ xd_labeldata = b; diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c index 23a91269da3..541efc53b1f 100644 --- a/sys/arch/sparc/dev/xy.c +++ b/sys/arch/sparc/dev/xy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xy.c,v 1.60 2015/01/12 21:31:06 miod Exp $ */ +/* $OpenBSD: xy.c,v 1.61 2015/01/13 20:40:11 miod Exp $ */ /* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */ /* @@ -236,6 +236,7 @@ xygetdisklabel(xy, b) } else { lp->d_secpercyl = 1; } + lp->d_type = DTYPE_SMD; /* We already have the label data in `b'; setup for dummy strategy */ xy_labeldata = b;