qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/3] runstate: introduce suspended state


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH 2/3] runstate: introduce suspended state
Date: Wed, 2 May 2012 15:34:53 -0300

On Wed, 02 May 2012 09:08:55 +0200
Gerd Hoffmann <address@hidden> wrote:

> > diff --git a/input.c b/input.c
> > index 6b5c2c3..47e6900 100644
> > --- a/input.c
> > +++ b/input.c
> > @@ -130,7 +130,7 @@ void qemu_remove_led_event_handler(QEMUPutLEDEntry 
> > *entry)
> >  
> >  void kbd_put_keycode(int keycode)
> >  {
> > -    if (!runstate_is_running()) {
> > +    if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
> >          return;
> >      }
> >      if (qemu_put_kbd_event) {
> 
> IIRC there is a simliar check for the mouse ...

Will add.

> Does it make sense to add a runstate_is_running_or_suspended() function?

I think that the question we have to answer is: apart from the keyboard
and mouse, is there any device that wants to run while qemu is suspended?

If this is true only for the keyboard and mouse, then having the above
check is fine. Now, if this is the case for several devices then we might
need a different solution, as this patch will brake them.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]