Re: [PATCH v4 2/6] Add GVirConfigDomainHostdev

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

 



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@xxxxxxxxxx>

Christophe

Attachment: signature.asc
Description: PGP signature

--
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]