mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
nodedev: Expose sysfs path of device
The name format is constructed by libvirt, it's not that clear to get what the device's sysfs path should be. This exposes the device's sysfs path by a new tag <path>. Since the sysfspath is filled during enumerating the devices by either udev or HAL. It's an output-only tag.
This commit is contained in:
parent
b5c5f236bb
commit
c4a4603de5
@ -236,6 +236,7 @@ char *virNodeDeviceDefFormat(const virNodeDeviceDefPtr def)
|
||||
|
||||
virBufferAddLit(&buf, "<device>\n");
|
||||
virBufferEscapeString(&buf, " <name>%s</name>\n", def->name);
|
||||
virBufferEscapeString(&buf, " <path>%s</path>\n", def->sysfs_path);
|
||||
if (def->parent) {
|
||||
virBufferEscapeString(&buf, " <parent>%s</parent>\n", def->parent);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user