mirror of
https://github.com/mii443/qemu.git
synced 2025-12-12 05:18:37 +00:00
qemu-log: Abstract out "print usage message about valid log categories"
Abstract out the "print a human readable list of all the valid log categories" functionality which is currently duplicated in three separate places. (We leave the monitor.c help_cmd() implementation as-is since it wants to send the message to the monitor and add its own information.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
committed by
Blue Swirl
parent
9a7e542429
commit
59a6fa6e67
@@ -170,3 +170,12 @@ int cpu_str_to_log_mask(const char *str)
|
||||
}
|
||||
return mask;
|
||||
}
|
||||
|
||||
void qemu_print_log_usage(FILE *f)
|
||||
{
|
||||
const CPULogItem *item;
|
||||
fprintf(f, "Log items (comma separated):\n");
|
||||
for (item = cpu_log_items; item->mask != 0; item++) {
|
||||
fprintf(f, "%-10s %s\n", item->name, item->help);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user