Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/sysinst/arch/i386 Use get_bootmodel in amd64 a...
details: https://anonhg.NetBSD.org/src/rev/fcdded922e56
branches: trunk
changeset: 551186:fcdded922e56
user: fvdl <fvdl%NetBSD.org@localhost>
date: Sun Aug 31 16:41:53 2003 +0000
description:
Use get_bootmodel in amd64 after all, but have it return GENERIC all
the time, otherwise we're left without an installed kernel.
diffstat:
distrib/utils/sysinst/arch/i386/md.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diffs (53 lines):
diff -r 14a4548a8b9a -r fcdded922e56 distrib/utils/sysinst/arch/i386/md.c
--- a/distrib/utils/sysinst/arch/i386/md.c Sun Aug 31 16:41:41 2003 +0000
+++ b/distrib/utils/sysinst/arch/i386/md.c Sun Aug 31 16:41:53 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.95 2003/08/30 17:12:49 fvdl Exp $ */
+/* $NetBSD: md.c,v 1.96 2003/08/31 16:41:53 fvdl Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -67,9 +67,7 @@
static int mbr_root_above_chs(void);
static void md_upgrade_mbrtype(void);
static int md_read_bootcode(const char *, mbr_sector_t *);
-#if defined(__i386__)
static unsigned int get_bootmodel(void);
-#endif
int
@@ -578,10 +576,10 @@
return ptstart + DEFROOTSIZE * (MEG / 512) >= bcyl * bhead * bsec;
}
-#if defined(__i386__)
unsigned int
get_bootmodel(void)
{
+#if defined(__i386__)
struct utsname ut;
#ifdef DEBUG
char *envstr;
@@ -600,19 +598,16 @@
return SET_KERNEL_LAPTOP;
if (strstr(ut.version, "PS2") != NULL)
return SET_KERNEL_PS2;
+#endif
return SET_KERNEL_GENERIC;
}
-#endif
void
md_init(void)
{
/* Default to install same type of kernel as we are running */
- sets_selected = (sets_selected & ~SET_KERNEL);
-#if defined(__i386)
- sets_selected |= get_bootmodel();
-#endif
+ sets_selected = (sets_selected & ~SET_KERNEL) | get_bootmodel();
}
void
Home |
Main Index |
Thread Index |
Old Index