All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: Sasha Levin <levinsasha928@gmail.com>,
	Asias He <asias.hejun@gmail.com>, Ingo Molnar <mingo@elte.hu>,
	KVM-ML <kvm@vger.kernel.org>
Subject: [PATCH] kvm tools: Rename pr_error to pr_err to follow kernel convention
Date: Sun, 18 Dec 2011 22:39:04 +0400	[thread overview]
Message-ID: <20111218183904.GU11271@moon> (raw)

The kernel already has pr_err helper lets do the same.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 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(-)

Index: linux-2.6.git/tools/kvm/builtin-stat.c
===================================================================
--- linux-2.6.git.orig/tools/kvm/builtin-stat.c
+++ linux-2.6.git/tools/kvm/builtin-stat.c
@@ -68,7 +68,7 @@ static int do_memstat(const char *name,
 
 	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));
Index: linux-2.6.git/tools/kvm/disk/core.c
===================================================================
--- linux-2.6.git.orig/tools/kvm/disk/core.c
+++ linux-2.6.git/tools/kvm/disk/core.c
@@ -118,7 +118,7 @@ struct disk_image **disk_image__open_all
 
 		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;
 		}
 	}
Index: linux-2.6.git/tools/kvm/include/kvm/util.h
===================================================================
--- linux-2.6.git.orig/tools/kvm/include/kvm/util.h
+++ linux-2.6.git/tools/kvm/include/kvm/util.h
@@ -38,7 +38,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);
Index: linux-2.6.git/tools/kvm/kvm.c
===================================================================
--- linux-2.6.git.orig/tools/kvm/kvm.c
+++ linux-2.6.git/tools/kvm/kvm.c
@@ -109,7 +109,7 @@ static int kvm__check_extensions(struct
 		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;
 		}
Index: linux-2.6.git/tools/kvm/util/parse-options.c
===================================================================
--- linux-2.6.git.orig/tools/kvm/util/parse-options.c
+++ linux-2.6.git/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,
 		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,
 		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 *
 		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);
 	}
Index: linux-2.6.git/tools/kvm/util/util.c
===================================================================
--- linux-2.6.git.orig/tools/kvm/util/util.c
+++ linux-2.6.git/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;
 

                 reply	other threads:[~2011-12-18 18:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111218183904.GU11271@moon \
    --to=gorcunov@gmail.com \
    --cc=asias.hejun@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=mingo@elte.hu \
    --cc=penberg@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.