From 0397475dceed1bbc11c572b9ec97d9a0142eedab Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 25 Apr 1998 00:38:17 +0000 Subject: set d_bbsize and d_sbsize in spoofed label to values correct for ffs --- sys/arch/hp300/dev/hd.c | 8 +++++++- sys/arch/hp300/dev/sd.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c index 094cd9a7532..71514571b0e 100644 --- a/sys/arch/hp300/dev/hd.c +++ b/sys/arch/hp300/dev/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.7 1998/03/27 08:37:06 millert Exp $ */ +/* $OpenBSD: hd.c,v 1.8 1998/04/25 00:38:16 millert Exp $ */ /* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */ /* @@ -60,6 +60,8 @@ #include #include +#include /* for BBSIZE and SBSIZE */ + #include #include @@ -503,6 +505,10 @@ hdgetinfo(dev) } lp->d_secpercyl = lp->d_nsectors * lp->d_ntracks; + /* XXX - these values for BBSIZE and SBSIZE assume ffs */ + lp->d_bbsize = BBSIZE; + lp->d_sbsize = SBSIZE; + lp->d_partitions[RAW_PART].p_offset = 0; lp->d_partitions[RAW_PART].p_size = lp->d_secperunit * (lp->d_secsize / DEV_BSIZE); diff --git a/sys/arch/hp300/dev/sd.c b/sys/arch/hp300/dev/sd.c index 243ff2cea04..78de6345edb 100644 --- a/sys/arch/hp300/dev/sd.c +++ b/sys/arch/hp300/dev/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.14 1998/03/27 07:47:54 millert Exp $ */ +/* $OpenBSD: sd.c,v 1.15 1998/04/25 00:38:15 millert Exp $ */ /* $NetBSD: sd.c,v 1.34 1997/07/10 18:14:10 kleink Exp $ */ /* @@ -56,6 +56,8 @@ #include #include +#include /* for BBSIZE and SBSIZE */ + #include #include #include @@ -465,6 +467,10 @@ sdgetinfo(dev) lp->d_rpm = 3600; lp->d_interleave = 1; + /* XXX - these values for BBSIZE and SBSIZE assume ffs */ + lp->d_bbsize = BBSIZE; + lp->d_sbsize = SBSIZE; + lp->d_partitions[RAW_PART].p_offset = 0; lp->d_partitions[RAW_PART].p_size = lp->d_secperunit * (lp->d_secsize / DEV_BSIZE); -- cgit v1.2.3