« Previous | Next » 

Revision ad37ad5b

IDad37ad5b25592d2829989111b8386b8007ea0d83

Added by Peter Maydell almost 12 years ago

target-arm/cpu.h: Make cpu_init("nonexistent cpu") return NULL

The macro definition of cpu_init meant that if cpu_arm_init()
returned NULL this wouldn't result in cpu_init() itself returning
NULL. This had the effect that "-cpu foo" for some unknown CPU
name 'foo' would cause ARM targets to segfault rather than
generating a useful error message. Fix this by making cpu_init
a simple inline function.

Signed-off-by: Peter Maydell <>
Acked-by: Andreas Färber <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences