[libvirt] [PATCHv2 1/2] util: refactor virFileOpenAs