* user_creatable_add_opts_foreach:
* @opaque: a user_creatable_add_opts_predicate callback or NULL
* @opts: options to create
- * @errp: if an error occurs, a pointer to an area to store the error
+ * @errp: unused
*
* An iterator callback to be used in conjunction with
* the qemu_opts_foreach() method for creating a list of
*
* The @opaque parameter can be passed a user_creatable_add_opts_predicate
* callback to filter which types of object are created during iteration.
+ * When it fails, report the error.
*
- * Returns: 0 on success, -1 on error
+ * Returns: 0 on success, -1 when an error was reported.
*/
int user_creatable_add_opts_foreach(void *opaque,
QemuOpts *opts, Error **errp);
if (qemu_opts_foreach(&qemu_object_opts,
user_creatable_add_opts_foreach,
- NULL, &local_err)) {
- error_report_err(local_err);
+ NULL, NULL)) {
goto fail;
}
bool writethrough;
ImageCheck *check;
bool quiet = false;
- Error *local_err = NULL;
bool image_opts = false;
fmt = NULL;
if (qemu_opts_foreach(&qemu_object_opts,
user_creatable_add_opts_foreach,
- NULL, &local_err)) {
- error_report_err(local_err);
+ NULL, NULL)) {
return 1;
}
if (qemu_opts_foreach(&qemu_object_opts,
user_creatable_add_opts_foreach,
- NULL, &local_err)) {
- error_report_err(local_err);
+ NULL, NULL)) {
return 1;
}
int64_t nb_sectors;
int c, pnum;
uint64_t progress_base;
- Error *local_err = NULL;
bool image_opts = false;
cache = BDRV_DEFAULT_CACHE;
if (qemu_opts_foreach(&qemu_object_opts,
user_creatable_add_opts_foreach,
- NULL, &local_err)) {
- error_report_err(local_err);
+ NULL, NULL)) {
ret = 2;
goto out4;
}
if (qemu_opts_foreach(&qemu_object_opts,
user_creatable_add_opts_foreach,
- NULL, &local_err)) {
- error_report_err(local_err);
+ NULL, NULL)) {
goto fail_getopt;
}
bool chain = false;
const char *filename, *fmt, *output;
ImageInfoList *list;
- Error *local_err = NULL;
bool image_opts = false;
fmt = NULL;
if (qemu_opts_foreach(&qemu_object_opts,
user_creatable_add_opts_foreach,
- NULL, &local_err)) {
- error_report_err(local_err);
+ NULL, NULL)) {
return 1;
}
int64_t length;
MapEntry curr = { .length = 0 }, next;
int ret = 0;
- Error *local_err = NULL;
bool image_opts = false;
fmt = NULL;
if (qemu_opts_foreach(&qemu_object_opts,
user_creatable_add_opts_foreach,
- NULL, &local_err)) {
- error_report_err(local_err);
+ NULL, NULL)) {
return 1;
}
if (qemu_opts_foreach(&qemu_object_opts,
user_creatable_add_opts_foreach,
- NULL, &err)) {
- error_report_err(err);
+ NULL, NULL)) {
return 1;
}
if (qemu_opts_foreach(&qemu_object_opts,
user_creatable_add_opts_foreach,
- NULL, &local_err)) {
- error_report_err(local_err);
+ NULL, NULL)) {
return 1;
}
bool quiet = false;
BlockBackend *blk = NULL;
QemuOpts *param;
- Error *local_err = NULL;
static QemuOptsList resize_options = {
.name = "resize_options",
if (qemu_opts_foreach(&qemu_object_opts,
user_creatable_add_opts_foreach,
- NULL, &local_err)) {
- error_report_err(local_err);
+ NULL, NULL)) {
return 1;
}
bool quiet = false, progress = false;
BlockBackend *blk = NULL;
BlockDriverState *bs = NULL;
- Error *local_err = NULL;
bool image_opts = false;
cache = BDRV_DEFAULT_CACHE;
if (qemu_opts_foreach(&qemu_object_opts,
user_creatable_add_opts_foreach,
- NULL, &local_err)) {
- error_report_err(local_err);
+ NULL, NULL)) {
ret = -1;
goto out_no_progress;
}
if (qemu_opts_foreach(qemu_find_opts("object"),
user_creatable_add_opts_foreach,
- object_create_initial, &err)) {
- error_report_err(err);
+ object_create_initial, NULL)) {
exit(1);
}
if (qemu_opts_foreach(qemu_find_opts("object"),
user_creatable_add_opts_foreach,
- object_create_delayed, &err)) {
- error_report_err(err);
+ object_create_delayed, NULL)) {
exit(1);
}