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 <[email protected]> Christophe
signature.asc
Description: PGP signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
