summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libkvm/kvm.c6
-rw-r--r--share/mk/bsd.kern.mk6
-rw-r--r--sys/i386/boot/biosboot/bios.S26
-rw-r--r--sys/i386/boot/netboot/start2.S4
4 files changed, 35 insertions, 7 deletions
diff --git a/lib/libkvm/kvm.c b/lib/libkvm/kvm.c
index 3c95b855c2b3..a2ea42aba9b7 100644
--- a/lib/libkvm/kvm.c
+++ b/lib/libkvm/kvm.c
@@ -155,9 +155,9 @@ _kvm_malloc(kd, n)
{
void *p;
- if ((p = malloc(n)) == NULL)
- _kvm_err(kd, kd->program, strerror(errno));
- memset(p, 0, n);
+ if ((p = calloc(n, sizeof(char))) == NULL)
+ _kvm_err(kd, kd->program, "can't allocate %u bytes: %s",
+ n, strerror(errno));
return (p);
}
diff --git a/share/mk/bsd.kern.mk b/share/mk/bsd.kern.mk
index d6c5eaf80c68..8aac1112fc33 100644
--- a/share/mk/bsd.kern.mk
+++ b/share/mk/bsd.kern.mk
@@ -1,11 +1,11 @@
-# $Id: bsd.kern.mk,v 1.1 1996/10/08 22:10:49 bde Exp $
+# $Id: bsd.kern.mk,v 1.2 1996/10/09 18:41:40 bde Exp $
#
# Warning flags for compiling the kernel and components of the kernel.
#
-CWARNFLAGS?= -W -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit \
+CWARNFLAGS?= -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit \
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes \
- -Winline -Wpointer-arith # -Wunused -Wcast-qual
+ -Wpointer-arith # -W -Winline -Wunused -Wcast-qual
#
# The following flags are next up for working on:
# -Wformat -Wall
diff --git a/sys/i386/boot/biosboot/bios.S b/sys/i386/boot/biosboot/bios.S
index 3a45e8587e67..a3ff7e2c5e39 100644
--- a/sys/i386/boot/biosboot/bios.S
+++ b/sys/i386/boot/biosboot/bios.S
@@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:34:26 rpd
- * $Id: bios.S,v 1.4 1994/11/18 05:02:12 phk Exp $
+ * $Id: bios.S,v 1.5 1995/09/03 05:36:13 julian Exp $
*/
/*
@@ -75,6 +75,8 @@ ENTRY(biosread)
mov %esp, %ebp
push %ebx
+ push %esi
+ push %edi
push %ecx
push %edx
push %es
@@ -112,6 +114,8 @@ ENTRY(biosread)
pop %es
pop %edx
pop %ecx
+ pop %edi
+ pop %esi
pop %ebx
pop %ebp
@@ -132,6 +136,8 @@ ENTRY(putc)
push %ebp
mov %esp, %ebp
push %ebx
+ push %esi
+ push %edi
push %ecx
movb 0x8(%ebp), %cl
@@ -150,6 +156,8 @@ ENTRY(putc)
call EXT(real_to_prot)
pop %ecx
+ pop %edi
+ pop %esi
pop %ebx
pop %ebp
ret
@@ -167,6 +175,8 @@ ENTRY(getc)
push %ebp
mov %esp, %ebp
push %ebx /* save %ebx */
+ push %esi
+ push %edi
call EXT(prot_to_real)
@@ -183,6 +193,8 @@ ENTRY(getc)
xor %eax, %eax
movb %bl, %al
+ pop %edi
+ pop %esi
pop %ebx
pop %ebp
ret
@@ -203,6 +215,8 @@ ENTRY(ischar)
push %ebp
mov %esp, %ebp
push %ebx
+ push %esi
+ push %edi
call EXT(prot_to_real) /* enter real mode */
@@ -222,6 +236,8 @@ nochar:
xor %eax, %eax
movb %bl, %al
+ pop %edi
+ pop %esi
pop %ebx
pop %ebp
ret
@@ -238,6 +254,8 @@ ENTRY(get_diskinfo)
mov %esp, %ebp
push %es
push %ebx
+ push %esi
+ push %edi
push %ecx
push %edx
@@ -290,6 +308,8 @@ ok:
pop %edx
pop %ecx
+ pop %edi
+ pop %esi
pop %ebx
pop %es
pop %ebp
@@ -309,6 +329,8 @@ ENTRY(memsize)
push %ebp
mov %esp, %ebp
push %ebx
+ push %esi
+ push %edi
mov 8(%ebp), %ebx
@@ -336,6 +358,8 @@ xdone:
call EXT(real_to_prot)
mov %ebx, %eax
+ pop %edi
+ pop %esi
pop %ebx
pop %ebp
ret
diff --git a/sys/i386/boot/netboot/start2.S b/sys/i386/boot/netboot/start2.S
index 00a37a3f1e80..6d0d1134ca42 100644
--- a/sys/i386/boot/netboot/start2.S
+++ b/sys/i386/boot/netboot/start2.S
@@ -340,6 +340,8 @@ _get_diskinfo:
mov %esp, %ebp
push %es
push %ebx
+ push %esi
+ push %edi
push %ecx
push %edx
@@ -392,6 +394,8 @@ ok:
pop %edx
pop %ecx
+ pop %edi
+ pop %esi
pop %ebx
pop %es
pop %ebp