diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-01-13 20:40:12 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-01-13 20:40:12 +0000 |
commit | 1e45c64b65cfc1d0618a813e4fe2d8b60493d13c (patch) | |
tree | 2b768323aab782c4443e3a84306f4843483735e9 /sys | |
parent | c5dc93f680ab42a4a7f64c3d127ff3153228b8c2 (diff) |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/dev/xd.c | 3 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xy.c | 3 |
2 files changed, 4 insertions, 2 deletions
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; |