Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318016
b: refs/heads/master
c: 897dba0
h: refs/heads/master
v: v3
  • Loading branch information
Anton Vorontsov authored and Greg Kroah-Hartman committed Jul 17, 2012
1 parent 811d1be commit 30d82fa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b2ad368bebc0f772613668e893fa176396e9094c
refs/heads/master: 897dba027445be93f40e5caf550556ca38c48c51
10 changes: 10 additions & 0 deletions trunk/fs/pstore/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ static void pstore_register_console(void)
static void pstore_register_console(void) {}
#endif

static int pstore_write_compat(enum pstore_type_id type,
enum kmsg_dump_reason reason,
u64 *id, unsigned int part,
size_t size, struct pstore_info *psi)
{
return psi->write_buf(type, reason, id, part, psinfo->buf, size, psi);
}

/*
* platform specific persistent storage driver registers with
* us here. If pstore is already mounted, call the platform
Expand All @@ -212,6 +220,8 @@ int pstore_register(struct pstore_info *psi)
return -EINVAL;
}

if (!psi->write)
psi->write = pstore_write_compat;
psinfo = psi;
mutex_init(&psinfo->read_mutex);
spin_unlock(&pstore_lock);
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/linux/pstore.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ struct pstore_info {
int (*write)(enum pstore_type_id type,
enum kmsg_dump_reason reason, u64 *id,
unsigned int part, size_t size, struct pstore_info *psi);
int (*write_buf)(enum pstore_type_id type,
enum kmsg_dump_reason reason, u64 *id,
unsigned int part, const char *buf, size_t size,
struct pstore_info *psi);
int (*erase)(enum pstore_type_id type, u64 id,
struct pstore_info *psi);
void *data;
Expand Down

0 comments on commit 30d82fa

Please sign in to comment.