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:
Markus Armbruster
2025-11-21 13:14:26 +01:00
parent 13837193fa
commit 5657d9b60a

View File

@@ -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;
} }