Commit a491dbef authored by Konrad Rzeszutek Wilk's avatar Konrad Rzeszutek Wilk

xen/p2m/debugfs: Make type_name more obvious.

Per Ian Campbell suggestion to defend against future breakage
in case we expand the P2M values, incorporate the defines
in the string array.
Suggested-by: default avatarIan Campbell <Ian.Campbell@citrix.com>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent 8404877e
...@@ -787,12 +787,15 @@ int p2m_dump_show(struct seq_file *m, void *v) ...@@ -787,12 +787,15 @@ int p2m_dump_show(struct seq_file *m, void *v)
{ {
static const char * const level_name[] = { "top", "middle", static const char * const level_name[] = { "top", "middle",
"entry", "abnormal", "error"}; "entry", "abnormal", "error"};
static const char * const type_name[] = { "identity", "missing",
"pfn", "abnormal"};
#define TYPE_IDENTITY 0 #define TYPE_IDENTITY 0
#define TYPE_MISSING 1 #define TYPE_MISSING 1
#define TYPE_PFN 2 #define TYPE_PFN 2
#define TYPE_UNKNOWN 3 #define TYPE_UNKNOWN 3
static const char * const type_name[] = {
[TYPE_IDENTITY] = "identity",
[TYPE_MISSING] = "missing",
[TYPE_PFN] = "pfn",
[TYPE_UNKNOWN] = "abnormal"};
unsigned long pfn, prev_pfn_type = 0, prev_pfn_level = 0; unsigned long pfn, prev_pfn_type = 0, prev_pfn_level = 0;
unsigned int uninitialized_var(prev_level); unsigned int uninitialized_var(prev_level);
unsigned int uninitialized_var(prev_type); unsigned int uninitialized_var(prev_type);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment