[libvirt] [PATCH 09/12] nodedev: Refactor the helpers