]> Git Repo - qemu.git/commit - exec.c
exec: add parameter errp to gethugepagesize
authorHu Tao <[email protected]>
Tue, 9 Sep 2014 05:28:01 +0000 (13:28 +0800)
committerPaolo Bonzini <[email protected]>
Tue, 9 Sep 2014 11:41:44 +0000 (13:41 +0200)
commitfc7a5800ad13fa14529b38d2255fa87f11db626b
tree3fd5c1f7760777694b66c39e0c10f50e87c1e754
parent557529dd600fb0f1fc52e86c9679afa6a9368bc8
exec: add parameter errp to gethugepagesize

Add parameter errp to gethugepagesize thus callers can handle errors.

If user adds a memory-backend-file object using object_add command,
specifying a non-existing directory for property mem-path, qemu will
core dump with message:

  /nonexistingdir: No such file or directory
  Bad ram offset fffffffffffff000
  Aborted (core dumped)

This patch fixes the problem. With this patch, qemu reports an error
message like:

  qemu-system-x86_64: -object memory-backend-file,mem-path=/nonexistingdir,id=mem-file0,size=128M:
  failed to get page size of file /nonexistingdir: No such file or directory

Signed-off-by: Hu Tao <[email protected]>
Reviewed-by: Peter Crosthwaite <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
exec.c
This page took 0.022829 seconds and 4 git commands to generate.