From a9c837d8ef573604328e4cb61e2e0cab61bba319 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 15 Jan 2015 12:26:44 +0100 Subject: tests/multiboot: Add test for modules This test case is meant to detect corruptions of the Multiboot modules as well as the multiboot modules list and the module command lines. Signed-off-by: Kevin Wolf Signed-off-by: Paolo Bonzini --- tests/multiboot/libc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/multiboot/libc.c') diff --git a/tests/multiboot/libc.c b/tests/multiboot/libc.c index 05abbd92cc..6df9bda96d 100644 --- a/tests/multiboot/libc.c +++ b/tests/multiboot/libc.c @@ -22,6 +22,18 @@ #include "libc.h" +void* memcpy(void *dest, const void *src, int n) +{ + char *d = dest; + const char *s = src; + + while (n--) { + *d++ = *s++; + } + + return dest; +} + static void print_char(char c) { outb(0xe9, c); -- cgit 1.4.1