[PATCHv2 3/5] Strip control characters from sysfs attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Including them in the XML makes them unparsable.

https://bugzilla.redhat.com/show_bug.cgi?id=1184131
---
 src/node_device/node_device_udev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 8c39e5f..5e98222 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -239,6 +239,8 @@ static int udevGetStringSysfsAttr(struct udev_device *udev_device,
 
     ret = udevGetDeviceSysfsAttr(udev_device, attr_name, &tmp);
 
+    virStringStripControlChars(tmp);
+
     if (tmp != NULL && (STREQ(tmp, ""))) {
         VIR_FREE(tmp);
         tmp = NULL;
-- 
2.0.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]