aboutsummaryrefslogtreecommitdiff
path: root/tests/multiboot/libc.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2015-01-15 12:26:44 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2015-01-26 12:22:44 +0100
commita9c837d8ef573604328e4cb61e2e0cab61bba319 (patch)
tree66a689677af80520b3918608162a897466c68bbe /tests/multiboot/libc.c
parentb4168498f613db3d908909106146001a9279e732 (diff)
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 <kwolf@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/multiboot/libc.c')
-rw-r--r--tests/multiboot/libc.c12
1 files changed, 12 insertions, 0 deletions
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);