[libvirt] [PATCH 2/3]cgroup: show error when EINVAL caught

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Wed Oct 16 01:11:31 UTC 2013



> -----Original Message-----
> From: Daniel P. Berrange [mailto:berrange at redhat.com]
> Sent: Tuesday, October 15, 2013 7:24 PM
> To: Chen Hanxiao
> Cc: libvir-list at redhat.com
> Subject: Re: [libvirt] [PATCH 2/3]cgroup: show error when EINVAL caught
> 
> On Fri, Oct 11, 2013 at 09:41:23PM +0800, Chen Hanxiao wrote:
> > From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> >
> 
> This would fail to raise an error if '!tmp', so I re-arranged
> the code todo
> 
>   if (errno == EINVAL &&
>       (tmp = strrchr(keypath, '/'))) {
>     ...
> 
> so it falls back to the existing error report

Thanks for your help. I'll be more careful next time.

> 
> > +            virReportSystemError(errno,
> > +                                 _("Invalid value '%s' for '%s'"),
> value, ++tmp);
> > +            goto cleanup;





More information about the libvir-list mailing list