Commit-ID: de1107e97fb71e67fadd54e2c6233ade57ccd243 Gitweb: http://git.kernel.org/tip/de1107e97fb71e67fadd54e2c6233ade57ccd243 Author: Cyrill Gorcunov <gorcunov@xxxxxxxxx> AuthorDate: Sun, 18 Dec 2011 22:39:04 +0400 Committer: Pekka Enberg <penberg@xxxxxxxxxx> CommitDate: Mon, 19 Dec 2011 19:41:31 +0200 kvm tools: Rename pr_error to pr_err to follow kernel convention The kernel already has pr_err helper lets do the same. Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx> Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx> --- tools/kvm/builtin-stat.c | 2 +- tools/kvm/disk/core.c | 2 +- tools/kvm/include/kvm/util.h | 2 +- tools/kvm/kvm.c | 2 +- tools/kvm/util/parse-options.c | 16 ++++++++-------- tools/kvm/util/util.c | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/kvm/builtin-stat.c b/tools/kvm/builtin-stat.c index e28eb5b..489b85c 100644 --- a/tools/kvm/builtin-stat.c +++ b/tools/kvm/builtin-stat.c @@ -68,7 +68,7 @@ static int do_memstat(const char *name, int sock) r = select(1, &fdset, NULL, NULL, &t); if (r < 0) { - pr_error("Could not retrieve mem stats from %s", name); + pr_err("Could not retrieve mem stats from %s", name); return r; } r = read(sock, &stats, sizeof(stats)); diff --git a/tools/kvm/disk/core.c b/tools/kvm/disk/core.c index 4915efd..3da0efe 100644 --- a/tools/kvm/disk/core.c +++ b/tools/kvm/disk/core.c @@ -118,7 +118,7 @@ struct disk_image **disk_image__open_all(const char **filenames, bool *readonly, disks[i] = disk_image__open(filenames[i], readonly[i]); if (!disks[i]) { - pr_error("Loading disk image '%s' failed", filenames[i]); + pr_err("Loading disk image '%s' failed", filenames[i]); goto error; } } diff --git a/tools/kvm/include/kvm/util.h b/tools/kvm/include/kvm/util.h index 2792c88..6c8d4bc 100644 --- a/tools/kvm/include/kvm/util.h +++ b/tools/kvm/include/kvm/util.h @@ -39,7 +39,7 @@ extern bool do_debug_print; extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2))); extern void die_perror(const char *s) NORETURN; -extern int pr_error(const char *err, ...) __attribute__((format (printf, 1, 2))); +extern int pr_err(const char *err, ...) __attribute__((format (printf, 1, 2))); extern void pr_warning(const char *err, ...) __attribute__((format (printf, 1, 2))); extern void pr_info(const char *err, ...) __attribute__((format (printf, 1, 2))); extern void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN); diff --git a/tools/kvm/kvm.c b/tools/kvm/kvm.c index a60b11d..cd1e386 100644 --- a/tools/kvm/kvm.c +++ b/tools/kvm/kvm.c @@ -108,7 +108,7 @@ static int kvm__check_extensions(struct kvm *kvm) if (!kvm_req_ext[i].name) break; if (!kvm__supports_extension(kvm, kvm_req_ext[i].code)) { - pr_error("Unsuppored KVM extension detected: %s", + pr_err("Unsuppored KVM extension detected: %s", kvm_req_ext[i].name); return (int)-i; } diff --git a/tools/kvm/util/parse-options.c b/tools/kvm/util/parse-options.c index 2665be5..9a1bbee 100644 --- a/tools/kvm/util/parse-options.c +++ b/tools/kvm/util/parse-options.c @@ -17,10 +17,10 @@ static int opterror(const struct option *opt, const char *reason, int flags) { if (flags & OPT_SHORT) - return pr_error("switch `%c' %s", opt->short_name, reason); + return pr_err("switch `%c' %s", opt->short_name, reason); if (flags & OPT_UNSET) - return pr_error("option `no-%s' %s", opt->long_name, reason); - return pr_error("option `%s' %s", opt->long_name, reason); + return pr_err("option `no-%s' %s", opt->long_name, reason); + return pr_err("option `%s' %s", opt->long_name, reason); } static int get_arg(struct parse_opt_ctx_t *p, const struct option *opt, @@ -324,7 +324,7 @@ static void check_typos(const char *arg, const struct option *options) return; if (!prefixcmp(arg, "no-")) { - pr_error ("did you mean `--%s` (with two dashes ?)", arg); + pr_err("did you mean `--%s` (with two dashes ?)", arg); exit(129); } @@ -332,7 +332,7 @@ static void check_typos(const char *arg, const struct option *options) if (!options->long_name) continue; if (!prefixcmp(options->long_name, arg)) { - pr_error ("did you mean `--%s` (with two dashes ?)", arg); + pr_err("did you mean `--%s` (with two dashes ?)", arg); exit(129); } } @@ -430,7 +430,7 @@ is_abbreviated: } if (ambiguous_option) - return pr_error("Ambiguous option: %s " + return pr_err("Ambiguous option: %s " "(could be --%s%s or --%s%s)", arg, (ambiguous_flags & OPT_UNSET) ? "no-" : "", @@ -566,9 +566,9 @@ int parse_options(int argc, const char **argv, const struct option *options, break; default: /* PARSE_OPT_UNKNOWN */ if (ctx.argv[0][1] == '-') { - pr_error("unknown option `%s'", ctx.argv[0] + 2); + pr_err("unknown option `%s'", ctx.argv[0] + 2); } else { - pr_error("unknown switch `%c'", *ctx.opt); + pr_err("unknown switch `%c'", *ctx.opt); } usage_with_options(usagestr, options); } diff --git a/tools/kvm/util/util.c b/tools/kvm/util/util.c index 4e14fd9..e7feebc 100644 --- a/tools/kvm/util/util.c +++ b/tools/kvm/util/util.c @@ -46,7 +46,7 @@ void die(const char *err, ...) va_end(params); } -int pr_error(const char *err, ...) +int pr_err(const char *err, ...) { va_list params; -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html