All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org
Subject: [PULL 07/17] ui: Convert to qemu_create() for simplicity and consistency
Date: Wed,  7 Jan 2026 13:43:31 +0100	[thread overview]
Message-ID: <20260107124341.1093312-8-armbru@redhat.com> (raw)
In-Reply-To: <20260107124341.1093312-1-armbru@redhat.com>

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>
---
 ui/ui-qmp-cmds.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/ui/ui-qmp-cmds.c b/ui/ui-qmp-cmds.c
index 74fa6c6ec5..b49b636152 100644
--- a/ui/ui-qmp-cmds.c
+++ b/ui/ui-qmp-cmds.c
@@ -369,10 +369,8 @@ qmp_screendump(const char *filename, const char *device,
     }
     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) {
-        error_setg(errp, "failed to open file '%s': %s", filename,
-                   strerror(errno));
         return;
     }
 
-- 
2.52.0




  parent reply	other threads:[~2026-01-07 13:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07 12:43 [PULL 00/17] Error reporting patches for 2026-01-07 Markus Armbruster
2026-01-07 12:43 ` [PULL 01/17] hw/core/loader: Make load_elf_hdr() return bool, simplify caller Markus Armbruster
2026-01-07 12:43 ` [PULL 02/17] hw/nvram/xlnx-bbram: More idiomatic and simpler error reporting Markus Armbruster
2026-01-07 12:43 ` [PULL 03/17] nbd/client-connection: Replace error_propagate() by assignment Markus Armbruster
2026-01-07 12:43 ` [PULL 04/17] error: error_free(NULL) is safe, drop unnecessary conditionals Markus Armbruster
2026-01-07 12:43 ` [PULL 05/17] error: Consistently name Error * objects err, and not errp Markus Armbruster
2026-01-07 12:43 ` [PULL 06/17] error: Strip trailing '\n' from error string arguments (again) Markus Armbruster
2026-01-07 12:43 ` Markus Armbruster [this message]
2026-01-07 12:43 ` [PULL 08/17] tap-solaris: Use error_setg_file_open() for better error messages Markus Armbruster
2026-01-07 12:43 ` [PULL 09/17] qga: " Markus Armbruster
2026-01-07 12:43 ` [PULL 10/17] net/tap: Use error_setg_file_open() for a better error message Markus Armbruster
2026-01-07 12:43 ` [PULL 11/17] blkdebug: " Markus Armbruster
2026-01-07 12:43 ` [PULL 12/17] error: Use error_setg_file_open() for simplicity and consistency Markus Armbruster
2026-01-07 12:43 ` [PULL 13/17] net/slirp: Improve file open error message Markus Armbruster
2026-01-07 12:43 ` [PULL 14/17] error: Use error_setg_errno() to improve error messages Markus Armbruster
2026-01-08  4:15   ` Richard Henderson
2026-01-08  6:55     ` Markus Armbruster
2026-01-07 12:43 ` [PULL 15/17] error: Use error_setg_errno() for simplicity and consistency Markus Armbruster
2026-01-07 12:43 ` [PULL 16/17] qga/commands-win32: Use error_setg_win32() for better error messages Markus Armbruster
2026-01-07 12:43 ` [PULL 17/17] block/file-win32: Improve an error message Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260107124341.1093312-8-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.