[libvirt] [PATCH 5/9] nodedev: Refactor the helpers