summaryrefslogtreecommitdiffstats
path: root/bsd-user
diff options
context:
space:
mode:
authorPeter Maydell2013-02-11 17:41:21 +0100
committerBlue Swirl2013-02-16 11:44:11 +0100
commit59a6fa6e67d2335d867c66c59d992847e5b62879 (patch)
tree7cfe5ed1882e24a51b8eff859594c23a06423d3a /bsd-user
parentqemu-log: Unify {cpu_set,set_cpu}_log_filename as qemu_set_log_filename (diff)
downloadqemu-59a6fa6e67d2335d867c66c59d992847e5b62879.tar.gz
qemu-59a6fa6e67d2335d867c66c59d992847e5b62879.tar.xz
qemu-59a6fa6e67d2335d867c66c59d992847e5b62879.zip
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>
Diffstat (limited to 'bsd-user')
-rw-r--r--bsd-user/main.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 76ab35909c..26604b43cb 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -864,14 +864,10 @@ int main(int argc, char **argv)
qemu_set_log_filename(log_file);
if (log_mask) {
int mask;
- const CPULogItem *item;
mask = cpu_str_to_log_mask(log_mask);
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);