Patchwork [V6,4/4,resend] nmi: report error(QError) when the cpu-index is invalid

login
register
mail settings
Submitter Lai Jiangshan
Date Feb. 14, 2011, 10:09 a.m.
Message ID <4D58FF54.1000800@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/83056/
State New
Headers show

Comments

Lai Jiangshan - Feb. 14, 2011, 10:09 a.m.
When cpu-index is found invalid in runtime, it will report
QERR_INVALID_PARAMETER_VALUE.

Signed-off-by:  Lai Jiangshan <laijs@cn.fujitsu.com>
---

Patch

diff --git a/monitor.c b/monitor.c
index 1b1c0ba..82935f0 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2563,6 +2563,7 @@  static int do_inject_nmi(Monitor *mon, const QDict *qdict, QObject **ret_data)
             return 0;
         }
 
+    qerror_report(QERR_INVALID_PARAMETER_VALUE, "cpu-index", "a CPU number");
     return -1;
 }
 #endif