[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/4] nmi: add errp function parameter to inject_nmi(
From: |
Bandan Das |
Subject: |
[Qemu-devel] [PATCH 3/4] nmi: add errp function parameter to inject_nmi() |
Date: |
Thu, 19 May 2016 18:15:15 -0400 |
If caller has errp, set it appropriately in case of
an error and pass it along.
Signed-off-by: Bandan Das <address@hidden>
---
hw/core/nmi.c | 4 ++--
hw/watchdog/watchdog.c | 2 +-
include/hw/nmi.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/core/nmi.c b/hw/core/nmi.c
index cc47025..40324a9 100644
--- a/hw/core/nmi.c
+++ b/hw/core/nmi.c
@@ -73,9 +73,9 @@ void nmi_monitor_handle(int cpu_index, Error **errp)
}
}
-void inject_nmi(void)
+void inject_nmi(Error **errp)
{
- nmi_monitor_handle(0, NULL);
+ nmi_monitor_handle(0, errp);
}
static const TypeInfo nmi_info = {
diff --git a/hw/watchdog/watchdog.c b/hw/watchdog/watchdog.c
index bbf3646..c3f2c87 100644
--- a/hw/watchdog/watchdog.c
+++ b/hw/watchdog/watchdog.c
@@ -143,7 +143,7 @@ void watchdog_perform_action(void)
case WDT_NMI:
qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_INJECT_NMI,
&error_abort);
- inject_nmi();
+ inject_nmi(NULL);
break;
}
}
diff --git a/include/hw/nmi.h b/include/hw/nmi.h
index f4cec62..63794d9 100644
--- a/include/hw/nmi.h
+++ b/include/hw/nmi.h
@@ -45,6 +45,6 @@ typedef struct NMIClass {
} NMIClass;
void nmi_monitor_handle(int cpu_index, Error **errp);
-void inject_nmi(void);
+void inject_nmi(Error **errp);
#endif /* NMI_H */
--
2.5.5