]> xenbits.xensource.com Git - mini-os.git/commitdiff
mini-os: console.c: Rename static variable from buf to __print_buf
authorCostin Lupu <costin.lupu@cs.pub.ro>
Tue, 18 Aug 2020 13:44:06 +0000 (16:44 +0300)
committerWei Liu <wl@xen.org>
Thu, 27 Aug 2020 13:38:34 +0000 (13:38 +0000)
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 <costin.lupu@cs.pub.ro>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
console/console.c

index 9ddae9d734e9318e1a879a0cd63b738d4cb8bde5..af1a6dd3a2c5cdd623b53d268f0299783c477df0 100644 (file)
@@ -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));
     }
 }