summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand/libsa/apmprobe.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-18 07:40:04 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-04-18 07:40:04 +0000
commit888b63e1743ef4b4277b88169301e0b5c1445e16 (patch)
tree5b9d1c51879f3e1f909c17e6ec7c2f6050ac92e1 /sys/arch/i386/stand/libsa/apmprobe.c
parentc2ee71fae9cec63f4a94c921619dc28d1c5b5032 (diff)
i386 bootblocks that work for 2.3. A tale too long to tell
Diffstat (limited to 'sys/arch/i386/stand/libsa/apmprobe.c')
-rw-r--r--sys/arch/i386/stand/libsa/apmprobe.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/sys/arch/i386/stand/libsa/apmprobe.c b/sys/arch/i386/stand/libsa/apmprobe.c
index aee1192594c..049c503f8f1 100644
--- a/sys/arch/i386/stand/libsa/apmprobe.c
+++ b/sys/arch/i386/stand/libsa/apmprobe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmprobe.c,v 1.4 1998/02/24 22:06:44 weingart Exp $ */
+/* $OpenBSD: apmprobe.c,v 1.5 1998/04/18 07:39:40 deraadt Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -62,6 +62,8 @@
#include <machine/biosvar.h>
#include "debug.h"
+extern int debug;
+
static __inline u_int
apm_check()
{
@@ -77,8 +79,9 @@ apm_check()
: "%ecx", "cc");
if (f || BIOS_regs.biosr_bx != 0x504d /* "PM" */ ) {
#ifdef DEBUG
- printf("apm_check: %x, %x, %x\n",
- f, BIOS_regs.biosr_bx, detail);
+ if (debug)
+ printf("apm_check: %x, %x, %x\n",
+ f, BIOS_regs.biosr_bx, detail);
#endif
return 0;
} else
@@ -136,11 +139,14 @@ apmprobe()
if (apm_connect(&ai) != 0)
printf(": connect error\n");
#ifdef DEBUG
- printf(": %x text=%x/%x[%x] data=%x[%x] @ %x",
- ai.apm_detail, ai.apm_code32_base,
- ai.apm_code16_base, ai.apm_code_len,
- ai.apm_data_base, ai.apm_data_len,
- ai.apm_entry);
+ if (debug)
+ printf(": %x text=%x/%x[%x] data=%x[%x] @ %x",
+ ai.apm_detail, ai.apm_code32_base,
+ ai.apm_code16_base, ai.apm_code_len,
+ ai.apm_data_base, ai.apm_data_len,
+ ai.apm_entry);
+ else
+ printf(" apm");
#else
printf(" apm");
#endif