mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 14:24:02 +08:00
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>
This commit is contained in:
parent
24da21f265
commit
533fdaedeb
@ -65,7 +65,7 @@ ivshmem_server_parse_args(IvshmemServerArgs *args, int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
unsigned long long v;
|
unsigned long long v;
|
||||||
Error *errp = NULL;
|
Error *err = NULL;
|
||||||
|
|
||||||
while ((c = getopt(argc, argv,
|
while ((c = getopt(argc, argv,
|
||||||
"h" /* help */
|
"h" /* help */
|
||||||
@ -104,9 +104,9 @@ ivshmem_server_parse_args(IvshmemServerArgs *args, int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'l': /* shm_size */
|
case 'l': /* shm_size */
|
||||||
parse_option_size("shm_size", optarg, &args->shm_size, &errp);
|
parse_option_size("shm_size", optarg, &args->shm_size, &err);
|
||||||
if (errp) {
|
if (err) {
|
||||||
error_report_err(errp);
|
error_report_err(err);
|
||||||
ivshmem_server_usage(argv[0], 1);
|
ivshmem_server_usage(argv[0], 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
32
hmp.c
32
hmp.c
@ -2078,11 +2078,11 @@ void hmp_rocker(Monitor *mon, const QDict *qdict)
|
|||||||
{
|
{
|
||||||
const char *name = qdict_get_str(qdict, "name");
|
const char *name = qdict_get_str(qdict, "name");
|
||||||
RockerSwitch *rocker;
|
RockerSwitch *rocker;
|
||||||
Error *errp = NULL;
|
Error *err = NULL;
|
||||||
|
|
||||||
rocker = qmp_query_rocker(name, &errp);
|
rocker = qmp_query_rocker(name, &err);
|
||||||
if (errp != NULL) {
|
if (err != NULL) {
|
||||||
hmp_handle_error(mon, &errp);
|
hmp_handle_error(mon, &err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2097,11 +2097,11 @@ void hmp_rocker_ports(Monitor *mon, const QDict *qdict)
|
|||||||
{
|
{
|
||||||
RockerPortList *list, *port;
|
RockerPortList *list, *port;
|
||||||
const char *name = qdict_get_str(qdict, "name");
|
const char *name = qdict_get_str(qdict, "name");
|
||||||
Error *errp = NULL;
|
Error *err = NULL;
|
||||||
|
|
||||||
list = qmp_query_rocker_ports(name, &errp);
|
list = qmp_query_rocker_ports(name, &err);
|
||||||
if (errp != NULL) {
|
if (err != NULL) {
|
||||||
hmp_handle_error(mon, &errp);
|
hmp_handle_error(mon, &err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2126,11 +2126,11 @@ void hmp_rocker_of_dpa_flows(Monitor *mon, const QDict *qdict)
|
|||||||
RockerOfDpaFlowList *list, *info;
|
RockerOfDpaFlowList *list, *info;
|
||||||
const char *name = qdict_get_str(qdict, "name");
|
const char *name = qdict_get_str(qdict, "name");
|
||||||
uint32_t tbl_id = qdict_get_try_int(qdict, "tbl_id", -1);
|
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);
|
list = qmp_query_rocker_of_dpa_flows(name, tbl_id != -1, tbl_id, &err);
|
||||||
if (errp != NULL) {
|
if (err != NULL) {
|
||||||
hmp_handle_error(mon, &errp);
|
hmp_handle_error(mon, &err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2276,12 +2276,12 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict *qdict)
|
|||||||
RockerOfDpaGroupList *list, *g;
|
RockerOfDpaGroupList *list, *g;
|
||||||
const char *name = qdict_get_str(qdict, "name");
|
const char *name = qdict_get_str(qdict, "name");
|
||||||
uint8_t type = qdict_get_try_int(qdict, "type", 9);
|
uint8_t type = qdict_get_try_int(qdict, "type", 9);
|
||||||
Error *errp = NULL;
|
Error *err = NULL;
|
||||||
bool set = false;
|
bool set = false;
|
||||||
|
|
||||||
list = qmp_query_rocker_of_dpa_groups(name, type != 9, type, &errp);
|
list = qmp_query_rocker_of_dpa_groups(name, type != 9, type, &err);
|
||||||
if (errp != NULL) {
|
if (err != NULL) {
|
||||||
hmp_handle_error(mon, &errp);
|
hmp_handle_error(mon, &err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
struct do_nmi_s {
|
struct do_nmi_s {
|
||||||
int cpu_index;
|
int cpu_index;
|
||||||
Error *errp;
|
Error *err;
|
||||||
bool handled;
|
bool handled;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -40,8 +40,8 @@ static int do_nmi(Object *o, void *opaque)
|
|||||||
NMIClass *nc = NMI_GET_CLASS(n);
|
NMIClass *nc = NMI_GET_CLASS(n);
|
||||||
|
|
||||||
ns->handled = true;
|
ns->handled = true;
|
||||||
nc->nmi_monitor_handler(n, ns->cpu_index, &ns->errp);
|
nc->nmi_monitor_handler(n, ns->cpu_index, &ns->err);
|
||||||
if (ns->errp) {
|
if (ns->err) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -59,13 +59,13 @@ void nmi_monitor_handle(int cpu_index, Error **errp)
|
|||||||
{
|
{
|
||||||
struct do_nmi_s ns = {
|
struct do_nmi_s ns = {
|
||||||
.cpu_index = cpu_index,
|
.cpu_index = cpu_index,
|
||||||
.errp = NULL,
|
.err = NULL,
|
||||||
.handled = false
|
.handled = false
|
||||||
};
|
};
|
||||||
|
|
||||||
nmi_children(object_get_root(), &ns);
|
nmi_children(object_get_root(), &ns);
|
||||||
if (ns.handled) {
|
if (ns.handled) {
|
||||||
error_propagate(errp, ns.errp);
|
error_propagate(errp, ns.err);
|
||||||
} else {
|
} else {
|
||||||
error_setg(errp, QERR_UNSUPPORTED);
|
error_setg(errp, QERR_UNSUPPORTED);
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ int recv_all(int fd, void *buf, int len1, bool single_read);
|
|||||||
/* callback function for nonblocking connect
|
/* callback function for nonblocking connect
|
||||||
* valid fd on success, negative error code on failure
|
* 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);
|
InetSocketAddress *inet_parse(const char *str, Error **errp);
|
||||||
int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp);
|
int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp);
|
||||||
|
@ -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};
|
3, 4, 5, 6, 11, 12, 13, 21, 22, INT64_MAX - 1, INT64_MAX};
|
||||||
intList *list = NULL, **tmp = &list;
|
intList *list = NULL, **tmp = &list;
|
||||||
int i;
|
int i;
|
||||||
Error *errp = NULL;
|
Error *err = NULL;
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
for (i = 0; i < sizeof(value) / sizeof(value[0]); i++) {
|
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;
|
tmp = &(*tmp)->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
visit_type_intList(data->ov, &list, NULL, &errp);
|
visit_type_intList(data->ov, &list, NULL, &err);
|
||||||
g_assert(errp == NULL);
|
g_assert(err == NULL);
|
||||||
|
|
||||||
str = string_output_get_string(data->sov);
|
str = string_output_get_string(data->sov);
|
||||||
g_assert(str != NULL);
|
g_assert(str != NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user