From: Costin Lupu Date: Tue, 18 Aug 2020 13:44:06 +0000 (+0300) Subject: mini-os: console.c: Rename static variable from buf to __print_buf X-Git-Tag: xen-4.16.0-rc4~11 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=816701f213678809c48713037d6e1bd459f2927c;p=mini-os.git mini-os: console.c: Rename static variable from buf to __print_buf lwip soure code also has a static variable called 'buf' in ip_frag.c. This can get confusing when inspecting the binary (e.g. with objdump or something similar). Therefore this patch renames the 'buf' variable used by print() function to '__print_buf'. Signed-off-by: Costin Lupu Reviewed-by: Samuel Thibault --- diff --git a/console/console.c b/console/console.c index 9ddae9d..af1a6dd 100644 --- a/console/console.c +++ b/console/console.c @@ -122,21 +122,21 @@ void console_print(struct consfront_dev *dev, char *data, int length) void print(int direct, const char *fmt, va_list args) { - static char buf[1024]; + static char __print_buf[1024]; - (void)vsnprintf(buf, sizeof(buf), fmt, args); + (void)vsnprintf(__print_buf, sizeof(__print_buf), fmt, args); if(direct) { - (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(buf), buf); + (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(__print_buf), __print_buf); return; } else { #ifndef CONFIG_USE_XEN_CONSOLE if(!console_initialised) #endif - (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(buf), buf); + (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(__print_buf), __print_buf); - console_print(NULL, buf, strlen(buf)); + console_print(NULL, __print_buf, strlen(__print_buf)); } }