summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2012-01-11 15:58:28 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2012-01-11 15:58:28 +0000
commit6197367c137a215724dd315746c755ba177ff4a4 (patch)
tree868e766ddb397dead0edabb136ecb56b6ee6494c /sys/arch/i386
parent1ac26851e24ca3e562863b7739118f287b80b8d1 (diff)
Pass the DUID of the boot disk via bootduid instead of rootduid, since it
is the DUID that we booted from, which is not always going to be the same as the DUID that we mount root on.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/bios.c10
-rw-r--r--sys/arch/i386/include/biosvar.h8
-rw-r--r--sys/arch/i386/stand/libsa/exec_i386.c8
3 files changed, 13 insertions, 13 deletions
diff --git a/sys/arch/i386/i386/bios.c b/sys/arch/i386/i386/bios.c
index cc54dfd2fef..b03d59ee888 100644
--- a/sys/arch/i386/i386/bios.c
+++ b/sys/arch/i386/i386/bios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bios.c,v 1.90 2011/04/26 17:33:17 jsing Exp $ */
+/* $OpenBSD: bios.c,v 1.91 2012/01/11 15:58:27 jsing Exp $ */
/*
* Copyright (c) 1997-2001 Michael Shalayeff
@@ -455,7 +455,7 @@ bios_getopt()
{
bootarg_t *q;
bios_ddb_t *bios_ddb;
- bios_rootduid_t *bios_rootduid;
+ bios_bootduid_t *bios_bootduid;
#ifdef BIOS_DEBUG
printf("bootargv:");
@@ -541,9 +541,9 @@ bios_getopt()
#endif
break;
- case BOOTARG_ROOTDUID:
- bios_rootduid = (bios_rootduid_t *)q->ba_arg;
- bcopy(bios_rootduid, rootduid, sizeof(rootduid));
+ case BOOTARG_BOOTDUID:
+ bios_bootduid = (bios_bootduid_t *)q->ba_arg;
+ bcopy(bios_bootduid, bootduid, sizeof(bootduid));
break;
default:
diff --git a/sys/arch/i386/include/biosvar.h b/sys/arch/i386/include/biosvar.h
index b70de861afc..11a9c900d58 100644
--- a/sys/arch/i386/include/biosvar.h
+++ b/sys/arch/i386/include/biosvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosvar.h,v 1.56 2011/04/26 17:33:17 jsing Exp $ */
+/* $OpenBSD: biosvar.h,v 1.57 2012/01/11 15:58:27 jsing Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -210,10 +210,10 @@ typedef struct _bios_ddb {
int db_console;
} __packed bios_ddb_t;
-#define BOOTARG_ROOTDUID 9
-typedef struct _bios_rootduid {
+#define BOOTARG_BOOTDUID 9
+typedef struct _bios_bootduid {
u_char duid[8];
-} __packed bios_rootduid_t;
+} __packed bios_bootduid_t;
#if defined(_KERNEL) || defined (_STANDALONE)
diff --git a/sys/arch/i386/stand/libsa/exec_i386.c b/sys/arch/i386/stand/libsa/exec_i386.c
index 80af47dfbc1..cad431225be 100644
--- a/sys/arch/i386/stand/libsa/exec_i386.c
+++ b/sys/arch/i386/stand/libsa/exec_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_i386.c,v 1.34 2011/04/26 17:33:17 jsing Exp $ */
+/* $OpenBSD: exec_i386.c,v 1.35 2012/01/11 15:58:27 jsing Exp $ */
/*
* Copyright (c) 1997-1998 Michael Shalayeff
@@ -54,7 +54,7 @@ run_loadfile(u_long *marks, int howto)
extern int com_speed; /* from bioscons.c */
bios_ddb_t ddb;
extern int db_console;
- bios_rootduid_t rootduid;
+ bios_bootduid_t bootduid;
if (sa_cleanup != NULL)
(*sa_cleanup)();
@@ -71,8 +71,8 @@ run_loadfile(u_long *marks, int howto)
addbootarg(BOOTARG_DDB, sizeof(ddb), &ddb);
}
- bcopy(bootdev_dip->disklabel.d_uid, &rootduid.duid, sizeof(rootduid));
- addbootarg(BOOTARG_ROOTDUID, sizeof(rootduid), &rootduid);
+ bcopy(bootdev_dip->disklabel.d_uid, &bootduid.duid, sizeof(bootduid));
+ addbootarg(BOOTARG_BOOTDUID, sizeof(bootduid), &bootduid);
/* Pass memory map to the kernel */
mem_pass();