]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
xen/hypercall: Allow HYPERVISOR_console_write to take a const string
authorJulien Grall <julien.grall@linaro.org>
Tue, 14 Jan 2014 01:41:18 +0000 (01:41 +0000)
committerJulien Grall <julien.grall@linaro.org>
Sun, 12 Apr 2015 11:08:01 +0000 (12:08 +0100)
The hypercall console write won't modify the string. It's safe to put a const
here.

sys/amd64/include/xen/hypercall.h
sys/i386/include/xen/hypercall.h
sys/xen/hypervisor.h

index 4ed0cdbee244c388c256cb913a41237c2f53f5a6..600adf7b2ac5eac49261cb5fd0997e7705419d29 100644 (file)
@@ -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);
 }
index f90b26da6fbef62e261793478b30a8630f994ff6..59ef4ff0bd6f712e604623f607b0f4d56bffb302 100644 (file)
@@ -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);
 }
index fe83496bd90dfc7cd9bc81ff0f87804bc5058b21..96e5582229828f422f2bbed64549cd32c3397a52 100644 (file)
@@ -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); 
 }