提交 4fde1eba 编写于 作者: P Peter Maydell 提交者: Blue Swirl

qemu-log: Rename cpu_str_to_log_mask to qemu_str_to_log_mask

Rename cpu_str_to_log_mask() to qemu_str_to_log_mask(), since
the qemu_log functionality is no longer restricted to TCG CPU
debug logging.
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Reviewed-by: NAndreas Färber <afaerber@suse.de>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 59a6fa6e
...@@ -865,7 +865,7 @@ int main(int argc, char **argv) ...@@ -865,7 +865,7 @@ int main(int argc, char **argv)
if (log_mask) { if (log_mask) {
int mask; int mask;
mask = cpu_str_to_log_mask(log_mask); mask = qemu_str_to_log_mask(log_mask);
if (!mask) { if (!mask) {
qemu_print_log_usage(stdout); qemu_print_log_usage(stdout);
exit(1); exit(1);
......
...@@ -1179,7 +1179,7 @@ void set_cpu_log(const char *optarg) ...@@ -1179,7 +1179,7 @@ void set_cpu_log(const char *optarg)
{ {
int mask; int mask;
mask = cpu_str_to_log_mask(optarg); mask = qemu_str_to_log_mask(optarg);
if (!mask) { if (!mask) {
qemu_print_log_usage(stdout); qemu_print_log_usage(stdout);
exit(1); exit(1);
......
...@@ -155,7 +155,7 @@ static inline void cpu_set_log(int log_flags) ...@@ -155,7 +155,7 @@ static inline void cpu_set_log(int log_flags)
} }
void qemu_set_log_filename(const char *filename); void qemu_set_log_filename(const char *filename);
int cpu_str_to_log_mask(const char *str); int qemu_str_to_log_mask(const char *str);
/* Print a usage message listing all the valid logging categories /* Print a usage message listing all the valid logging categories
* to the specified FILE*. * to the specified FILE*.
......
...@@ -3099,7 +3099,7 @@ static void handle_arg_log(const char *arg) ...@@ -3099,7 +3099,7 @@ static void handle_arg_log(const char *arg)
{ {
int mask; int mask;
mask = cpu_str_to_log_mask(arg); mask = qemu_str_to_log_mask(arg);
if (!mask) { if (!mask) {
qemu_print_log_usage(stdout); qemu_print_log_usage(stdout);
exit(1); exit(1);
......
...@@ -975,7 +975,7 @@ static void do_log(Monitor *mon, const QDict *qdict) ...@@ -975,7 +975,7 @@ static void do_log(Monitor *mon, const QDict *qdict)
if (!strcmp(items, "none")) { if (!strcmp(items, "none")) {
mask = 0; mask = 0;
} else { } else {
mask = cpu_str_to_log_mask(items); mask = qemu_str_to_log_mask(items);
if (!mask) { if (!mask) {
help_cmd(mon, "log"); help_cmd(mon, "log");
return; return;
......
...@@ -136,7 +136,7 @@ static int cmp1(const char *s1, int n, const char *s2) ...@@ -136,7 +136,7 @@ static int cmp1(const char *s1, int n, const char *s2)
} }
/* takes a comma separated list of log masks. Return 0 if error. */ /* takes a comma separated list of log masks. Return 0 if error. */
int cpu_str_to_log_mask(const char *str) int qemu_str_to_log_mask(const char *str)
{ {
const CPULogItem *item; const CPULogItem *item;
int mask; int mask;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册