On Thu, Aug 07, 2014 at 12:00:47PM +0000, Gonglei (Arei) wrote: > > -----Original Message----- > > From: qemu-devel-bounces+arei.gonglei=huawei....@nongnu.org > > [mailto:qemu-devel-bounces+arei.gonglei=huawei....@nongnu.org] On > > Behalf Of Peter Crosthwaite > > Sent: Thursday, August 07, 2014 7:47 PM > > To: Hu Tao > > Cc: Yasunori Goto; Paolo Bonzini; Yasuaki Isimatu; qemu-devel@nongnu.org > > Developers; Michael S. Tsirkin > > Subject: Re: [Qemu-devel] [PATCH v6 7/7] exec: add parameter errp to > > gethugepagesize > > > > On Thu, Aug 7, 2014 at 7:10 PM, Hu Tao <hu...@cn.fujitsu.com> wrote: > > > Add parameter errp to gethugepagesize thus callers can handle errors. > > > > > > This patch fixes a problem that 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: > > > > Same long sentence issue here, > > > > > > > > /nonexistingdir: No such file or directory > > > Bad ram offset fffffffffffff000 > > > Aborted (core dumped) > > > > > > with this patch, qemu reports error message like: > > > > > > qemu-system-x86_64: -object > > memory-backend-file,mem-path=/nonexistingdir,id=mem-file0,size=128M: > > > failed to stat file /nonexistingdir: No such file or directory > > > > > > Signed-off-by: Hu Tao <hu...@cn.fujitsu.com> > > > > Otherwise: > > > > Reviewed-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com> > > > > > --- > > > exec.c | 11 +++++++---- > > > 1 file changed, 7 insertions(+), 4 deletions(-) > > > > > > diff --git a/exec.c b/exec.c > > > index 50cd510..fdef0f7 100644 > > > --- a/exec.c > > > +++ b/exec.c > > > @@ -996,7 +996,7 @@ void qemu_mutex_unlock_ramlist(void) > > > > > > #define HUGETLBFS_MAGIC 0x958458f6 > > > > > > -static long gethugepagesize(const char *path) > > > +static long gethugepagesize(const char *path, Error **errp) > > I'm not following this series, but the function name is not idiomatic QEMU > coding style IMHO.
This can be another patch. Regards, Hu