[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 12/14] error: Use error_setg_errno() for simplicity and consistency
- To: "Dr. David Alan Gilbert" <dave@xxxxxxxxxxx>
- From: Markus Armbruster <armbru@xxxxxxxxxx>
- Date: Fri, 21 Nov 2025 06:47:18 +0100
- Cc: qemu-devel@xxxxxxxxxx, arei.gonglei@xxxxxxxxxx, pizhenwei@xxxxxxxxxxxxx, alistair.francis@xxxxxxx, stefanb@xxxxxxxxxxxxxxxxxx, kwolf@xxxxxxxxxx, hreitz@xxxxxxxxxx, sw@xxxxxxxxxxx, qemu_oss@xxxxxxxxxxxxx, groug@xxxxxxxx, mst@xxxxxxxxxx, imammedo@xxxxxxxxxx, anisinha@xxxxxxxxxx, kraxel@xxxxxxxxxx, shentey@xxxxxxxxx, npiggin@xxxxxxxxx, harshpb@xxxxxxxxxxxxx, sstabellini@xxxxxxxxxx, anthony@xxxxxxxxxxxxxx, paul@xxxxxxx, edgar.iglesias@xxxxxxxxx, elena.ufimtseva@xxxxxxxxxx, jag.raman@xxxxxxxxxx, sgarzare@xxxxxxxxxx, pbonzini@xxxxxxxxxx, fam@xxxxxxxxxx, philmd@xxxxxxxxxx, alex@xxxxxxxxxxx, clg@xxxxxxxxxx, peterx@xxxxxxxxxx, farosas@xxxxxxx, lizhijian@xxxxxxxxxxx, jasowang@xxxxxxxxxx, samuel.thibault@xxxxxxxxxxxx, michael.roth@xxxxxxx, kkostiuk@xxxxxxxxxx, zhao1.liu@xxxxxxxxx, mtosatti@xxxxxxxxxx, rathc@xxxxxxxxxxxxx, palmer@xxxxxxxxxxx, liwei1518@xxxxxxxxx, dbarboza@xxxxxxxxxxxxxxxx, zhiwei_liu@xxxxxxxxxxxxxxxxx, marcandre.lureau@xxxxxxxxxx, qemu-block@xxxxxxxxxx, qemu-ppc@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, qemu-riscv@xxxxxxxxxx
- Delivery-date: Fri, 21 Nov 2025 05:58:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Resent-date: Fri, 21 Nov 2025 06:58:33 +0100
- Resent-from: Markus Armbruster <armbru@xxxxxxxxxx>
- Resent-message-id: <87wm3korjq.fsf@xxxxxxxxxxxx>
- Resent-to: michael.roth@xxxxxxx, qemu_oss@xxxxxxxxxxxxx, palmer@xxxxxxxxxxx, samuel.thibault@xxxxxxxxxxxx, fam@xxxxxxxxxx, lizhijian@xxxxxxxxxxx, edgar.iglesias@xxxxxxxxx, liwei1518@xxxxxxxxx, npiggin@xxxxxxxxx, shentey@xxxxxxxxx, arei.gonglei@xxxxxxxxxx, zhao1.liu@xxxxxxxxx, groug@xxxxxxxx, sstabellini@xxxxxxxxxx, philmd@xxxxxxxxxx, zhiwei_liu@xxxxxxxxxxxxxxxxx, harshpb@xxxxxxxxxxxxx, rathc@xxxxxxxxxxxxx, stefanb@xxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, qemu-block@xxxxxxxxxx, qemu-devel@xxxxxxxxxx, qemu-ppc@xxxxxxxxxx, qemu-riscv@xxxxxxxxxx, elena.ufimtseva@xxxxxxxxxx, jag.raman@xxxxxxxxxx, alex@xxxxxxxxxxx, farosas@xxxxxxx, dave@xxxxxxxxxxx, dbarboza@xxxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, alistair.francis@xxxxxxx, sw@xxxxxxxxxxx, paul@xxxxxxx, anthony@xxxxxxxxxxxxxx
"Dr. David Alan Gilbert" <dave@xxxxxxxxxxx> writes:
> * Markus Armbruster (armbru@xxxxxxxxxx) wrote:
>> Use error_setg_errno() instead of passing the value of strerror() or
>> g_strerror() to error_setg().
>>
>> The separator between the error message proper and the value of
>> strerror() changes from " : ", "", " - ", "- " to ": " in places.
>>
>> Signed-off-by: Markus Armbruster <armbru@xxxxxxxxxx>
>
>> @@ -792,9 +792,9 @@ static void vfu_object_init_ctx(VfuObject *o, Error
>> **errp)
>> VFU_REGION_FLAG_RW | VFU_REGION_FLAG_ALWAYS_CB,
>> NULL, 0, -1, 0);
>> if (ret < 0) {
>> - error_setg(errp,
>> - "vfu: Failed to setup config space handlers for %s- %s",
>> - o->device, strerror(errno));
>> + error_setg_errno(errp,
>> + "vfu: Failed to setup config space handlers for
>> %s",
>> + o->device);
>
> missing errno.
Yes.
>> goto fail;
>> }
>>
>> @@ -822,8 +822,8 @@ static void vfu_object_init_ctx(VfuObject *o, Error
>> **errp)
>>
>> ret = vfu_realize_ctx(o->vfu_ctx);
>> if (ret < 0) {
>> - error_setg(errp, "vfu: Failed to realize device %s- %s",
>> - o->device, strerror(errno));
>> + error_setg_errno(errp, "vfu: Failed to realize device %s",
>> + o->device);
>
> missing errno.
Yes. Another file my build tree doesn't compile anymore. Will fix,
thanks!
[...]
|