virFileInData: Preserve errno on error
The virFileInData() function should return to the caller if the current position the passed file is in is a data section or a hole (and also how long the current section is). At any rate, upon return from this function (be it successful or not) the original position in the file is restored. This may mess up with errno which might have been set earlier. Save the errno into a local variable so it can be restored for the caller's sake. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMartin Kletzander <mkletzan@redhat.com>
Showing
想要评论请 注册 或 登录