[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH] Use error_fatal to simplify obvious fatal errors
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-arm] [PATCH] Use error_fatal to simplify obvious fatal errors |
Date: |
Thu, 10 Dec 2015 11:49:02 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 10/12/2015 11:19, Markus Armbruster wrote:
> + object_property_set_int(OBJECT(cpu), ZYNQ_BOARD_MIDR, "midr",
> +
> &error_fatal);object_property_set_int(OBJECT(cpu),
> +
> MPCORE_PERIPHBASE,
> +
> "reset-cbar",
> +
> &error_fatal);object_property_set_bool(OBJECT(cpu),
> +
> true,
> +
> "realized",
> +
> &error_fatal);
Something went wrong here. :)
> void qdev_prop_set_drive_nofail(DeviceState *dev, const char *name,
> BlockBackend *value)
> {
> - Error *err = NULL;
> -
> - qdev_prop_set_drive(dev, name, value, &err);
> - if (err) {
> - error_report_err(err);
> - exit(1);
> - }
> + qdev_prop_set_drive(dev, name, value, &error_fatal);
> }
This should be inlined entirely into the callers (possibly as a follow up).
Otherwise looks great, thanks!
Paolo