diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2011-10-21 13:08:02 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2011-10-21 13:08:02 +0000 |
commit | 8d9d22d6c19c8cf59c3f965a935e8eb23c7540d4 (patch) | |
tree | 0f83b04c98e8dad30490922d9044381f736e16f4 /sys/arch | |
parent | 05cbbe7e8aedafd6356031f2fc988f62fc232ba0 (diff) |
Copy the DUID back and forth between the in-core label and the Motorola VID
block by using 8 unused bytes from the configuration substruct.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/mvme68k/mvme68k/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/disksubr.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/mvme68k/mvme68k/disksubr.c b/sys/arch/mvme68k/mvme68k/disksubr.c index f585eb33427..a31bfabe25d 100644 --- a/sys/arch/mvme68k/mvme68k/disksubr.c +++ b/sys/arch/mvme68k/mvme68k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.72 2011/04/16 03:21:15 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.73 2011/10/21 13:08:01 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -136,7 +136,7 @@ done: void bsdtocpulabel(struct disklabel *lp, struct mvmedisklabel *clp) { - char *tmot = "MOTOROLA", *id = "M68K", *mot; + char *tmot = "MOTOROLA", *id = "M88K", *mot; int i; u_short osa_u, osa_l, osl; u_int oss; @@ -187,6 +187,7 @@ bsdtocpulabel(struct disklabel *lp, struct mvmedisklabel *clp) bcopy(&lp->d_partitions[0], clp->vid_4, sizeof(struct partition) * 4); bcopy(&lp->d_partitions[4], clp->cfg_4, sizeof(struct partition) * 12); clp->version = 2; + bcopy(&lp->d_uid, clp->vid_4_1, sizeof(lp->d_uid)); /* Put "MOTOROLA" in the VID. This makes it a valid boot disk. */ for (mot = clp->vid_mot, i = 0; i < 8; i++) @@ -232,6 +233,7 @@ cputobsdlabel(struct disklabel *lp, struct mvmedisklabel *clp) bcopy(clp->vid_4, &lp->d_partitions[0], sizeof(struct partition) * 4); bcopy(clp->cfg_4, &lp->d_partitions[4], sizeof(struct partition) * 12); + bcopy(clp->vid_4_1, &lp->d_uid, sizeof(lp->d_uid)); if (clp->version < 2) { struct __partitionv0 *v0pp = (struct __partitionv0 *)lp->d_partitions; diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c index ca8f43b0648..ccda86a9303 100644 --- a/sys/arch/mvme88k/mvme88k/disksubr.c +++ b/sys/arch/mvme88k/mvme88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.68 2011/04/16 03:21:15 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.69 2011/10/21 13:08:01 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -187,6 +187,7 @@ bsdtocpulabel(struct disklabel *lp, struct mvmedisklabel *clp) bcopy(&lp->d_partitions[0], clp->vid_4, sizeof(struct partition) * 4); bcopy(&lp->d_partitions[4], clp->cfg_4, sizeof(struct partition) * 12); clp->version = 2; + bcopy(&lp->d_uid, clp->vid_4_1, sizeof(lp->d_uid)); /* Put "MOTOROLA" in the VID. This makes it a valid boot disk. */ for (mot = clp->vid_mot, i = 0; i < 8; i++) @@ -232,6 +233,7 @@ cputobsdlabel(struct disklabel *lp, struct mvmedisklabel *clp) bcopy(clp->vid_4, &lp->d_partitions[0], sizeof(struct partition) * 4); bcopy(clp->cfg_4, &lp->d_partitions[4], sizeof(struct partition) * 12); + bcopy(clp->vid_4_1, &lp->d_uid, sizeof(lp->d_uid)); if (clp->version < 2) { struct __partitionv0 *v0pp = (struct __partitionv0 *)lp->d_partitions; |