Build a human-readable name for a vdev
#include <qvm/vdev-core.h>
int vdev_string(char *buf, size_t count, const vdev_t *vdp)
This function builds a string with the vdev's name and block (location) information. This string is useful for debugging and logging when the block information has been assigned by the user. This function may not be used until the VDEV_CTRL_GUEST_CONFIGURED control function has been invoked, confirming that the VM has been fully configured.
The number of characters that would have been written into the array, not including the terminating null character, if the count was large enough. The function returns this value even if the count is zero.