diff options
author | Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com> | 2013-08-16 13:53:39 -0700 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2013-08-19 11:53:27 -0700 |
commit | 9ad2cbe0a9b88ee6ee895d03b2c63fa1252c8e52 (patch) | |
tree | d1fa9f66973963feb802ba28772f9a10e2db5205 /fs/pstore/platform.c | |
parent | adb42f5e105502aff2fc4518b16ba79c203fae4f (diff) | |
download | linux-9ad2cbe0a9b88ee6ee895d03b2c63fa1252c8e52.tar.bz2 |
pstore: Add file extension to pstore file if compressed
In case decompression fails, add a ".enc.z" to indicate the file has
compressed data. This will help user space utilities to figure
out the file contents.
Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'fs/pstore/platform.c')
-rw-r--r-- | fs/pstore/platform.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 76bc5c12c0cf..4ffb7ab5e397 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -479,13 +479,15 @@ void pstore_get_records(int quiet) if (unzipped_len > 0) { buf = big_oops_buf; size = unzipped_len; + compressed = false; } else { pr_err("pstore: decompression failed;" "returned %d\n", unzipped_len); + compressed = true; } } rc = pstore_mkfile(type, psi->name, id, count, buf, - (size_t)size, time, psi); + compressed, (size_t)size, time, psi); if (unzipped_len < 0) { /* Free buffer other than big oops */ kfree(buf); |