Skip to content
  • Markus Armbruster's avatar
    0442428a
    target: Simplify how the TARGET_cpu_list() print · 0442428a
    Markus Armbruster authored
    
    
    The various TARGET_cpu_list() take an fprintf()-like callback and a
    FILE * to pass to it.  Their callers (vl.c's main() via list_cpus(),
    bsd-user/main.c's main(), linux-user/main.c's main()) all pass
    fprintf() and stdout.  Thus, the flexibility provided by the (rather
    tiresome) indirection isn't actually used.
    
    Drop the callback, and call qemu_printf() instead.
    
    Calling printf() would also work, but would make the code unsuitable
    for monitor context without making it simpler.
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Message-Id: <20190417191805.28198-10-armbru@redhat.com>
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
    0442428a
    target: Simplify how the TARGET_cpu_list() print
    Markus Armbruster authored
    
    
    The various TARGET_cpu_list() take an fprintf()-like callback and a
    FILE * to pass to it.  Their callers (vl.c's main() via list_cpus(),
    bsd-user/main.c's main(), linux-user/main.c's main()) all pass
    fprintf() and stdout.  Thus, the flexibility provided by the (rather
    tiresome) indirection isn't actually used.
    
    Drop the callback, and call qemu_printf() instead.
    
    Calling printf() would also work, but would make the code unsuitable
    for monitor context without making it simpler.
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Message-Id: <20190417191805.28198-10-armbru@redhat.com>
    Reviewed-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Loading