diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-10-03 12:35:26 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-10-19 17:03:34 -0400 |
commit | a491dbef56f2aba42fb292067d4652d246627738 (patch) | |
tree | e7dff1f92c73ba4979a0b320cd6ce0849d09ec61 /arch/x86/xen | |
parent | 8404877ee1cfdbc872e153fd89022f9e47f6f5a3 (diff) | |
download | blackbird-op-linux-a491dbef56f2aba42fb292067d4652d246627738.tar.gz blackbird-op-linux-a491dbef56f2aba42fb292067d4652d246627738.zip |
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: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/p2m.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 2e3bf7a0732b..795e003517e1 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@ -787,12 +787,15 @@ int p2m_dump_show(struct seq_file *m, void *v) { static const char * const level_name[] = { "top", "middle", "entry", "abnormal", "error"}; - static const char * const type_name[] = { "identity", "missing", - "pfn", "abnormal"}; #define TYPE_IDENTITY 0 #define TYPE_MISSING 1 #define TYPE_PFN 2 #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 int uninitialized_var(prev_level); unsigned int uninitialized_var(prev_type); |