|
@@ -581,6 +581,9 @@ static int nvram_pstore_write(enum pstore_type_id type,
|
|
|
oops_hdr->report_length = (u16) size;
|
|
|
oops_hdr->timestamp = get_seconds();
|
|
|
|
|
|
+ if (compressed)
|
|
|
+ err_type = ERR_TYPE_KERNEL_PANIC_GZ;
|
|
|
+
|
|
|
rc = nvram_write_os_partition(&oops_log_partition, oops_buf,
|
|
|
(int) (sizeof(*oops_hdr) + size), err_type, count);
|
|
|
|
|
@@ -687,6 +690,11 @@ static ssize_t nvram_pstore_read(u64 *id, enum pstore_type_id *type,
|
|
|
return -ENOMEM;
|
|
|
memcpy(*buf, buff + hdr_size, length);
|
|
|
kfree(buff);
|
|
|
+
|
|
|
+ if (err_type == ERR_TYPE_KERNEL_PANIC_GZ)
|
|
|
+ *compressed = true;
|
|
|
+ else
|
|
|
+ *compressed = false;
|
|
|
return length;
|
|
|
}
|
|
|
|