diff options
author | sbruno <sbruno@FreeBSD.org> | 2014-07-22 04:47:19 +0000 |
---|---|---|
committer | sbruno <sbruno@FreeBSD.org> | 2014-07-22 04:47:19 +0000 |
commit | 24f74ef8035b94d6468332d64de211feb44d5b7d (patch) | |
tree | 6f11f6ac9f64f583e545975a944a3fae9d39609a /sys/boot/userboot | |
parent | e4173984103481ac44dfb2d46f374c6be0d5d6f9 (diff) | |
download | FreeBSD-src-24f74ef8035b94d6468332d64de211feb44d5b7d.zip FreeBSD-src-24f74ef8035b94d6468332d64de211feb44d5b7d.tar.gz |
copyin/copyout should return 0 if they are truly emulating copyin/copyout behavior.
remove stray %s in printf
rewrite printf to display 64bit type without warning.
Diffstat (limited to 'sys/boot/userboot')
-rw-r--r-- | sys/boot/userboot/test/test.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/boot/userboot/test/test.c b/sys/boot/userboot/test/test.c index 36258a7..d7ec3e4 100644 --- a/sys/boot/userboot/test/test.c +++ b/sys/boot/userboot/test/test.c @@ -36,6 +36,7 @@ #include <errno.h> #include <fcntl.h> #include <getopt.h> +#include <inttypes.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> @@ -292,6 +293,7 @@ test_copyin(void *arg, const void *from, uint64_t to, size_t size) if (to + size > image_size) size = image_size - to; memcpy(&image[to], from, size); + return(0); } int @@ -304,6 +306,7 @@ test_copyout(void *arg, uint64_t from, void *to, size_t size) if (from + size > image_size) size = image_size - from; memcpy(to, &image[from], size); + return(0); } void @@ -333,7 +336,7 @@ test_setgdt(void *arg, uint64_t v, size_t sz) void test_exec(void *arg, uint64_t pc) { - printf("Execute at 0x%llx\n", pc); + printf("Execute at 0x%"PRIu64"\n", pc); test_exit(arg, 0); } @@ -411,7 +414,7 @@ void usage() { - printf("usage: %s [-d <disk image path>] [-h <host filesystem path>\n"); + printf("usage: [-d <disk image path>] [-h <host filesystem path>\n"); exit(1); } |