diff options
Diffstat (limited to 'package/aboot/src/lib/memcpy.c')
-rw-r--r-- | package/aboot/src/lib/memcpy.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/package/aboot/src/lib/memcpy.c b/package/aboot/src/lib/memcpy.c new file mode 100644 index 000000000..38fd642ab --- /dev/null +++ b/package/aboot/src/lib/memcpy.c @@ -0,0 +1,23 @@ +/* + * aboot/lib/memcpy.c + * + * Copyright (c) 1995 David Mosberger (davidm@cs.arizona.edu) + */ +#include <linux/types.h> +#include <stddef.h> + +/* + * Booting is I/O bound so rather than a time-optimized, we want + * a space-optimized memcpy. Not that the rest of the loader + * were particularly small, though... + */ +void *__memcpy(void *dest, const void *source, size_t n) +{ + char *dst = dest; + const char *src = source; + + while (n--) { + *dst++ = *src++; + } + return dest; +} |