From 59a6fa6e67d2335d867c66c59d992847e5b62879 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Mon, 11 Feb 2013 16:41:21 +0000 Subject: qemu-log: Abstract out "print usage message about valid log categories" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Andreas Färber Signed-off-by: Blue Swirl --- cpus.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'cpus.c') diff --git a/cpus.c b/cpus.c index 2155441b35..0fdc48ca88 100644 --- a/cpus.c +++ b/cpus.c @@ -1178,14 +1178,10 @@ void set_numa_modes(void) void set_cpu_log(const char *optarg) { int mask; - const CPULogItem *item; mask = cpu_str_to_log_mask(optarg); if (!mask) { - printf("Log items (comma separated):\n"); - for (item = cpu_log_items; item->mask != 0; item++) { - printf("%-10s %s\n", item->name, item->help); - } + qemu_print_log_usage(stdout); exit(1); } cpu_set_log(mask); -- cgit v1.2.3