qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 7/7] exec: add parameter errp to gethugepages


From: Hu Tao
Subject: Re: [Qemu-devel] [PATCH v6 7/7] exec: add parameter errp to gethugepagesize
Date: Fri, 15 Aug 2014 17:55:26 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Aug 07, 2014 at 12:00:47PM +0000, Gonglei (Arei) wrote:
> > -----Original Message-----
> > From: address@hidden
> > [mailto:address@hidden On
> > Behalf Of Peter Crosthwaite
> > Sent: Thursday, August 07, 2014 7:47 PM
> > To: Hu Tao
> > Cc: Yasunori Goto; Paolo Bonzini; Yasuaki Isimatu; address@hidden
> > 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 <address@hidden> 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 <address@hidden>
> > 
> > Otherwise:
> > 
> > Reviewed-by: Peter Crosthwaite <address@hidden>
> > 
> > > ---
> > >  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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]