]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
xen/hypercall: Allow HYPERVISOR_console_write to take a const string
authorJulien Grall <julien.grall@citrix.com>
Sun, 20 Sep 2015 10:47:06 +0000 (11:47 +0100)
committerJulien Grall <julien.grall@citrix.com>
Sat, 3 Oct 2015 18:37:13 +0000 (19:37 +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 594ffd280ff861b699269370dd63b9a85541f46d..e427bbf4d43f7870d9241cb8ff7683e0b9b177bd 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 1c4d52904a46531ae3f23a8cc83608af44ba7ae9..7e18f9ed1317f4fb10dba2cc24233e5cd9fa14b9 100644 (file)
@@ -293,7 +293,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 0d93f66dbd18b74e772d3699c1a65f9bc9d28f64..42cdb3bcf5eefa79b67e9ac7b51d0ea70ba81e21 100644 (file)
@@ -57,7 +57,7 @@ extern start_info_t *xen_start_info;
 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); 
 }