Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jul 2014 04:47:20 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r268978 - head/sys/boot/userboot/test
Message-ID:  <201407220447.s6M4lKVJ052016@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Tue Jul 22 04:47:19 2014
New Revision: 268978
URL: http://svnweb.freebsd.org/changeset/base/268978

Log:
  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.

Modified:
  head/sys/boot/userboot/test/test.c

Modified: head/sys/boot/userboot/test/test.c
==============================================================================
--- head/sys/boot/userboot/test/test.c	Tue Jul 22 04:39:32 2014	(r268977)
+++ head/sys/boot/userboot/test/test.c	Tue Jul 22 04:47:19 2014	(r268978)
@@ -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,
 	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, v
 	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_
 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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407220447.s6M4lKVJ052016>