notify: add NotiferWithReturn so notifier list can abort

Enterprise / Virtualization / QEMU - Stefan Hajnoczi [redhat.com] - 28 June 2013 02:20 UTC

notifier_list_notify() has no return value. This is fine when we just want to invoke side-effects.

Sometimes it's useful for notifiers to produce a return value. This allows notifiers to "veto" an operation and will be used by the block layer before-write notifier.

5dae8e5 notify: add NotiferWithReturn so notifier list can abort
include/qemu/notify.h | 29 +++++++++++++++++++++++++++++
util/notify.c | 30 ++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+)

Upstream: git.qemu.org


  • Share