From ffa0bc214ffb06221e5c6f8376f6a1ab07b83468 Mon Sep 17 00:00:00 2001
From: Julien Grall <julien.grall@linaro.org>
Date: Tue, 14 Jan 2014 01:41:18 +0000
Subject: [PATCH 06/48] xen/hypercall: Allow HYPERVISOR_console_write to take a
 const string

The hypercall console write won't modify the string. It's safe to put a const
here.
---
 sys/amd64/include/xen/hypercall.h | 2 +-
 sys/i386/include/xen/hypercall.h  | 2 +-
 sys/xen/hypervisor.h              | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/amd64/include/xen/hypercall.h b/sys/amd64/include/xen/hypercall.h
index 4ed0cdb..600adf7 100644
--- a/sys/amd64/include/xen/hypercall.h
+++ b/sys/amd64/include/xen/hypercall.h
@@ -308,7 +308,7 @@ HYPERVISOR_xen_version(
 
 static inline int __must_check
 HYPERVISOR_console_io(
-	int cmd, unsigned int count, char *str)
+	int cmd, unsigned int count, const char *str)
 {
 	return _hypercall3(int, console_io, cmd, count, str);
 }
diff --git a/sys/i386/include/xen/hypercall.h b/sys/i386/include/xen/hypercall.h
index f90b26d..59ef4ff 100644
--- a/sys/i386/include/xen/hypercall.h
+++ b/sys/i386/include/xen/hypercall.h
@@ -299,7 +299,7 @@ HYPERVISOR_xen_version(
 
 static inline int
 HYPERVISOR_console_io(
-	int cmd, int count, char *str)
+	int cmd, int count, const char *str)
 {
 	return _hypercall3(int, console_io, cmd, count, str);
 }
diff --git a/sys/xen/hypervisor.h b/sys/xen/hypervisor.h
index fe83496..96e5582 100644
--- a/sys/xen/hypervisor.h
+++ b/sys/xen/hypervisor.h
@@ -55,7 +55,7 @@
 extern uint64_t get_system_time(int ticks);
 
 static inline int 
-HYPERVISOR_console_write(char *str, int count)
+HYPERVISOR_console_write(const char *str, int count)
 {
     return HYPERVISOR_console_io(CONSOLEIO_write, count, str); 
 }
-- 
2.1.0

