From be19d836cdd7855ffdb9a48299f5892dea3a1f67 Mon Sep 17 00:00:00 2001 From: Steve Sistare Date: Thu, 22 Feb 2024 09:28:27 -0800 Subject: notify: pass error to notifier with return Pass an error object as the third parameter to "notifier with return" notifiers, so clients no longer need to bundle an error object in the opaque data. The new parameter is used in a later patch. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu Reviewed-by: David Hildenbrand Link: https://lore.kernel.org/r/1708622920-68779-2-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu --- util/notify.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/notify.c b/util/notify.c index 76bab21..c6e158f 100644 --- a/util/notify.c +++ b/util/notify.c @@ -61,13 +61,14 @@ void notifier_with_return_remove(NotifierWithReturn *notifier) QLIST_REMOVE(notifier, node); } -int notifier_with_return_list_notify(NotifierWithReturnList *list, void *data) +int notifier_with_return_list_notify(NotifierWithReturnList *list, void *data, + Error **errp) { NotifierWithReturn *notifier, *next; int ret = 0; QLIST_FOREACH_SAFE(notifier, &list->notifiers, node, next) { - ret = notifier->notify(notifier, data); + ret = notifier->notify(notifier, data, errp); if (ret != 0) { break; } -- cgit v1.1