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

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

 



On Wed, Feb 20, 2008 at 04:42:12PM +0100, Jim Meyering wrote:
> Daniel Veillard <veillard@xxxxxxxxxx> 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@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]