1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

Replace use of virNetError with virReportError

Update the libvirtd dispatch code to use virReportError
instead of the virNetError custom macro

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2012-07-18 19:30:53 +01:00
parent edb768c9ce
commit f14993ffb7
3 changed files with 117 additions and 125 deletions

View File

@ -52,17 +52,13 @@
#define VIR_FROM_THIS VIR_FROM_RPC #define VIR_FROM_THIS VIR_FROM_RPC
#define virNetError(code, ...) \
virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
#if SIZEOF_LONG < 8 #if SIZEOF_LONG < 8
# define HYPER_TO_TYPE(_type, _to, _from) \ # define HYPER_TO_TYPE(_type, _to, _from) \
do { \ do { \
if ((_from) != (_type)(_from)) { \ if ((_from) != (_type)(_from)) { \
virNetError(VIR_ERR_OVERFLOW, \ virReportError(VIR_ERR_OVERFLOW, \
_("conversion from hyper to %s overflowed"), \ _("conversion from hyper to %s overflowed"), \
#_type); \ #_type); \
goto cleanup; \ goto cleanup; \
} \ } \
(_to) = (_from); \ (_to) = (_from); \
@ -712,13 +708,13 @@ remoteDispatchOpen(virNetServerPtr server,
virMutexLock(&priv->lock); virMutexLock(&priv->lock);
/* Already opened? */ /* Already opened? */
if (priv->conn) { if (priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection already open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection already open"));
goto cleanup; goto cleanup;
} }
if (virNetServerKeepAliveRequired(server) && !priv->keepalive_supported) { if (virNetServerKeepAliveRequired(server) && !priv->keepalive_supported) {
virNetError(VIR_ERR_OPERATION_FAILED, "%s", virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("keepalive support is required to connect")); _("keepalive support is required to connect"));
goto cleanup; goto cleanup;
} }
@ -776,7 +772,7 @@ remoteDispatchDomainGetSchedulerType(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -863,8 +859,8 @@ remoteSerializeTypedParameters(virTypedParameterPtr params,
} }
break; break;
default: default:
virNetError(VIR_ERR_RPC, _("unknown parameter type: %d"), virReportError(VIR_ERR_RPC, _("unknown parameter type: %d"),
params[i].type); params[i].type);
goto cleanup; goto cleanup;
} }
j++; j++;
@ -899,7 +895,7 @@ remoteDeserializeTypedParameters(remote_typed_param *args_params_val,
/* Check the length of the returned list carefully. */ /* Check the length of the returned list carefully. */
if (args_params_len > limit) { if (args_params_len > limit) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup; goto cleanup;
} }
if (VIR_ALLOC_N(params, args_params_len) < 0) { if (VIR_ALLOC_N(params, args_params_len) < 0) {
@ -913,9 +909,9 @@ remoteDeserializeTypedParameters(remote_typed_param *args_params_val,
for (i = 0; i < args_params_len; ++i) { for (i = 0; i < args_params_len; ++i) {
if (virStrcpyStatic(params[i].field, if (virStrcpyStatic(params[i].field,
args_params_val[i].field) == NULL) { args_params_val[i].field) == NULL) {
virNetError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Parameter %s too big for destination"), _("Parameter %s too big for destination"),
args_params_val[i].field); args_params_val[i].field);
goto cleanup; goto cleanup;
} }
params[i].type = args_params_val[i].value.type; params[i].type = args_params_val[i].value.type;
@ -953,8 +949,8 @@ remoteDeserializeTypedParameters(remote_typed_param *args_params_val,
} }
break; break;
default: default:
virNetError(VIR_ERR_INTERNAL_ERROR, _("unknown parameter type: %d"), virReportError(VIR_ERR_INTERNAL_ERROR, _("unknown parameter type: %d"),
params[i].type); params[i].type);
goto cleanup; goto cleanup;
} }
} }
@ -985,12 +981,12 @@ remoteDispatchDomainGetSchedulerParameters(virNetServerPtr server ATTRIBUTE_UNUS
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
if (nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) { if (nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup; goto cleanup;
} }
if (VIR_ALLOC_N(params, nparams) < 0) if (VIR_ALLOC_N(params, nparams) < 0)
@ -1039,7 +1035,7 @@ remoteDispatchConnectListAllDomains(virNetServerPtr server ATTRIBUTE_UNUSED,
struct daemonClientPrivate *priv = virNetServerClientGetPrivateData(client); struct daemonClientPrivate *priv = virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -1094,12 +1090,12 @@ remoteDispatchDomainGetSchedulerParametersFlags(virNetServerPtr server ATTRIBUTE
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
if (nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) { if (nparams > REMOTE_DOMAIN_SCHEDULER_PARAMETERS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup; goto cleanup;
} }
if (VIR_ALLOC_N(params, nparams) < 0) if (VIR_ALLOC_N(params, nparams) < 0)
@ -1150,13 +1146,13 @@ remoteDispatchDomainMemoryStats(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
if (args->maxStats > REMOTE_DOMAIN_MEMORY_STATS_MAX) { if (args->maxStats > REMOTE_DOMAIN_MEMORY_STATS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("maxStats > REMOTE_DOMAIN_MEMORY_STATS_MAX")); _("maxStats > REMOTE_DOMAIN_MEMORY_STATS_MAX"));
goto cleanup; goto cleanup;
} }
@ -1214,7 +1210,7 @@ remoteDispatchDomainBlockPeek(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -1226,8 +1222,8 @@ remoteDispatchDomainBlockPeek(virNetServerPtr server ATTRIBUTE_UNUSED,
flags = args->flags; flags = args->flags;
if (size > REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX) { if (size > REMOTE_DOMAIN_BLOCK_PEEK_BUFFER_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("size > maximum buffer size")); "%s", _("size > maximum buffer size"));
goto cleanup; goto cleanup;
} }
@ -1271,7 +1267,7 @@ remoteDispatchDomainBlockStatsFlags(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -1280,7 +1276,7 @@ remoteDispatchDomainBlockStatsFlags(virNetServerPtr server ATTRIBUTE_UNUSED,
flags = args->flags; flags = args->flags;
if (nparams > REMOTE_DOMAIN_BLOCK_STATS_PARAMETERS_MAX) { if (nparams > REMOTE_DOMAIN_BLOCK_STATS_PARAMETERS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup; goto cleanup;
} }
if (VIR_ALLOC_N(params, nparams) < 0) { if (VIR_ALLOC_N(params, nparams) < 0) {
@ -1336,7 +1332,7 @@ remoteDispatchDomainMemoryPeek(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -1347,8 +1343,8 @@ remoteDispatchDomainMemoryPeek(virNetServerPtr server ATTRIBUTE_UNUSED,
flags = args->flags; flags = args->flags;
if (size > REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX) { if (size > REMOTE_DOMAIN_MEMORY_PEEK_BUFFER_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("size > maximum buffer size")); "%s", _("size > maximum buffer size"));
goto cleanup; goto cleanup;
} }
@ -1389,7 +1385,7 @@ remoteDispatchDomainGetSecurityLabel(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -1436,7 +1432,7 @@ remoteDispatchNodeGetSecurityModel(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -1482,7 +1478,7 @@ remoteDispatchDomainGetVcpuPinInfo(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -1490,13 +1486,13 @@ remoteDispatchDomainGetVcpuPinInfo(virNetServerPtr server ATTRIBUTE_UNUSED,
goto cleanup; goto cleanup;
if (args->ncpumaps > REMOTE_VCPUINFO_MAX) { if (args->ncpumaps > REMOTE_VCPUINFO_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("ncpumaps > REMOTE_VCPUINFO_MAX")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("ncpumaps > REMOTE_VCPUINFO_MAX"));
goto cleanup; goto cleanup;
} }
if (INT_MULTIPLY_OVERFLOW(args->ncpumaps, args->maplen) || if (INT_MULTIPLY_OVERFLOW(args->ncpumaps, args->maplen) ||
args->ncpumaps * args->maplen > REMOTE_CPUMAPS_MAX) { args->ncpumaps * args->maplen > REMOTE_CPUMAPS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("maxinfo * maplen > REMOTE_CPUMAPS_MAX")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("maxinfo * maplen > REMOTE_CPUMAPS_MAX"));
goto cleanup; goto cleanup;
} }
@ -1553,7 +1549,7 @@ remoteDispatchDomainGetVcpus(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -1561,13 +1557,13 @@ remoteDispatchDomainGetVcpus(virNetServerPtr server ATTRIBUTE_UNUSED,
goto cleanup; goto cleanup;
if (args->maxinfo > REMOTE_VCPUINFO_MAX) { if (args->maxinfo > REMOTE_VCPUINFO_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("maxinfo > REMOTE_VCPUINFO_MAX")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("maxinfo > REMOTE_VCPUINFO_MAX"));
goto cleanup; goto cleanup;
} }
if (INT_MULTIPLY_OVERFLOW(args->maxinfo, args->maplen) || if (INT_MULTIPLY_OVERFLOW(args->maxinfo, args->maplen) ||
args->maxinfo * args->maplen > REMOTE_CPUMAPS_MAX) { args->maxinfo * args->maplen > REMOTE_CPUMAPS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("maxinfo * maplen > REMOTE_CPUMAPS_MAX")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("maxinfo * maplen > REMOTE_CPUMAPS_MAX"));
goto cleanup; goto cleanup;
} }
@ -1639,7 +1635,7 @@ remoteDispatchDomainMigratePrepare(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -1696,7 +1692,7 @@ remoteDispatchDomainMigratePrepare2(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -1747,14 +1743,14 @@ remoteDispatchDomainGetMemoryParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
flags = args->flags; flags = args->flags;
if (nparams > REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX) { if (nparams > REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup; goto cleanup;
} }
if (VIR_ALLOC_N(params, nparams) < 0) { if (VIR_ALLOC_N(params, nparams) < 0) {
@ -1812,14 +1808,14 @@ remoteDispatchDomainGetNumaParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
flags = args->flags; flags = args->flags;
if (nparams > REMOTE_DOMAIN_NUMA_PARAMETERS_MAX) { if (nparams > REMOTE_DOMAIN_NUMA_PARAMETERS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup; goto cleanup;
} }
if (VIR_ALLOC_N(params, nparams) < 0) { if (VIR_ALLOC_N(params, nparams) < 0) {
@ -1877,14 +1873,14 @@ remoteDispatchDomainGetBlkioParameters(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
flags = args->flags; flags = args->flags;
if (nparams > REMOTE_DOMAIN_BLKIO_PARAMETERS_MAX) { if (nparams > REMOTE_DOMAIN_BLKIO_PARAMETERS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup; goto cleanup;
} }
if (VIR_ALLOC_N(params, nparams) < 0) { if (VIR_ALLOC_N(params, nparams) < 0) {
@ -1943,14 +1939,14 @@ remoteDispatchNodeGetCPUStats(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
flags = args->flags; flags = args->flags;
if (nparams > REMOTE_NODE_CPU_STATS_MAX) { if (nparams > REMOTE_NODE_CPU_STATS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup; goto cleanup;
} }
if (VIR_ALLOC_N(params, nparams) < 0) { if (VIR_ALLOC_N(params, nparams) < 0) {
@ -2021,14 +2017,14 @@ remoteDispatchNodeGetMemoryStats(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
flags = args->flags; flags = args->flags;
if (nparams > REMOTE_NODE_MEMORY_STATS_MAX) { if (nparams > REMOTE_NODE_MEMORY_STATS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup; goto cleanup;
} }
if (VIR_ALLOC_N(params, nparams) < 0) { if (VIR_ALLOC_N(params, nparams) < 0) {
@ -2096,7 +2092,7 @@ remoteDispatchDomainGetBlockJobInfo(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -2138,12 +2134,12 @@ remoteDispatchDomainGetBlockIoTune(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
if (nparams > REMOTE_DOMAIN_BLOCK_IO_TUNE_PARAMETERS_MAX) { if (nparams > REMOTE_DOMAIN_BLOCK_IO_TUNE_PARAMETERS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup; goto cleanup;
} }
@ -2323,8 +2319,8 @@ remoteDispatchAuthSaslInit(virNetServerPtr server ATTRIBUTE_UNUSED,
authfail: authfail:
virResetLastError(); virResetLastError();
virNetError(VIR_ERR_AUTH_FAILED, "%s", virReportError(VIR_ERR_AUTH_FAILED, "%s",
_("authentication failed")); _("authentication failed"));
virNetMessageSaveError(rerr); virNetMessageSaveError(rerr);
PROBE(RPC_SERVER_CLIENT_AUTH_FAIL, PROBE(RPC_SERVER_CLIENT_AUTH_FAIL,
"client=%p auth=%d", "client=%p auth=%d",
@ -2474,8 +2470,8 @@ error:
virNetSASLSessionFree(priv->sasl); virNetSASLSessionFree(priv->sasl);
priv->sasl = NULL; priv->sasl = NULL;
virResetLastError(); virResetLastError();
virNetError(VIR_ERR_AUTH_FAILED, "%s", virReportError(VIR_ERR_AUTH_FAILED, "%s",
_("authentication failed")); _("authentication failed"));
if (rv < 0) if (rv < 0)
virNetMessageSaveError(rerr); virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock); virMutexUnlock(&priv->lock);
@ -2572,8 +2568,8 @@ error:
virNetSASLSessionFree(priv->sasl); virNetSASLSessionFree(priv->sasl);
priv->sasl = NULL; priv->sasl = NULL;
virResetLastError(); virResetLastError();
virNetError(VIR_ERR_AUTH_FAILED, "%s", virReportError(VIR_ERR_AUTH_FAILED, "%s",
_("authentication failed")); _("authentication failed"));
if (rv < 0) if (rv < 0)
virNetMessageSaveError(rerr); virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock); virMutexUnlock(&priv->lock);
@ -2588,8 +2584,8 @@ remoteDispatchAuthSaslInit(virNetServerPtr server ATTRIBUTE_UNUSED,
remote_auth_sasl_init_ret *ret ATTRIBUTE_UNUSED) remote_auth_sasl_init_ret *ret ATTRIBUTE_UNUSED)
{ {
VIR_WARN("Client tried unsupported SASL auth"); VIR_WARN("Client tried unsupported SASL auth");
virNetError(VIR_ERR_AUTH_FAILED, "%s", virReportError(VIR_ERR_AUTH_FAILED, "%s",
_("authentication failed")); _("authentication failed"));
virNetMessageSaveError(rerr); virNetMessageSaveError(rerr);
return -1; return -1;
} }
@ -2602,8 +2598,8 @@ remoteDispatchAuthSaslStart(virNetServerPtr server ATTRIBUTE_UNUSED,
remote_auth_sasl_start_ret *ret ATTRIBUTE_UNUSED) remote_auth_sasl_start_ret *ret ATTRIBUTE_UNUSED)
{ {
VIR_WARN("Client tried unsupported SASL auth"); VIR_WARN("Client tried unsupported SASL auth");
virNetError(VIR_ERR_AUTH_FAILED, "%s", virReportError(VIR_ERR_AUTH_FAILED, "%s",
_("authentication failed")); _("authentication failed"));
virNetMessageSaveError(rerr); virNetMessageSaveError(rerr);
return -1; return -1;
} }
@ -2616,8 +2612,8 @@ remoteDispatchAuthSaslStep(virNetServerPtr server ATTRIBUTE_UNUSED,
remote_auth_sasl_step_ret *ret ATTRIBUTE_UNUSED) remote_auth_sasl_step_ret *ret ATTRIBUTE_UNUSED)
{ {
VIR_WARN("Client tried unsupported SASL auth"); VIR_WARN("Client tried unsupported SASL auth");
virNetError(VIR_ERR_AUTH_FAILED, "%s", virReportError(VIR_ERR_AUTH_FAILED, "%s",
_("authentication failed")); _("authentication failed"));
virNetMessageSaveError(rerr); virNetMessageSaveError(rerr);
return -1; return -1;
} }
@ -2710,11 +2706,11 @@ error:
virResetLastError(); virResetLastError();
if (authdismissed) { if (authdismissed) {
virNetError(VIR_ERR_AUTH_CANCELLED, "%s", virReportError(VIR_ERR_AUTH_CANCELLED, "%s",
_("authentication cancelled by user")); _("authentication cancelled by user"));
} else { } else {
virNetError(VIR_ERR_AUTH_FAILED, "%s", virReportError(VIR_ERR_AUTH_FAILED, "%s",
pkout && *pkout ? pkout : _("authentication failed")); pkout && *pkout ? pkout : _("authentication failed"));
} }
VIR_FREE(pkout); VIR_FREE(pkout);
@ -2859,8 +2855,8 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
error: error:
VIR_FREE(ident); VIR_FREE(ident);
virResetLastError(); virResetLastError();
virNetError(VIR_ERR_AUTH_FAILED, "%s", virReportError(VIR_ERR_AUTH_FAILED, "%s",
_("authentication failed")); _("authentication failed"));
virNetMessageSaveError(rerr); virNetMessageSaveError(rerr);
virMutexUnlock(&priv->lock); virMutexUnlock(&priv->lock);
return -1; return -1;
@ -2888,8 +2884,8 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
remote_auth_polkit_ret *ret ATTRIBUTE_UNUSED) remote_auth_polkit_ret *ret ATTRIBUTE_UNUSED)
{ {
VIR_ERROR(_("client tried unsupported PolicyKit init request")); VIR_ERROR(_("client tried unsupported PolicyKit init request"));
virNetError(VIR_ERR_AUTH_FAILED, "%s", virReportError(VIR_ERR_AUTH_FAILED, "%s",
_("authentication failed")); _("authentication failed"));
virNetMessageSaveError(rerr); virNetMessageSaveError(rerr);
return -1; return -1;
} }
@ -2915,7 +2911,7 @@ remoteDispatchNodeDeviceGetParent(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -2968,14 +2964,14 @@ remoteDispatchDomainEventsRegister(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
virMutexLock(&priv->lock); virMutexLock(&priv->lock);
if (priv->domainEventCallbackID[VIR_DOMAIN_EVENT_ID_LIFECYCLE] != -1) { if (priv->domainEventCallbackID[VIR_DOMAIN_EVENT_ID_LIFECYCLE] != -1) {
virNetError(VIR_ERR_INTERNAL_ERROR, _("domain event %d already registered"), VIR_DOMAIN_EVENT_ID_LIFECYCLE); virReportError(VIR_ERR_INTERNAL_ERROR, _("domain event %d already registered"), VIR_DOMAIN_EVENT_ID_LIFECYCLE);
goto cleanup; goto cleanup;
} }
@ -3009,14 +3005,14 @@ remoteDispatchDomainEventsDeregister(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
virMutexLock(&priv->lock); virMutexLock(&priv->lock);
if (priv->domainEventCallbackID[VIR_DOMAIN_EVENT_ID_LIFECYCLE] < 0) { if (priv->domainEventCallbackID[VIR_DOMAIN_EVENT_ID_LIFECYCLE] < 0) {
virNetError(VIR_ERR_INTERNAL_ERROR, _("domain event %d not registered"), VIR_DOMAIN_EVENT_ID_LIFECYCLE); virReportError(VIR_ERR_INTERNAL_ERROR, _("domain event %d not registered"), VIR_DOMAIN_EVENT_ID_LIFECYCLE);
goto cleanup; goto cleanup;
} }
@ -3087,7 +3083,7 @@ remoteDispatchSecretGetValue(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3124,7 +3120,7 @@ remoteDispatchDomainGetState(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3157,7 +3153,7 @@ remoteDispatchDomainEventsRegisterAny(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3165,12 +3161,12 @@ remoteDispatchDomainEventsRegisterAny(virNetServerPtr server ATTRIBUTE_UNUSED,
if (args->eventID >= VIR_DOMAIN_EVENT_ID_LAST || if (args->eventID >= VIR_DOMAIN_EVENT_ID_LAST ||
args->eventID < 0) { args->eventID < 0) {
virNetError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %d"), args->eventID); virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %d"), args->eventID);
goto cleanup; goto cleanup;
} }
if (priv->domainEventCallbackID[args->eventID] != -1) { if (priv->domainEventCallbackID[args->eventID] != -1) {
virNetError(VIR_ERR_INTERNAL_ERROR, _("domain event %d already registered"), args->eventID); virReportError(VIR_ERR_INTERNAL_ERROR, _("domain event %d already registered"), args->eventID);
goto cleanup; goto cleanup;
} }
@ -3206,7 +3202,7 @@ remoteDispatchDomainEventsDeregisterAny(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3214,13 +3210,13 @@ remoteDispatchDomainEventsDeregisterAny(virNetServerPtr server ATTRIBUTE_UNUSED,
if (args->eventID >= VIR_DOMAIN_EVENT_ID_LAST || if (args->eventID >= VIR_DOMAIN_EVENT_ID_LAST ||
args->eventID < 0) { args->eventID < 0) {
virNetError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %d"), args->eventID); virReportError(VIR_ERR_INTERNAL_ERROR, _("unsupported event ID %d"), args->eventID);
goto cleanup; goto cleanup;
} }
callbackID = priv->domainEventCallbackID[args->eventID]; callbackID = priv->domainEventCallbackID[args->eventID];
if (callbackID < 0) { if (callbackID < 0) {
virNetError(VIR_ERR_INTERNAL_ERROR, _("domain event %d not registered"), args->eventID); virReportError(VIR_ERR_INTERNAL_ERROR, _("domain event %d not registered"), args->eventID);
goto cleanup; goto cleanup;
} }
@ -3252,7 +3248,7 @@ qemuDispatchMonitorCommand(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3293,7 +3289,7 @@ remoteDispatchDomainMigrateBegin3(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3344,7 +3340,7 @@ remoteDispatchDomainMigratePrepare3(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3404,7 +3400,7 @@ remoteDispatchDomainMigratePerform3(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3458,7 +3454,7 @@ remoteDispatchDomainMigrateFinish3(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3507,7 +3503,7 @@ remoteDispatchDomainMigrateConfirm3(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3555,7 +3551,7 @@ static int remoteDispatchSupportsFeature(
} }
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3595,7 +3591,7 @@ remoteDispatchDomainOpenGraphics(virNetServerPtr server ATTRIBUTE_UNUSED,
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3640,14 +3636,14 @@ remoteDispatchDomainGetInterfaceParameters(virNetServerPtr server ATTRIBUTE_UNUS
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
flags = args->flags; flags = args->flags;
if (nparams > REMOTE_DOMAIN_INTERFACE_PARAMETERS_MAX) { if (nparams > REMOTE_DOMAIN_INTERFACE_PARAMETERS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup; goto cleanup;
} }
if (VIR_ALLOC_N(params, nparams) < 0) { if (VIR_ALLOC_N(params, nparams) < 0) {
@ -3704,16 +3700,16 @@ remoteDispatchDomainGetCPUStats(virNetServerPtr server ATTRIBUTE_UNUSED,
priv = virNetServerClientGetPrivateData(client); priv = virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
if (args->nparams > REMOTE_NODE_CPU_STATS_MAX) { if (args->nparams > REMOTE_NODE_CPU_STATS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
goto cleanup; goto cleanup;
} }
if (args->ncpus > REMOTE_DOMAIN_GET_CPU_STATS_NCPUS_MAX) { if (args->ncpus > REMOTE_DOMAIN_GET_CPU_STATS_NCPUS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("ncpus too large")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("ncpus too large"));
goto cleanup; goto cleanup;
} }
@ -3779,7 +3775,7 @@ static int remoteDispatchDomainGetDiskErrors(
virNetServerClientGetPrivateData(client); virNetServerClientGetPrivateData(client);
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3787,8 +3783,8 @@ static int remoteDispatchDomainGetDiskErrors(
goto cleanup; goto cleanup;
if (args->maxerrors > REMOTE_DOMAIN_DISK_ERRORS_MAX) { if (args->maxerrors > REMOTE_DOMAIN_DISK_ERRORS_MAX) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("maxerrors too large")); _("maxerrors too large"));
goto cleanup; goto cleanup;
} }
@ -3842,7 +3838,7 @@ remoteDispatchDomainListAllSnapshots(virNetServerPtr server ATTRIBUTE_UNUSED,
virDomainPtr dom = NULL; virDomainPtr dom = NULL;
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }
@ -3903,7 +3899,7 @@ remoteDispatchDomainSnapshotListAllChildren(virNetServerPtr server ATTRIBUTE_UNU
virDomainSnapshotPtr snapshot = NULL; virDomainSnapshotPtr snapshot = NULL;
if (!priv->conn) { if (!priv->conn) {
virNetError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("connection not open"));
goto cleanup; goto cleanup;
} }

View File

@ -32,10 +32,6 @@
#define VIR_FROM_THIS VIR_FROM_STREAMS #define VIR_FROM_THIS VIR_FROM_STREAMS
#define virNetError(code, ...) \
virReportErrorHelper(VIR_FROM_THIS, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
struct daemonClientStream { struct daemonClientStream {
daemonClientPrivatePtr priv; daemonClientPrivatePtr priv;
int refs; int refs;
@ -233,11 +229,11 @@ daemonStreamEvent(virStreamPtr st, int events, void *opaque)
virStreamEventRemoveCallback(stream->st); virStreamEventRemoveCallback(stream->st);
virStreamAbort(stream->st); virStreamAbort(stream->st);
if (events & VIR_STREAM_EVENT_HANGUP) if (events & VIR_STREAM_EVENT_HANGUP)
virNetError(VIR_ERR_RPC, virReportError(VIR_ERR_RPC,
"%s", _("stream had unexpected termination")); "%s", _("stream had unexpected termination"));
else else
virNetError(VIR_ERR_RPC, virReportError(VIR_ERR_RPC,
"%s", _("stream had I/O failure")); "%s", _("stream had I/O failure"));
msg = virNetMessageNew(false); msg = virNetMessageNew(false);
if (!msg) { if (!msg) {
@ -618,13 +614,13 @@ daemonStreamHandleAbort(virNetServerClientPtr client,
virStreamAbort(stream->st); virStreamAbort(stream->st);
if (msg->header.status == VIR_NET_ERROR) if (msg->header.status == VIR_NET_ERROR)
virNetError(VIR_ERR_RPC, virReportError(VIR_ERR_RPC,
"%s", _("stream aborted at client request")); "%s", _("stream aborted at client request"));
else { else {
VIR_WARN("unexpected stream status %d", msg->header.status); VIR_WARN("unexpected stream status %d", msg->header.status);
virNetError(VIR_ERR_RPC, virReportError(VIR_ERR_RPC,
_("stream aborted with unexpected status %d"), _("stream aborted with unexpected status %d"),
msg->header.status); msg->header.status);
} }
return virNetServerProgramSendReplyError(remoteProgram, return virNetServerProgramSendReplyError(remoteProgram,

View File

@ -778,15 +778,15 @@ elsif ($opt_b) {
print "\n"; print "\n";
print " if (!priv->conn) {\n"; print " if (!priv->conn) {\n";
print " virNetError(VIR_ERR_INTERNAL_ERROR, \"%s\", _(\"connection not open\"));\n"; print " virReportError(VIR_ERR_INTERNAL_ERROR, \"%s\", _(\"connection not open\"));\n";
print " goto cleanup;\n"; print " goto cleanup;\n";
print " }\n"; print " }\n";
print "\n"; print "\n";
if ($single_ret_as_list) { if ($single_ret_as_list) {
print " if (args->$single_ret_list_max_var > $single_ret_list_max_define) {\n"; print " if (args->$single_ret_list_max_var > $single_ret_list_max_define) {\n";
print " virNetError(VIR_ERR_INTERNAL_ERROR,\n"; print " virReportError(VIR_ERR_INTERNAL_ERROR,\n";
print " \"%s\", _(\"max$single_ret_list_name > $single_ret_list_max_define\"));\n"; print " \"%s\", _(\"max$single_ret_list_name > $single_ret_list_max_define\"));\n";
print " goto cleanup;\n"; print " goto cleanup;\n";
print " }\n"; print " }\n";
print "\n"; print "\n";