[libvirt] [PATCH v4 2/6] Add GVirConfigDomainHostdev

Christophe Fergeau cfergeau at redhat.com
Thu Apr 21 13:56:11 UTC 2016


On Fri, Apr 15, 2016 at 02:38:20PM +0100, Zeeshan Ali (Khattak) wrote:
> +
> +/**
> + * gvir_config_domain_hostdev_set_readonly:
> + * @hostdev: the host device
> + * @readonly: the new readonly status
> + *
> + * Set the readonly status of @hostdev to @readonly.
> + */
> +void gvir_config_domain_hostdev_set_readonly(GVirConfigDomainHostdev *hostdev,
> +                                             gboolean readonly)
> +{
> +    g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_HOSTDEV(hostdev));
> +
> +    if (readonly) {
> +        GVirConfigObject *node;
> +
> +        node = gvir_config_object_replace_child(GVIR_CONFIG_OBJECT(hostdev),
> +                                                "readonly");
> +        g_object_unref(node);
> +    } else {
> +        gvir_config_object_delete_child(GVIR_CONFIG_OBJECT(hostdev),
> +                                        "readonly", NULL);
> +    }
> +}
> +
> +/**
> + * gvir_config_domain_hostdev_get_readonly:
> + * @hostdev: the host device
> + *
> + * Returns: %TRUE if @hostdev is readonly, %FALSE otherwise.
> + */
> +gboolean gvir_config_domain_hostdev_get_readonly(GVirConfigDomainHostdev *hostdev)
> +{
> +    return gvir_config_object_has_child(GVIR_CONFIG_OBJECT(hostdev),
> +                                        "readonly");
> +}
> +
> +/**
> + * gvir_config_domain_hostdev_set_shareable:
> + * @hostdev: the host device
> + * @shareable: the new shareable status
> + *
> + * Set the whether or not @hostdev is shared between domains.
> + */

Extra "the"

Acked-by: Christophe Fergeau <cfergeau at redhat.com>

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160421/ab97b438/attachment-0001.sig>


More information about the libvir-list mailing list