From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5Cx5-0007ZB-Sq for qemu-devel@nongnu.org; Wed, 07 Mar 2012 04:14:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5Cwz-0007YU-L6 for qemu-devel@nongnu.org; Wed, 07 Mar 2012 04:14:31 -0500 Received: from mail-ey0-f173.google.com ([209.85.215.173]:46236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5Cwz-0007Y7-CE for qemu-devel@nongnu.org; Wed, 07 Mar 2012 04:14:25 -0500 Received: by eaaf11 with SMTP id f11so1522435eaa.4 for ; Wed, 07 Mar 2012 01:14:22 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4F5726EC.60703@redhat.com> Date: Wed, 07 Mar 2012 10:14:20 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1331110333-32578-1-git-send-email-kraxel@redhat.com> In-Reply-To: <1331110333-32578-1-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] add qemu_unregister_wakeup_notifier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel , Gerd Hoffmann Il 07/03/2012 09:52, Gerd Hoffmann ha scritto: > While being at it complement qemu_register_wakeup_notifier with > qemu_unregister_wakeup_notifier too. > > Signed-off-by: Gerd Hoffmann > --- > sysemu.h | 1 + > vl.c | 5 +++++ > 2 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/sysemu.h b/sysemu.h > index ef604aa..031df88 100644 > --- a/sysemu.h > +++ b/sysemu.h > @@ -51,6 +51,7 @@ void qemu_unregister_suspend_notifier(Notifier *notifier); > void qemu_system_wakeup_request(WakeupReason reason); > void qemu_system_wakeup_enable(WakeupReason reason, bool enabled); > void qemu_register_wakeup_notifier(Notifier *notifier); > +void qemu_unregister_wakeup_notifier(Notifier *notifier); > void qemu_system_shutdown_request(void); > void qemu_system_powerdown_request(void); > void qemu_system_debug_request(void); > diff --git a/vl.c b/vl.c > index 06658a8..e8c4af1 100644 > --- a/vl.c > +++ b/vl.c > @@ -1470,6 +1470,11 @@ void qemu_register_wakeup_notifier(Notifier *notifier) > notifier_list_add(&wakeup_notifiers, notifier); > } > > +void qemu_unregister_wakeup_notifier(Notifier *notifier) > +{ > + notifier_list_remove(&wakeup_notifiers, notifier); > +} > + > void qemu_system_killed(int signal, pid_t pid) > { > shutdown_signal = signal; Upstream has notifier_remove, not notifier_list_remove. You could just use it directly instead of adding wrappers. Paolo