From: Osier Yang Date: Mon, 3 Jun 2013 10:05:30 +0000 (+0800) Subject: nodedev: Expose sysfs path of device X-Git-Tag: v1.1.0-rc1~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4a4603de5b02daa37274c3a5ff299aa50eca12a;p=thirdparty%2Flibvirt.git 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 . Since the sysfspath is filled during enumerating the devices by either udev or HAL. It's an output-only tag. --- diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 4eeb3b3021..cc6f297b2a 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -236,6 +236,7 @@ char *virNodeDeviceDefFormat(const virNodeDeviceDefPtr def) virBufferAddLit(&buf, "\n"); virBufferEscapeString(&buf, " %s\n", def->name); + virBufferEscapeString(&buf, " %s\n", def->sysfs_path); if (def->parent) { virBufferEscapeString(&buf, " %s\n", def->parent); }