aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-12-18 16:35:27 +0100
committerMarkus Armbruster <armbru@redhat.com>2016-01-13 15:16:19 +0100
commit533fdaedeb7f7ae90866312f57249ebbb7e3c97f (patch)
treeada9b99a39c08b7df0b9f5cd20b2df0f3f3fb4e6
parent24da21f265b091dee756398a24d63dd8a2f3d5ab (diff)
downloadqemu-533fdaedeb7f7ae90866312f57249ebbb7e3c97f.zip
qemu-533fdaedeb7f7ae90866312f57249ebbb7e3c97f.tar.gz
qemu-533fdaedeb7f7ae90866312f57249ebbb7e3c97f.tar.bz2
error: Consistently name Error * objects err, and not errp
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1450452927-8346-25-git-send-email-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
-rw-r--r--contrib/ivshmem-server/main.c8
-rw-r--r--hmp.c32
-rw-r--r--hw/core/nmi.c10
-rw-r--r--include/qemu/sockets.h2
-rw-r--r--tests/test-string-output-visitor.c6
5 files changed, 29 insertions, 29 deletions
diff --git a/contrib/ivshmem-server/main.c b/contrib/ivshmem-server/main.c
index 00508b5..9b0d6e2 100644
--- a/contrib/ivshmem-server/main.c
+++ b/contrib/ivshmem-server/main.c
@@ -65,7 +65,7 @@ ivshmem_server_parse_args(IvshmemServerArgs *args, int argc, char *argv[])
{
int c;
unsigned long long v;
- Error *errp = NULL;
+ Error *err = NULL;
while ((c = getopt(argc, argv,
"h" /* help */
@@ -104,9 +104,9 @@ ivshmem_server_parse_args(IvshmemServerArgs *args, int argc, char *argv[])
break;
case 'l': /* shm_size */
- parse_option_size("shm_size", optarg, &args->shm_size, &errp);
- if (errp) {
- error_report_err(errp);
+ parse_option_size("shm_size", optarg, &args->shm_size, &err);
+ if (err) {
+ error_report_err(err);
ivshmem_server_usage(argv[0], 1);
}
break;
diff --git a/hmp.c b/hmp.c
index 9723397..54f2620 100644
--- a/hmp.c
+++ b/hmp.c
@@ -2078,11 +2078,11 @@ void hmp_rocker(Monitor *mon, const QDict *qdict)
{
const char *name = qdict_get_str(qdict, "name");
RockerSwitch *rocker;
- Error *errp = NULL;
+ Error *err = NULL;
- rocker = qmp_query_rocker(name, &errp);
- if (errp != NULL) {
- hmp_handle_error(mon, &errp);
+ rocker = qmp_query_rocker(name, &err);
+ if (err != NULL) {
+ hmp_handle_error(mon, &err);
return;
}
@@ -2097,11 +2097,11 @@ void hmp_rocker_ports(Monitor *mon, const QDict *qdict)
{
RockerPortList *list, *port;
const char *name = qdict_get_str(qdict, "name");
- Error *errp = NULL;
+ Error *err = NULL;
- list = qmp_query_rocker_ports(name, &errp);
- if (errp != NULL) {
- hmp_handle_error(mon, &errp);
+ list = qmp_query_rocker_ports(name, &err);
+ if (err != NULL) {
+ hmp_handle_error(mon, &err);
return;
}
@@ -2126,11 +2126,11 @@ void hmp_rocker_of_dpa_flows(Monitor *mon, const QDict *qdict)
RockerOfDpaFlowList *list, *info;
const char *name = qdict_get_str(qdict, "name");
uint32_t tbl_id = qdict_get_try_int(qdict, "tbl_id", -1);
- Error *errp = NULL;
+ Error *err = NULL;
- list = qmp_query_rocker_of_dpa_flows(name, tbl_id != -1, tbl_id, &errp);
- if (errp != NULL) {
- hmp_handle_error(mon, &errp);
+ list = qmp_query_rocker_of_dpa_flows(name, tbl_id != -1, tbl_id, &err);
+ if (err != NULL) {
+ hmp_handle_error(mon, &err);
return;
}
@@ -2276,12 +2276,12 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict *qdict)
RockerOfDpaGroupList *list, *g;
const char *name = qdict_get_str(qdict, "name");
uint8_t type = qdict_get_try_int(qdict, "type", 9);
- Error *errp = NULL;
+ Error *err = NULL;
bool set = false;
- list = qmp_query_rocker_of_dpa_groups(name, type != 9, type, &errp);
- if (errp != NULL) {
- hmp_handle_error(mon, &errp);
+ list = qmp_query_rocker_of_dpa_groups(name, type != 9, type, &err);
+ if (err != NULL) {
+ hmp_handle_error(mon, &err);
return;
}
diff --git a/hw/core/nmi.c b/hw/core/nmi.c
index de1d1f8..4057cdd 100644
--- a/hw/core/nmi.c
+++ b/hw/core/nmi.c
@@ -25,7 +25,7 @@
struct do_nmi_s {
int cpu_index;
- Error *errp;
+ Error *err;
bool handled;
};
@@ -40,8 +40,8 @@ static int do_nmi(Object *o, void *opaque)
NMIClass *nc = NMI_GET_CLASS(n);
ns->handled = true;
- nc->nmi_monitor_handler(n, ns->cpu_index, &ns->errp);
- if (ns->errp) {
+ nc->nmi_monitor_handler(n, ns->cpu_index, &ns->err);
+ if (ns->err) {
return -1;
}
}
@@ -59,13 +59,13 @@ void nmi_monitor_handle(int cpu_index, Error **errp)
{
struct do_nmi_s ns = {
.cpu_index = cpu_index,
- .errp = NULL,
+ .err = NULL,
.handled = false
};
nmi_children(object_get_root(), &ns);
if (ns.handled) {
- error_propagate(errp, ns.errp);
+ error_propagate(errp, ns.err);
} else {
error_setg(errp, QERR_UNSUPPORTED);
}
diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h
index 74c692d..2e7f985 100644
--- a/include/qemu/sockets.h
+++ b/include/qemu/sockets.h
@@ -53,7 +53,7 @@ int recv_all(int fd, void *buf, int len1, bool single_read);
/* callback function for nonblocking connect
* valid fd on success, negative error code on failure
*/
-typedef void NonBlockingConnectHandler(int fd, Error *errp, void *opaque);
+typedef void NonBlockingConnectHandler(int fd, Error *err, void *opaque);
InetSocketAddress *inet_parse(const char *str, Error **errp);
int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp);
diff --git a/tests/test-string-output-visitor.c b/tests/test-string-output-visitor.c
index 9585252..7aecdfc 100644
--- a/tests/test-string-output-visitor.c
+++ b/tests/test-string-output-visitor.c
@@ -81,7 +81,7 @@ static void test_visitor_out_intList(TestOutputVisitorData *data,
3, 4, 5, 6, 11, 12, 13, 21, 22, INT64_MAX - 1, INT64_MAX};
intList *list = NULL, **tmp = &list;
int i;
- Error *errp = NULL;
+ Error *err = NULL;
char *str;
for (i = 0; i < sizeof(value) / sizeof(value[0]); i++) {
@@ -90,8 +90,8 @@ static void test_visitor_out_intList(TestOutputVisitorData *data,
tmp = &(*tmp)->next;
}
- visit_type_intList(data->ov, &list, NULL, &errp);
- g_assert(errp == NULL);
+ visit_type_intList(data->ov, &list, NULL, &err);
+ g_assert(err == NULL);
str = string_output_get_string(data->sov);
g_assert(str != NULL);