Patchwork [1/2] ppc440_bamboo: Add 0.12 and 0.13 machine types for backward compat

login
register
mail settings
Submitter Amit Shah
Date Feb. 25, 2010, 1:56 p.m.
Message ID <1267106172-28011-1-git-send-email-amit.shah@redhat.com>
Download mbox | patch
Permalink /patch/46240/
State New
Headers show

Comments

Amit Shah - Feb. 25, 2010, 1:56 p.m.
Add a 0.12 machine type for compatibility with older versions. Mark the
default one as 0.13.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
 hw/ppc440_bamboo.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
Aurelien Jarno - March 6, 2010, 9:58 p.m.
On Thu, Feb 25, 2010 at 07:26:11PM +0530, Amit Shah wrote:
> Add a 0.12 machine type for compatibility with older versions. Mark the
> default one as 0.13.
> 
> Signed-off-by: Amit Shah <amit.shah@redhat.com>

Thanks, applied.

> ---
>  hw/ppc440_bamboo.c |   11 ++++++++++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c
> index 1ab9872..aa9f594 100644
> --- a/hw/ppc440_bamboo.c
> +++ b/hw/ppc440_bamboo.c
> @@ -172,7 +172,15 @@ static void bamboo_init(ram_addr_t ram_size,
>  }
>  
>  static QEMUMachine bamboo_machine = {
> -    .name = "bamboo",
> +    .name = "bamboo-0.13",
> +    .alias = "bamboo",
> +    .desc = "bamboo",
> +    .init = bamboo_init,
> +    .is_default = 1,
> +};
> +
> +static QEMUMachine bamboo_machine_v0_12 = {
> +    .name = "bamboo-0.12",
>      .desc = "bamboo",
>      .init = bamboo_init,
>  };
> @@ -180,6 +188,7 @@ static QEMUMachine bamboo_machine = {
>  static void bamboo_machine_init(void)
>  {
>      qemu_register_machine(&bamboo_machine);
> +    qemu_register_machine(&bamboo_machine_v0_12);
>  }
>  
>  machine_init(bamboo_machine_init);
> -- 
> 1.6.2.5
> 
> 
> 
>

Patch

diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c
index 1ab9872..aa9f594 100644
--- a/hw/ppc440_bamboo.c
+++ b/hw/ppc440_bamboo.c
@@ -172,7 +172,15 @@  static void bamboo_init(ram_addr_t ram_size,
 }
 
 static QEMUMachine bamboo_machine = {
-    .name = "bamboo",
+    .name = "bamboo-0.13",
+    .alias = "bamboo",
+    .desc = "bamboo",
+    .init = bamboo_init,
+    .is_default = 1,
+};
+
+static QEMUMachine bamboo_machine_v0_12 = {
+    .name = "bamboo-0.12",
     .desc = "bamboo",
     .init = bamboo_init,
 };
@@ -180,6 +188,7 @@  static QEMUMachine bamboo_machine = {
 static void bamboo_machine_init(void)
 {
     qemu_register_machine(&bamboo_machine);
+    qemu_register_machine(&bamboo_machine_v0_12);
 }
 
 machine_init(bamboo_machine_init);