Skip to contentSkip to conversation

[5397] Make CPULogItem tables const

Qemu-devel Blue Swirl 1 participant 1 message Oct 2, 2008

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

Revision: 5397

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5397
Author:   blueswir1
Date:     2008-10-02 18:27:46 +0000 (Thu, 02 Oct 2008)

Log Message:
-----------
Make CPULogItem tables const

Modified Paths:
--------------
trunk/cpu-all.h
trunk/exec.c
trunk/linux-user/main.c
trunk/vl.c

Modified: trunk/cpu-all.h
===================================================================

cpu-all.h +1 -1
@@ -797,7 +797,7 @@
     const char *help;
 } CPULogItem;
 
-extern CPULogItem cpu_log_items[];
+extern const CPULogItem cpu_log_items[];
 
 void cpu_set_log(int log_flags);
 void cpu_set_log_filename(const char *filename);

Modified: trunk/exec.c
===================================================================

exec.c +2 -2
@@ -1511,7 +1511,7 @@
     env->interrupt_request &= ~mask;
 }
 
-CPULogItem cpu_log_items[] = {
+const CPULogItem cpu_log_items[] = {
     { CPU_LOG_TB_OUT_ASM, "out_asm",
       "show generated host assembly code for each compiled TB" },
     { CPU_LOG_TB_IN_ASM, "in_asm",
@@ -1551,7 +1551,7 @@
 /* takes a comma separated list of log masks. Return 0 if error. */
 int cpu_str_to_log_mask(const char *str)
 {
-    CPULogItem *item;
+    const CPULogItem *item;
     int mask;
     const char *p, *p1;
 

Modified: trunk/linux-user/main.c
===================================================================

linux-user/main.c +1 -1
@@ -2252,7 +2252,7 @@
             break;
         } else if (!strcmp(r, "d")) {
             int mask;
-            CPULogItem *item;
+            const CPULogItem *item;
 
 	    if (optind >= argc)
 		break;

Modified: trunk/vl.c
===================================================================

vl.c +1 -1
@@ -8845,7 +8845,7 @@
             case QEMU_OPTION_d:
                 {
                     int mask;
-                    CPULogItem *item;
+                    const CPULogItem *item;
 
                     mask = cpu_str_to_log_mask(optarg);
                     if (!mask) {