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 <[email protected]> --- bsd/sys/xen/hypervisor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd/sys/xen/hypervisor.h b/bsd/sys/xen/hypervisor.h index e06bb73..921bb66 100644 --- 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; -- 2.7.4 -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
