Skip to contentSkip to conversation

linux-user/main: Use list_cpus() instead of cpu_list()

PATCH Applied Thomas Huth 4 participants 4 messages Apr 24, 2023 – May 1, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user/main: Use list_cpus() instead of cpu_list()

This way we can get rid of the if'deffery and the XXX comment here (it's repeated in the list_cpus() function anyway).

---
 linux-user/main.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
linux-user/main.c +1 -4
index fe03293516..aece4d9e91 100644
@@ -359,10 +359,7 @@ static void handle_arg_cpu(const char *arg)
 {
     cpu_model = strdup(arg);
     if (cpu_model == NULL || is_help_option(cpu_model)) {
-        /* XXX: implement xxx_cpu_list for targets that still miss it */
-#if defined(cpu_list)
-        cpu_list();
-#endif
+        list_cpus();
         exit(EXIT_FAILURE);
     }
 }
Signature · 1 line
2.31.1
#3 lore raw
In reply to Thomas Huth

Le 24/04/2023 à 14:21, Thomas Huth a écrit :

Quoted 14 lines

This way we can get rid of the if'deffery and the XXX comment here (it's repeated in the list_cpus() function anyway).

---
  linux-user/main.c | 5 +----
  1 file changed, 1 insertion(+), 4 deletions(-)
linux-user/main.c +0 -0
index fe03293516..aece4d9e91 100644
@@ -359,10 +359,7 @@ static void handle_arg_cpu(const char *arg)
  {

linux-user/main.c static void handle_arg_cpu(const char *arg) · line 365

Quoted 10 lines
linux-user/main.c +1 -4
      cpu_model = strdup(arg);
      if (cpu_model == NULL || is_help_option(cpu_model)) {
-        /* XXX: implement xxx_cpu_list for targets that still miss it */
-#if defined(cpu_list)
-        cpu_list();
-#endif
+        list_cpus();
          exit(EXIT_FAILURE);
      }
  }

Applied to my linux-user-for-8.1 branch.

Thanks,
Laurent