mirror of
https://github.com/qemu/qemu.git
synced 2026-02-04 02:24:38 +00:00
ui: Convert to qemu_create() for simplicity and consistency
The error message changes from
failed to open file 'FILENAME': REASON
to
Could not create 'FILENAME': REASON
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20251121121438.1249498-4-armbru@redhat.com>
This commit is contained in:
@@ -369,10 +369,8 @@ qmp_screendump(const char *filename, const char *device,
|
|||||||
}
|
}
|
||||||
image = pixman_image_ref(surface->image);
|
image = pixman_image_ref(surface->image);
|
||||||
|
|
||||||
fd = qemu_open_old(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666);
|
fd = qemu_create(filename, O_WRONLY | O_TRUNC | O_BINARY, 0666, errp);
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
error_setg(errp, "failed to open file '%s': %s", filename,
|
|
||||||
strerror(errno));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user