]> git.ipfire.org Git - thirdparty/qemu.git/commit
error: Use error_setg_file_open() for simplicity and consistency
authorMarkus Armbruster <armbru@redhat.com>
Fri, 21 Nov 2025 12:14:33 +0000 (13:14 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 7 Jan 2026 12:24:41 +0000 (13:24 +0100)
commitd84870f2b899e57193cdfd4d34cb6a5c2f9fc586
tree26121997e70ca3938efaa5472e2fd106b909bd3c
parent9c3a66f5c40ddf2d45b449459162651cb0126a33
error: Use error_setg_file_open() for simplicity and consistency

Replace

    error_setg_errno(errp, errno, MSG, FNAME);

by

    error_setg_file_open(errp, errno, FNAME);

where MSG is "Could not open '%s'" or similar.

Also replace equivalent uses of error_setg().

A few messages lose prefixes ("net dump: ", "SEV: ", __func__ ": ").
We could put them back with error_prepend().  Not worth the bother.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Message-ID: <20251121121438.1249498-11-armbru@redhat.com>
[Conflict with commit 26b4a6ffe7f (monitor/hmp: Merge
hmp-cmds-target.c within hmp-cmds.c) resolved]
hw/9pfs/9p-local.c
hw/acpi/core.c
hw/core/loader.c
hw/pci-host/xen_igd_pt.c
monitor/hmp-cmds.c
net/dump.c
net/tap-bsd.c
net/tap-linux.c
target/i386/sev.c
util/vfio-helpers.c