[libvirt] [PATCH] domain: conf: Drop unused OSTYPE_AIX

Cole Robinson crobinso at redhat.com
Wed Apr 29 00:46:26 UTC 2015


Ping... I think this should be safe for the release, since the AIX value has
never been exposed to the user

- Cole

On 04/22/2015 10:47 AM, Cole Robinson wrote:
> The phyp driver stuffed it into a DomainDefPtr during its attachdevice
> routine, but the value is never advertised via capabilities so it should
> be safe to drop.
> 
> Have the phyp driver use OSTYPE_LINUX, which is what it advertises via
> capabilities.
> ---
>  docs/schemas/capability.rng | 3 ++-
>  src/conf/domain_conf.c      | 3 +--
>  src/conf/domain_conf.h      | 1 -
>  src/phyp/phyp_driver.c      | 2 +-
>  tests/vircapstest.c         | 2 +-
>  5 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/docs/schemas/capability.rng b/docs/schemas/capability.rng
> index 5f3ec70..88e08d2 100644
> --- a/docs/schemas/capability.rng
> +++ b/docs/schemas/capability.rng
> @@ -262,7 +262,8 @@
>      <element name='os_type'>
>        <choice>
>          <value>xen</value> <!-- Xen 3.0 pv -->
> -        <value>linux</value> <!-- same as 'xen' - legacy -->
> +        <value>linux</value> <!-- same as 'xen' - meant to be legacy,
> +                                  but is also used by phyp driver -->
>          <value>hvm</value> <!-- unmodified OS -->
>          <value>exe</value> <!-- For container based virt -->
>          <value>uml</value> <!-- user mode linux -->
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 479b4c2..6565350 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -120,8 +120,7 @@ VIR_ENUM_IMPL(virDomainOS, VIR_DOMAIN_OSTYPE_LAST,
>                "xen",
>                "linux",
>                "exe",
> -              "uml",
> -              "aix")
> +              "uml")
>  
>  VIR_ENUM_IMPL(virDomainBoot, VIR_DOMAIN_BOOT_LAST,
>                "fd",
> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
> index 25d3ee6..7a374d7 100644
> --- a/src/conf/domain_conf.h
> +++ b/src/conf/domain_conf.h
> @@ -233,7 +233,6 @@ typedef enum {
>      VIR_DOMAIN_OSTYPE_LINUX,
>      VIR_DOMAIN_OSTYPE_EXE,
>      VIR_DOMAIN_OSTYPE_UML,
> -    VIR_DOMAIN_OSTYPE_AIX,
>  
>      VIR_DOMAIN_OSTYPE_LAST
>  } virDomainOSType;
> diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
> index e9a31d0..c558c48 100644
> --- a/src/phyp/phyp_driver.c
> +++ b/src/phyp/phyp_driver.c
> @@ -1720,7 +1720,7 @@ phypDomainAttachDevice(virDomainPtr domain, const char *xml)
>      if (domain_name == NULL)
>          goto cleanup;
>  
> -    def->os.type = VIR_DOMAIN_OSTYPE_AIX;
> +    def->os.type = VIR_DOMAIN_OSTYPE_LINUX;
>  
>      dev = virDomainDeviceDefParse(xml, def, phyp_driver->caps, NULL,
>                                    VIR_DOMAIN_DEF_PARSE_INACTIVE);
> diff --git a/tests/vircapstest.c b/tests/vircapstest.c
> index 5a43d63..0c79af8 100644
> --- a/tests/vircapstest.c
> +++ b/tests/vircapstest.c
> @@ -250,7 +250,7 @@ test_virCapsDomainDataLookupQEMU(const void *data ATTRIBUTE_UNUSED)
>          VIR_DOMAIN_OSTYPE_HVM, VIR_ARCH_PPC64LE,
>          VIR_DOMAIN_VIRT_QEMU, "/usr/bin/qemu-system-ppc64", "pseries");
>  
> -    CAPS_EXPECT_ERR(VIR_DOMAIN_OSTYPE_AIX, VIR_ARCH_NONE, -1, NULL, NULL);
> +    CAPS_EXPECT_ERR(VIR_DOMAIN_OSTYPE_LINUX, VIR_ARCH_NONE, -1, NULL, NULL);
>      CAPS_EXPECT_ERR(-1, VIR_ARCH_PPC64LE, -1, NULL, "pc");
>      CAPS_EXPECT_ERR(-1, VIR_ARCH_MIPS, -1, NULL, NULL);
>      CAPS_EXPECT_ERR(-1, VIR_ARCH_AARCH64, VIR_DOMAIN_VIRT_KVM,
> 




More information about the libvir-list mailing list