Re: [PATCH libvirt-glib 2/5] Add setters for kernel/ramdisk/cmdline/init in GVirConfigDomainOS

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

 



ACK
On Wed, Nov 30, 2011 at 04:52:04PM +0000, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> Enable setting of the <kernel>, <ramdisk>, <cmdline> and <init>
> elements inside <os>...</os>.
> 
> * libvirt-gconfig/libvirt-gconfig-domain-os.c,
>   libvirt-gconfig/libvirt-gconfig-domain-os.h,
>   libvirt-gconfig/libvirt-gconfig.sym: Add new setters
> ---
>  libvirt-gconfig/libvirt-gconfig-domain-os.c |   28 +++++++++++++++++++++++++++
>  libvirt-gconfig/libvirt-gconfig-domain-os.h |    4 +++
>  libvirt-gconfig/libvirt-gconfig.sym         |    4 +++
>  3 files changed, 36 insertions(+), 0 deletions(-)
> 
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-os.c b/libvirt-gconfig/libvirt-gconfig-domain-os.c
> index a898111..f114494 100644
> --- a/libvirt-gconfig/libvirt-gconfig-domain-os.c
> +++ b/libvirt-gconfig/libvirt-gconfig-domain-os.c
> @@ -86,6 +86,34 @@ void gvir_config_domain_os_set_os_type(GVirConfigDomainOs *os,
>                                          "type", type_str);
>  }
>  
> +void gvir_config_domain_os_set_kernel(GVirConfigDomainOs *os,
> +                                      const char * kernel)
> +{
> +    gvir_config_object_set_node_content(GVIR_CONFIG_OBJECT(os),
> +                                        "kernel", kernel);
> +}
> +
> +void gvir_config_domain_os_set_ramdisk(GVirConfigDomainOs *os,
> +                                       const char * ramdisk)
> +{
> +    gvir_config_object_set_node_content(GVIR_CONFIG_OBJECT(os),
> +                                        "initrd", ramdisk);
> +}
> +
> +void gvir_config_domain_os_set_cmdline(GVirConfigDomainOs *os,
> +                                       const char * cmdline)
> +{
> +    gvir_config_object_set_node_content(GVIR_CONFIG_OBJECT(os),
> +                                        "cmdline", cmdline);
> +}
> +
> +void gvir_config_domain_os_set_init(GVirConfigDomainOs *os,
> +                                    const char * init)
> +{
> +    gvir_config_object_set_node_content(GVIR_CONFIG_OBJECT(os),
> +                                        "init", init);
> +}
> +
>  void gvir_config_domain_os_set_loader(GVirConfigDomainOs *os,
>                                        const char * loader)
>  {
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-os.h b/libvirt-gconfig/libvirt-gconfig-domain-os.h
> index 1522744..b978dbc 100644
> --- a/libvirt-gconfig/libvirt-gconfig-domain-os.h
> +++ b/libvirt-gconfig/libvirt-gconfig-domain-os.h
> @@ -82,6 +82,10 @@ GVirConfigDomainOs *gvir_config_domain_os_new_from_xml(const gchar *xml, GError
>  void gvir_config_domain_os_set_os_type(GVirConfigDomainOs *os, GVirConfigDomainOsType type);
>  void gvir_config_domain_os_set_arch(GVirConfigDomainOs *os, const char *arch);
>  void gvir_config_domain_os_set_boot_devices(GVirConfigDomainOs *os, GList *boot_devices);
> +void gvir_config_domain_os_set_kernel(GVirConfigDomainOs *os, const char *kernel);
> +void gvir_config_domain_os_set_ramdisk(GVirConfigDomainOs *os, const char *ramdisk);
> +void gvir_config_domain_os_set_cmdline(GVirConfigDomainOs *os, const char *cmdline);
> +void gvir_config_domain_os_set_init(GVirConfigDomainOs *os, const char *init);
>  void gvir_config_domain_os_set_loader(GVirConfigDomainOs *os, const char * loader);
>  void gvir_config_domain_os_set_machine(GVirConfigDomainOs *os, const char *machine);
>  void gvir_config_domain_os_set_smbios_mode(GVirConfigDomainOs *os,
> diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
> index 3ad7b1f..e895cb0 100644
> --- a/libvirt-gconfig/libvirt-gconfig.sym
> +++ b/libvirt-gconfig/libvirt-gconfig.sym
> @@ -89,7 +89,11 @@ LIBVIRT_GCONFIG_0.0.1 {
>  	gvir_config_domain_os_new_from_xml;
>  	gvir_config_domain_os_set_os_type;
>  	gvir_config_domain_os_set_boot_devices;
> +	gvir_config_domain_os_set_cmdline;
> +	gvir_config_domain_os_set_init;
> +	gvir_config_domain_os_set_kernel;
>  	gvir_config_domain_os_set_loader;
> +	gvir_config_domain_os_set_ramdisk;
>  	gvir_config_domain_os_set_smbios_mode;
>  	gvir_config_domain_os_enable_boot_menu;
>  	gvir_config_domain_os_bios_enable_serial;
> -- 
> 1.7.6.4
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: pgpEnwuBEeTcS.pgp
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]