summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1997-01-16 05:27:10 +0000
committerkato <kato@FreeBSD.org>1997-01-16 05:27:10 +0000
commitd563ee430038bb7ef6dbf1400987da34b51d1068 (patch)
tree56f7e8f9d559cf6fc9900c4fdfeba099232a7d64
parent52f682b5823b83f1e906f18c5e969ef07a70b8f9 (diff)
downloadFreeBSD-src-d563ee430038bb7ef6dbf1400987da34b51d1068.zip
FreeBSD-src-d563ee430038bb7ef6dbf1400987da34b51d1068.tar.gz
Re-enable ds_subtype, and ds_name (included in #ifdef PC98).
Userland programs which access partition information require ds_subtype and ds_name on PC98.
-rw-r--r--sys/pc98/pc98/diskslice_machdep.c6
-rw-r--r--sys/sys/diskslice.h8
2 files changed, 14 insertions, 0 deletions
diff --git a/sys/pc98/pc98/diskslice_machdep.c b/sys/pc98/pc98/diskslice_machdep.c
index ba1fbdd..aad0167 100644
--- a/sys/pc98/pc98/diskslice_machdep.c
+++ b/sys/pc98/pc98/diskslice_machdep.c
@@ -300,6 +300,7 @@ reread_mbr:
sp->ds_offset = 0;
sp->ds_size = lp->d_secperunit;
sp->ds_type = DOSPTYP_386BSD;
+ sp->ds_subtype = 0xc4;
error = 0;
ssp->dss_nslices = BASE_SLICE + 1;
goto done;
@@ -329,6 +330,7 @@ reread_mbr:
sp->ds_offset = 0;
sp->ds_size = lp->d_secperunit;
sp->ds_type = 0xa0; /* XXX */
+ sp->ds_subtype = 0x81; /* XXX */
error = 0;
ssp->dss_nslices = BASE_SLICE + 1;
goto done;
@@ -491,6 +493,8 @@ reread_mbr:
sp->ds_offset = pc98_start;
sp->ds_size = pc98_size;
sp->ds_type = dp->dp_mid;
+ sp->ds_subtype = dp->dp_sid;
+ strncpy(sp->ds_name, dp->dp_name, 16);
#else
sp->ds_offset = mbr_offset + dp->dp_start;
sp->ds_size = dp->dp_size;
@@ -627,6 +631,8 @@ extended(dname, dev, strat, lp, ssp, ext_offset, ext_size, base_ext_offset,
sp->ds_offset = ext_offset + pc98_start;
sp->ds_size = pc98_size;
sp->ds_type = dp->dp_mid;
+ sp->ds_subtype = dp->dp_sid;
+ strncpy(sp->ds_name, dp->dp_name, 16);
#else
sp->ds_offset = ext_offset + dp->dp_start;
sp->ds_size = dp->dp_size;
diff --git a/sys/sys/diskslice.h b/sys/sys/diskslice.h
index 8f42250..0dbeb03 100644
--- a/sys/sys/diskslice.h
+++ b/sys/sys/diskslice.h
@@ -47,6 +47,10 @@ struct diskslice {
u_long ds_offset; /* starting sector */
u_long ds_size; /* number of sectors */
int ds_type; /* (foreign) slice type */
+#ifdef PC98
+ int ds_subtype; /* sub slice type */
+ u_char ds_name[16]; /* slice name */
+#endif
struct dkbad_intern *ds_bad; /* bad sector table, if any */
struct disklabel *ds_label; /* BSD label, if any */
void *ds_bdev; /* devfs token for whole slice */
@@ -84,6 +88,10 @@ struct diskslice {
u_long ds_offset; /* starting sector */
u_long ds_size; /* number of sectors */
int ds_type; /* (foreign) slice type */
+#ifdef PC98
+ int ds_subtype; /* sub slice type */
+ u_char ds_name[16]; /* slice name */
+#endif
struct dkbad_intern *ds_bad; /* bad sector table, if any */
void *ds_date; /* Slice type specific data */
struct slice_switch *switch; /* switch table for type handler */
OpenPOWER on IntegriCloud