Commit 5adb4839e3c35382832bedc7155b3317b7b7d560

Authored by pbrook
1 parent 3371d272

Fix typo in help output.

List ARM cpus.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2475 c046a42c-6fe2-441c-8c8c-71466251a162
target-arm/cpu.h
... ... @@ -209,6 +209,7 @@ static inline int arm_feature(CPUARMState *env, int feature)
209 209 return (env->features & (1u << feature)) != 0;
210 210 }
211 211  
  212 +void arm_cpu_list(void);
212 213 void cpu_arm_set_model(CPUARMState *env, const char *name);
213 214  
214 215 #define ARM_CPUID_ARM1026 0x4106a262
... ...
target-arm/helper.c
... ... @@ -47,6 +47,16 @@ static const struct arm_cpu_t arm_cpu_names[] = {
47 47 { 0, NULL}
48 48 };
49 49  
  50 +void arm_cpu_list(void)
  51 +{
  52 + int i;
  53 +
  54 + printf ("Available CPUs:\n");
  55 + for (i = 0; arm_cpu_names[i].name; i++) {
  56 + printf(" %s\n", arm_cpu_names[i].name);
  57 + }
  58 +}
  59 +
50 60 void cpu_arm_set_model(CPUARMState *env, const char *name)
51 61 {
52 62 int i;
... ...
... ... @@ -6355,7 +6355,7 @@ void help(void)
6355 6355 "\n"
6356 6356 "Standard options:\n"
6357 6357 "-M machine select emulated machine (-M ? for list)\n"
6358   - "-cpu cpu select CPU (-C ? for list)\n"
  6358 + "-cpu cpu select CPU (-cpu ? for list)\n"
6359 6359 "-fda/-fdb file use 'file' as floppy disk 0/1 image\n"
6360 6360 "-hda/-hdb file use 'file' as IDE hard disk 0/1 image\n"
6361 6361 "-hdc/-hdd file use 'file' as IDE hard disk 2/3 image\n"
... ... @@ -7004,6 +7004,8 @@ int main(int argc, char **argv)
7004 7004 if (optarg[0] == '?') {
7005 7005 #if defined(TARGET_PPC)
7006 7006 ppc_cpu_list(stdout, &fprintf);
  7007 +#elif defined(TARGET_ARM)
  7008 + arm_cpu_list();
7007 7009 #endif
7008 7010 exit(1);
7009 7011 } else {
... ...