aboutsummaryrefslogtreecommitdiff
path: root/block/file-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/file-posix.c')
-rw-r--r--block/file-posix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/file-posix.c b/block/file-posix.c
index b8b4dad..e41e91e 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -217,7 +217,7 @@ static int raw_normalize_devicepath(const char **filename, Error **errp)
fname = *filename;
dp = strrchr(fname, '/');
if (lstat(fname, &sb) < 0) {
- error_setg_errno(errp, errno, "%s: stat failed", fname);
+ error_setg_file_open(errp, errno, fname);
return -errno;
}
@@ -561,7 +561,7 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
ret = fd < 0 ? -errno : 0;
if (ret < 0) {
- error_setg_errno(errp, -ret, "Could not open '%s'", filename);
+ error_setg_file_open(errp, -ret, filename);
if (ret == -EROFS) {
ret = -EACCES;
}