On Thu, Jan 31, 2013 at 02:46:27PM +0100, Viktor Mihajlovski wrote:
>  static int
> +virDomainDeviceCCWAddressParseXML(xmlNodePtr node,
> +                                  virDomainDeviceCCWAddressPtr addr)
> +{
> +    int   ret = -1;
> +    int   num = 0;
> +    char *devno;
> +    char  garbage;
> +
> +    memset(addr, 0, sizeof(*addr));
> +
> +    devno = virXMLPropString(node, "devno");
> +    if (devno)
> +        num = sscanf(devno, "%2x.%1x.%4x%c", &addr->cssid, &addr->ssid,
> +                     &addr->schid, &garbage);

Ok, this confirms what I said in the previous patch. If you ever find
yourself doing 'scanf' on an attribute from an XML document, that is
an indication that you should have had multiple attributes in the first
place. We should use

  <adddress type="ccw" cssid="XXX" ssid="YYY" schid="ZZZ"/>


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to