zram: Add warning message when crash is built without lzo library

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@fujitsu.com>
This commit is contained in:
HATAYAMA Daisuke 2020-12-25 15:48:49 +09:00 committed by Kazuhito Hagio
parent 2254dc4e57
commit dc2cb5f925

View File

@ -2780,6 +2780,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 */