[libvirt PATCH] iohelper: some refactoring