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

[Libvir] Re: take 2 [Re: write(2) may write less than the total requested



On Wed, Feb 20, 2008 at 04:42:12PM +0100, Jim Meyering wrote:
> Daniel Veillard <veillard redhat com> wrote:
> >   maybe for case outside of the library adding a copy of safewrite
> > in virsh.c would be a good way to do this while keeping the code
> > consistent. The duplication of that small function whould not
> > be a real problem IMHO
> 
> Thanks for the quick review.
> That would work well.
> 
> It's needed also for qemud.c, which already includes util.h
> and uses functions like __virStrToLong_i, yet linking libvirtd
> would currently fail due to the uses of safewrite.
> 
> If I do as you suggest and move the safewrite definition into util.h,
> and make it static inline, then both problems go away.

  That's not what I suggested. Just make a copy of the function in virsh.c
Inlining IMHO raises more problems than it solves. In that case duplicating
the code to clean up virsh.c own code does not sound unreasonable.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/


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