Commit 9c3a66f5c4 for qemu.org
commit 9c3a66f5c40ddf2d45b449459162651cb0126a33
Author: Markus Armbruster <armbru@redhat.com>
Date: Fri Nov 21 13:14:32 2025 +0100
blkdebug: Use error_setg_file_open() for a better error message
The error message changes from
Could not read blkdebug config file: REASON
to
Could not open 'FNAME': REASON
I think the exact file name is more useful to know than the file's
purpose.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20251121121438.1249498-10-armbru@redhat.com>
diff --git a/block/blkdebug.c b/block/blkdebug.c
index c54aee0c84..8a4a8cb85e 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -288,7 +288,7 @@ static int read_config(BDRVBlkdebugState *s, const char *filename,
if (filename) {
f = fopen(filename, "r");
if (f == NULL) {
- error_setg_errno(errp, errno, "Could not read blkdebug config file");
+ error_setg_file_open(errp, errno, filename);
return -errno;
}