Indicate that not stopping on get_file_size() errors in file_ram_alloc()
is on purpose and not a mistake.

Signed-off-by: Haozhong Zhang <haozhong.zh...@intel.com>
---
 exec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/exec.c b/exec.c
index 3d867f1..68b0c92 100644
--- a/exec.c
+++ b/exec.c
@@ -1314,6 +1314,9 @@ static void *file_ram_alloc(RAMBlock *block,
     }
 #endif
 
+    /* If QEMU fails to get the backend file size, i.e. file_size < 0,
+     * it will treat the file as non-empty and not truncate it.
+     */
     file_size = get_file_size(fd);
 
     if (memory < block->page_size) {
-- 
2.10.1


Reply via email to