Now there is no warning message when we encounter zram pages using
crash utility that is built without lzo library. We need to provide
any hint to users what is going on. Let's add a warning message to
indicate the hint as:
crash> rd -u 0x7f520626e000
WARNING: zram decompress error: this executable needs to be built with lzo library
rd: invalid user virtual address: 7f520626e000 type: "64-bit UVADDR"
Signed-off-by: HATAYAMA Daisuke <d.hatayama(a)fujitsu.com>
---
diskdump.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/diskdump.c b/diskdump.c
index 8603d04..76e5e86 100644
--- a/diskdump.c
+++ b/diskdump.c
@@ -2783,6 +2783,9 @@ try_zram_decompress(ulonglong pte_val, unsigned char *buf, ulong
len, ulonglong
}
decompressor = (void *)lzo1x_decompress_safe;
#else
+ error(WARNING,
+ "zram decompress error: this executable needs to be built"
+ " with lzo library\n");
return 0;
#endif
} else {//todo,support more compressor
--
1.8.3.1