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>
This commit is contained in:
Markus Armbruster
2025-11-21 13:14:32 +01:00
parent aca7194284
commit 9c3a66f5c4

View File

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