aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-05-02 13:26:29 +0200
committerLuiz Capitulino <lcapitulino@redhat.com>2014-05-08 14:20:00 -0400
commite940f543ae7606819c9083fdb524e5b85914f032 (patch)
tree41a016f0ee62766627165bd1563b7994c723ec9a /docs
parent636713bad4240836947c04c26e1cd001d3bcbff1 (diff)
qmp hmp: Consistently name Error * objects err, and not errp
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/writing-qmp-commands.txt28
1 files changed, 14 insertions, 14 deletions
diff --git a/docs/writing-qmp-commands.txt b/docs/writing-qmp-commands.txt
index 3930a9ba70..4d86c2477b 100644
--- a/docs/writing-qmp-commands.txt
+++ b/docs/writing-qmp-commands.txt
@@ -308,12 +308,12 @@ Here's the implementation of the "hello-world" HMP command:
void hmp_hello_world(Monitor *mon, const QDict *qdict)
{
const char *message = qdict_get_try_str(qdict, "message");
- Error *errp = NULL;
+ Error *err = NULL;
- qmp_hello_world(!!message, message, &errp);
- if (errp) {
- monitor_printf(mon, "%s\n", error_get_pretty(errp));
- error_free(errp);
+ qmp_hello_world(!!message, message, &err);
+ if (err) {
+ monitor_printf(mon, "%s\n", error_get_pretty(err));
+ error_free(err);
return;
}
}
@@ -328,7 +328,7 @@ There are three important points to be noticed:
2. hmp_hello_world() performs error checking. In this example we just print
the error description to the user, but we could do more, like taking
different actions depending on the error qmp_hello_world() returns
-3. The "errp" variable must be initialized to NULL before performing the
+3. The "err" variable must be initialized to NULL before performing the
QMP call
There's one last step to actually make the command available to monitor users,
@@ -480,12 +480,12 @@ Here's the HMP counterpart of the query-alarm-clock command:
void hmp_info_alarm_clock(Monitor *mon)
{
QemuAlarmClock *clock;
- Error *errp = NULL;
+ Error *err = NULL;
- clock = qmp_query_alarm_clock(&errp);
- if (errp) {
+ clock = qmp_query_alarm_clock(&err);
+ if (err) {
monitor_printf(mon, "Could not query alarm clock information\n");
- error_free(errp);
+ error_free(err);
return;
}
@@ -631,12 +631,12 @@ has to traverse the list, it's shown below for reference:
void hmp_info_alarm_methods(Monitor *mon)
{
TimerAlarmMethodList *method_list, *method;
- Error *errp = NULL;
+ Error *err = NULL;
- method_list = qmp_query_alarm_methods(&errp);
- if (errp) {
+ method_list = qmp_query_alarm_methods(&err);
+ if (err) {
monitor_printf(mon, "Could not query alarm methods\n");
- error_free(errp);
+ error_free(err);
return;
}