-
由 Chris Lalancette 提交于
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 1a4d5c95, 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: NChris Lalancette <clalance@redhat.com>
d62f4c36