Don't use virFileReadLimFD in qemuDomainRestore.
Don't use virFileReadLimFD in qemuDomainRestore.

virFileReadLimFD is a poor fit for reading the header
of the restore file.  The problem is that virFileReadLimFD
returns an error when there is more data after the amount
you ask to read, but that is *expected* in this case.

This patch is essentially a revert of
1a4d5c9543641c444dccd682f6256ee3faf22a80, but I don't think
that commit does what it says anyway.  It purports to prevent
an unwarranted OOM error, but since virFileReadLimFD will
allocate memory up to the maximum anyway, the upper limit
on the total amount of memory allocated is the same for either
the old version or the new version.  Since the old saferead
actually works and virFileReadLimFD does not, revert to
using saferead.

Signed-off-by: Chris Lalancette <60b62644009db6b194cc0445b64e9b27bb26433a@redhat.com>

dumbbell/libvirt,rbu/libvirt,jardasgit/libvirt,jeckersb/libvirt,leilihh/libvirt,rmarwaha/libvirt,bjzhang/libvirt,jardasgit/libvirt,wiedi/libvirt,fabianfreyer/libvirt,rlaager/libvirt,siboulet/libvirt-openvz,emaste/libvirt,elmarco/libvirt,amery/libvirt-vserver,elmarco/libvirt,novel/fbsd-libvirt,rmarwaha/libvirt,trainstack/libvirt,zippy2/libvirt,rbu/libvirt,nertpinx/libvirt,jfehlig/libvirt,novel/fbsd-libvirt,jeckersb/libvirt,agx/libvirt,rbu/libvirt,leilihh/libvirt,cbosdo/libvirt,rlaager/libvirt,trainstack/libvirt,novel/fbsd-libvirt,danwent/libvirt-ovs,novel/fbsd-libvirt,soulxu/libvirt-xuhj,bjzhang/libvirt,foomango/libvirt,warewolf/libvirt,wiedi/libvirt,zhlcindy/libvirt-1.1.4-maintain,libvirt/libvirt,rbu/libvirt,jeckersb/libvirt,iam-TJ/libvirt,olafhering/libvirt,cbosdo/libvirt,sshah-solarflare/Libvirt-PCI-passthrough-,sshah-solarflare/Libvirt-PCI-passthrough-,iam-TJ/libvirt,usc-isi/libvirt,jardasgit/libvirt,crobinso/libvirt,zippy2/libvirt,usc-isi/libvirt,eskultety/libvirt,datto/libvirt,warewolf/libvirt,emaste/libvirt,dumbbell/libvirt,warewolf/libvirt,rmarwaha/libvirt,shugaoye/libvirt,datto/libvirt,elmarco/libvirt,kantai/libvirt-vfork,agx/libvirt,warewolf/libvirt,rmarwaha/libvirt1,rmarwaha/libvirt,trainstack/libvirt,warewolf/libvirt,rlaager/libvirt,zhlcindy/libvirt-1.1.4-maintain,andreabolognani/libvirt,iam-TJ/libvirt,iam-TJ/libvirt,sshah-solarflare/Libvirt-PCI-passthrough-,crobinso/libvirt,soulxu/libvirt-xuhj,danwent/libvirt-ovs,shugaoye/libvirt,kantai/libvirt-vfork,nertpinx/libvirt,trainstack/libvirt,jeckersb/libvirt,danwent/libvirt-ovs,rmarwaha/libvirt1,cbosdo/libvirt,rlaager/libvirt,taget/libvirt,trainstack/libvirt,wiedi/libvirt,bjzhang/libvirt,rmarwaha/libvirt,VenkatDatta/libvirt,taget/libvirt,zhlcindy/libvirt-1.1.4-maintain,andreabolognani/libvirt,zhlcindy/libvirt-1.1.4-maintain,nertpinx/libvirt,kantai/libvirt-vfork,leilihh/libvirt,jfehlig/libvirt,jardasgit/libvirt,taget/libvirt,leilihh/libvirt,andreabolognani/libvirt,emaste/libvirt,agx/libvirt,elmarco/libvirt,elmarco/libvirt,rbu/libvirt,olafhering/libvirt,siboulet/libvirt-openvz,libvirt/libvirt,nertpinx/libvirt,datto/libvirt,usc-isi/libvirt,kantai/libvirt-vfork,wiedi/libvirt,rmarwaha/libvirt1,bjzhang/libvirt,datto/libvirt,zippy2/libvirt,datto/libvirt,foomango/libvirt,dumbbell/libvirt,libvirt/libvirt,novel/fbsd-libvirt,eskultety/libvirt,fabianfreyer/libvirt,olafhering/libvirt,danwent/libvirt-ovs,wiedi/libvirt,jfehlig/libvirt,siboulet/libvirt-openvz,andreabolognani/libvirt,crobinso/libvirt,VenkatDatta/libvirt,rmarwaha/libvirt1,VenkatDatta/libvirt,novel/fbsd-libvirt,dumbbell/libvirt,iam-TJ/libvirt,emaste/libvirt,emaste/libvirt,leilihh/libvirt,eskultety/libvirt,agx/libvirt,kantai/libvirt-vfork,jeckersb/libvirt,shugaoye/libvirt,cbosdo/libvirt,eskultety/libvirt,usc-isi/libvirt,libvirt/libvirt,amery/libvirt-vserver,fabianfreyer/libvirt,jeckersb/libvirt,amery/libvirt-vserver,soulxu/libvirt-xuhj,agx/libvirt,warewolf/libvirt,foomango/libvirt,jeckersb/libvirt,iam-TJ/libvirt,sshah-solarflare/Libvirt-PCI-passthrough-,nertpinx/libvirt,rmarwaha/libvirt1,amery/libvirt-vserver,novel/fbsd-libvirt,cbosdo/libvirt,andreabolognani/libvirt,dumbbell/libvirt,wiedi/libvirt,shugaoye/libvirt,soulxu/libvirt-xuhj,soulxu/libvirt-xuhj,taget/libvirt,danwent/libvirt-ovs,trainstack/libvirt,amery/libvirt-vserver,eskultety/libvirt,novel/fbsd-libvirt,leilihh/libvirt,rmarwaha/libvirt,fabianfreyer/libvirt,crobinso/libvirt,emaste/libvirt,novel/fbsd-libvirt,fabianfreyer/libvirt,siboulet/libvirt-openvz,bjzhang/libvirt,sshah-solarflare/Libvirt-PCI-passthrough-,shugaoye/libvirt,iam-TJ/libvirt,emaste/libvirt,VenkatDatta/libvirt,jfehlig/libvirt,olafhering/libvirt,rlaager/libvirt,rmarwaha/libvirt1,trainstack/libvirt,dumbbell/libvirt,siboulet/libvirt-openvz,foomango/libvirt,warewolf/libvirt,jardasgit/libvirt,foomango/libvirt,zhlcindy/libvirt-1.1.4-maintain,taget/libvirt,zippy2/libvirt,wiedi/libvirt,VenkatDatta/libvirt,usc-isi/libvirt