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 d81eccc191..bfef91db63 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1724,7 +1724,7 @@ static int raw_regular_truncate(int fd, int64_t offset, PreallocMode prealloc,
default:
result = -ENOTSUP;
error_setg(errp, "Unsupported preallocation mode: %s",
- PreallocMode_lookup[prealloc]);
+ PreallocMode_str(prealloc));
return result;
}
@@ -1759,7 +1759,7 @@ static int raw_truncate(BlockDriverState *bs, int64_t offset,
if (prealloc != PREALLOC_MODE_OFF) {
error_setg(errp, "Preallocation mode '%s' unsupported for this "
- "non-regular file", PreallocMode_lookup[prealloc]);
+ "non-regular file", PreallocMode_str(prealloc));
return -ENOTSUP;
}