From 49826eda7a1da3fb35fc62f340ecdb1d948b0347 Mon Sep 17 00:00:00 2001 From: Osier Yang Date: Mon, 4 Jul 2011 16:13:23 +0800 Subject: [PATCH] storage: Do not override the exact error of createRawFile virStorageBackendCreateRaw: createRawFile already reported the exact error. Before the fix: error: Failed to create vol vol-create.img error: cannot create path '/var/lib/libvirt/images/vol-create.img': Unknown error 18446744073709551597 After the fix: error: Failed to create vol vol-create.img error: cannot fill file '/var/lib/libvirt/images/vol-create.img': No space left on device --- src/storage/storage_backend.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c index a6e66e1c1e..708d7b28ca 100644 --- a/src/storage/storage_backend.c +++ b/src/storage/storage_backend.c @@ -399,12 +399,9 @@ virStorageBackendCreateRaw(virConnectPtr conn ATTRIBUTE_UNUSED, goto cleanup; } - if ((ret = createRawFile(fd, vol, inputvol)) < 0) { - virReportSystemError(-fd, - _("cannot create path '%s'"), - vol->target.path); + if ((ret = createRawFile(fd, vol, inputvol)) < 0) + /* createRawFile already reported the exact error. */ ret = -1; - } cleanup: VIR_FORCE_CLOSE(fd); -- GitLab