Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1405022 > unrolled thread
| Started by | Jan Kiszka <jan.kiszka@web.de> |
|---|---|
| First post | 2016-05-22 18:10 +0200 |
| Last post | 2016-05-22 18:10 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] trace-cmd: Fix reporting of unknown SVM exit reasons Jan Kiszka <jan.kiszka@web.de> - 2016-05-22 18:10 +0200
| From | Jan Kiszka <jan.kiszka@web.de> |
|---|---|
| Date | 2016-05-22 18:10 +0200 |
| Subject | [PATCH] trace-cmd: Fix reporting of unknown SVM exit reasons |
| Message-ID | <rBE70-2R6-17@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
From: Jan Kiszka <jan.kiszka@siemens.com>
On AMD, exist code -1 is also a possible value, but we use it for
terminating the list of known exit reasons. This leads to EXIT_ERR
being reported for unkown ones. Fix this by using an NULL string
pointer as terminal.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
plugin_kvm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugin_kvm.c b/plugin_kvm.c
index 15a6f4c..99e920f 100644
--- a/plugin_kvm.c
+++ b/plugin_kvm.c
@@ -208,12 +208,12 @@ struct str_values {
static struct str_values vmx_exit_reasons[] = {
VMX_EXIT_REASONS
- { NULL, -1}
+ { }
};
static struct str_values svm_exit_reasons[] = {
SVM_EXIT_REASONS
- { NULL, -1}
+ { }
};
static struct isa_exit_reasons {
@@ -237,7 +237,7 @@ static const char *find_exit_reason(unsigned isa, int val)
}
if (!strings)
return "UNKNOWN-ISA";
- for (i = 0; strings[i].val >= 0; i++)
+ for (i = 0; strings[i].str; i++)
if (strings[i].val == val)
break;
--
2.6.6
Back to top | Article view | linux.kernel
csiph-web