From: Sergiy Kibrik <sergiy.kib...@globallogic.com>
Committer: Sergiy Kibrik <sergiy.kib...@globallogic.com>
Branch: master
bsd: xen: console_io hypercall accepts constant string
Modify HYPERVISOR_console_write() interface to accept const *char as
argument,
so it is compliant with console::console_driver::write() interface.
Xen does not mangle input buffer upon CONSOLEIO_write hypercall.
Signed-off-by: Sergiy Kibrik <sergiy.kib...@globallogic.com>
Reviewed-by: Nadav Har'El <n...@scylladb.com>
---
diff --git a/bsd/sys/xen/hypervisor.h b/bsd/sys/xen/hypervisor.h
--- a/bsd/sys/xen/hypervisor.h
+++ b/bsd/sys/xen/hypervisor.h
@@ -58,9 +58,9 @@ 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);
+ return HYPERVISOR_console_io(CONSOLEIO_write, count,
const_cast<char*>(str));
}
static inline void HYPERVISOR_crash(void) __dead2;
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.