mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
pstore: pass reason to backend write callback
This allows a backend to filter on the dmesg reason as well as the pstore reason. When ramoops is switched to pstore, this is needed since it has no interest in storing non-crash dmesg details. Drop pstore_write() as it has no users, and handling the "reason" here has no obviously correct value. Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Tony Luck <[email protected]>
This commit is contained in:
parent
f6f8285132
commit
3d6d8d20ec
4 changed files with 15 additions and 41 deletions
|
|
@ -495,7 +495,8 @@ static ssize_t efi_pstore_read(u64 *id, enum pstore_type_id *type,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int efi_pstore_write(enum pstore_type_id type, u64 *id,
|
||||
static int efi_pstore_write(enum pstore_type_id type,
|
||||
enum kmsg_dump_reason reason, u64 *id,
|
||||
unsigned int part, size_t size, struct pstore_info *psi)
|
||||
{
|
||||
char name[DUMP_NAME_LEN];
|
||||
|
|
@ -565,7 +566,7 @@ static int efi_pstore_write(enum pstore_type_id type, u64 *id,
|
|||
static int efi_pstore_erase(enum pstore_type_id type, u64 id,
|
||||
struct pstore_info *psi)
|
||||
{
|
||||
efi_pstore_write(type, &id, (unsigned int)id, 0, psi);
|
||||
efi_pstore_write(type, 0, &id, (unsigned int)id, 0, psi);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -586,7 +587,8 @@ static ssize_t efi_pstore_read(u64 *id, enum pstore_type_id *type,
|
|||
return -1;
|
||||
}
|
||||
|
||||
static int efi_pstore_write(enum pstore_type_id type, u64 *id,
|
||||
static int efi_pstore_write(enum pstore_type_id type,
|
||||
enum kmsg_dump_reason reason, u64 *id,
|
||||
unsigned int part, size_t size, struct pstore_info *psi)
|
||||
{
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue