On Mon, Feb 08, 2016 at 04:22:47PM +0000, Zeeshan Ali (Khattak) wrote:
Hi,
On Fri, Jan 29, 2016 at 5:18 PM, Christophe Fergeau <cfergeau(a)redhat.com> wrote:
> Hey,
>
> A gconfig: prefix in the commit shortlog would be nice
Hmm.. maybe for consistency, yes but I'll remove "GVirConfig" then
from class name.
Please keep both :)
>> + g_object_unref(node);
>> + } else {
>> + gvir_config_object_delete_child(GVIR_CONFIG_OBJECT(hostdev),
"readonly", NULL);
>> + }
>> +}
>> +
>> +gboolean gvir_config_domain_hostdev_get_readonly(GVirConfigDomainHostdev
*hostdev)
>> +{
>> + xmlNodePtr hostdev_node;
>> + xmlNodePtr ro_node;
>> +
>> + g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_HOSTDEV(hostdev), FALSE);
>> +
>> + hostdev_node =
gvir_config_object_get_xml_node(GVIR_CONFIG_OBJECT(hostdev));
>> + g_return_val_if_fail(hostdev_node != NULL, FALSE);
>> +
>> + ro_node = gvir_config_xml_get_element(hostdev_node, "readonly",
NULL);
>> +
>> + return (ro_node != NULL);
>> +}
>
> libvirt XML documentation says that readonly and shareable are only
> supported by SCSI devices, should this be in the base class, or only in
> the SCSI child class?
Well it says it's currently only supported by them, not that it's only
applicable to them so i kept it in the base class but maybe that was
not a good call.
Hmm could probably make sense with pci in the future, and the wording
can indeed be interpreted both ways. Let's keep things this way.
Christophe