From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PULL 17/17] block/file-win32: Improve an error message
Date: Wed, 7 Jan 2026 13:43:41 +0100 [thread overview]
Message-ID: <20260107124341.1093312-18-armbru@redhat.com> (raw)
In-Reply-To: <20260107124341.1093312-1-armbru@redhat.com>
Two out of three calls of CreateFile() use error_setg_win32() to
report errors. The third uses error_setg_errno(), mapping
ERROR_ACCESS_DENIED to EACCES, and everything else to EINVAL, throwing
away detail. Switch it to error_setg_win32().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20251121121438.1249498-16-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
block/file-win32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/file-win32.c b/block/file-win32.c
index b00039bf94..b63ce1c189 100644
--- a/block/file-win32.c
+++ b/block/file-win32.c
@@ -872,7 +872,7 @@ static int hdev_open(BlockDriverState *bs, QDict *options, int flags,
} else {
ret = -EINVAL;
}
- error_setg_errno(errp, -ret, "Could not open device");
+ error_setg_win32(errp, err, "Could not open device");
goto done;
}
--
2.52.0
prev parent reply other threads:[~2026-01-07 13:26 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 ` [PULL 07/17] ui: Convert to qemu_create() for simplicity and consistency Markus Armbruster
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 ` Markus Armbruster [this message]
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-18-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=philmd@linaro.org \
--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.