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

Re: [Xen-devel] [QEMU][RFC V2 08/10] xen: audio is not a part of default devices



On Wed, 22 Aug 2012, Julien Grall wrote:
> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
> ---
>  arch_init.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/arch_init.c b/arch_init.c
> index 9b46bfc..1077b16 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -44,6 +44,7 @@
>  #include "exec-memory.h"
>  #include "hw/pcspk.h"
>  #include "qemu/page_cache.h"
> +#include "hw/xen.h"
>  
>  #ifdef DEBUG_ARCH_INIT
>  #define DPRINTF(fmt, ...) \
> @@ -976,6 +977,9 @@ void select_soundhw(const char *optarg)
>  void audio_init(ISABus *isa_bus, PCIBus *pci_bus)
>  {
>      struct soundhw *c;
> +    int register_default_dev;
> +
> +    xen_set_register_default_dev(0, &register_default_dev);
>  
>      for (c = soundhw; c->name; ++c) {
>          if (c->enabled) {
> @@ -990,6 +994,8 @@ void audio_init(ISABus *isa_bus, PCIBus *pci_bus)
>              }
>          }
>      }
> +
> +    xen_set_register_default_dev(register_default_dev, NULL);
>  }
>  #else
>  void select_soundhw(const char *optarg)

and this is why it is better to have a list rather than a stateful
register_default_dev integer.
This stuff is really easy to break.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.