summaryrefslogtreecommitdiffstats
path: root/fs/pstore/platform.c
diff options
context:
space:
mode:
authorAruna Balakrishnaiah <aruna@linux.vnet.ibm.com>2013-08-16 22:53:19 +0200
committerTony Luck <tony.luck@intel.com>2013-08-19 19:18:11 +0200
commit9a4e1398208d147a9240731a1f8cfe7d8cc4c553 (patch)
tree61b16758244f641d861839887b19d5a0a144223a /fs/pstore/platform.c
parentpstore: Add compression support to pstore (diff)
downloadlinux-9a4e1398208d147a9240731a1f8cfe7d8cc4c553.tar.xz
linux-9a4e1398208d147a9240731a1f8cfe7d8cc4c553.zip
pstore: Introduce new argument 'compressed' in the read callback
Backends will set the flag 'compressed' after reading the log from persistent store to indicate the data being returned to pstore is compressed or not. 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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 56218cb35267..6418eb77d64b 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -428,6 +428,7 @@ void pstore_get_records(int quiet)
enum pstore_type_id type;
struct timespec time;
int failed = 0, rc;
+ bool compressed;
if (!psi)
return;
@@ -436,7 +437,8 @@ void pstore_get_records(int quiet)
if (psi->open && psi->open(psi))
goto out;
- while ((size = psi->read(&id, &type, &count, &time, &buf, psi)) > 0) {
+ while ((size = psi->read(&id, &type, &count, &time, &buf, &compressed,
+ psi)) > 0) {
rc = pstore_mkfile(type, psi->name, id, count, buf,
(size_t)size, time, psi);
kfree(buf);