--- libvirt-gconfig/libvirt-gconfig-domain-video.c | 25 +++++++++++++++++++++++++ libvirt-gconfig/libvirt-gconfig-domain-video.h | 5 +++++ libvirt-gconfig/libvirt-gconfig.sym | 2 ++ 3 files changed, 32 insertions(+) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-video.c b/libvirt-gconfig/libvirt-gconfig-domain-video.c index 947d066..cc2034d 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-video.c +++ b/libvirt-gconfig/libvirt-gconfig-domain-video.c @@ -102,6 +102,31 @@ void gvir_config_domain_video_set_vram(GVirConfigDomainVideo *video, g_free(vram_str); } +void gvir_config_domain_video_set_ram(GVirConfigDomainVideo *video, + guint kbytes) +{ + GVirConfigObject *node; + g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_VIDEO(video)); + node = gvir_config_object_add_child(GVIR_CONFIG_OBJECT(video), "model"); + g_return_if_fail(GVIR_CONFIG_OBJECT(node)); + gvir_config_object_set_attribute_with_type(node, "ram", G_TYPE_UINT, + kbytes, NULL); + g_object_unref(G_OBJECT(node)); +} + + +void gvir_config_domain_video_set_vgamem(GVirConfigDomainVideo *video, + guint kbytes) +{ + GVirConfigObject *node; + g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_VIDEO(video)); + node = gvir_config_object_add_child(GVIR_CONFIG_OBJECT(video), "model"); + g_return_if_fail(GVIR_CONFIG_OBJECT(node)); + gvir_config_object_set_attribute_with_type(node, "vgamem", G_TYPE_UINT, + kbytes, NULL); + g_object_unref(G_OBJECT(node)); +} + void gvir_config_domain_video_set_heads(GVirConfigDomainVideo *video, guint head_count) { diff --git a/libvirt-gconfig/libvirt-gconfig-domain-video.h b/libvirt-gconfig/libvirt-gconfig-domain-video.h index f83d5aa..a87ec4f 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-video.h +++ b/libvirt-gconfig/libvirt-gconfig-domain-video.h @@ -74,6 +74,11 @@ void gvir_config_domain_video_set_model(GVirConfigDomainVideo *video, GVirConfigDomainVideoModel model); void gvir_config_domain_video_set_vram(GVirConfigDomainVideo *video, guint kbytes); + +void gvir_config_domain_video_set_ram(GVirConfigDomainVideo *video, + guint kbytes); +void gvir_config_domain_video_set_vgamem(GVirConfigDomainVideo *video, + guint kbytes); void gvir_config_domain_video_set_heads(GVirConfigDomainVideo *video, guint head_count); diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym index 6267197..89dd589 100644 --- a/libvirt-gconfig/libvirt-gconfig.sym +++ b/libvirt-gconfig/libvirt-gconfig.sym @@ -729,6 +729,8 @@ global: gvir_config_domain_chardev_source_unix_get_type; gvir_config_domain_chardev_source_unix_new; gvir_config_domain_chardev_source_unix_new_from_xml; + gvir_config_domain_video_set_ram; + gvir_config_domain_video_set_vgamem; } LIBVIRT_GCONFIG_0.2.1; # .... define new API here using predicted next version number .... -- 1.9.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list