Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318019
b: refs/heads/master
c: c2b7113
h: refs/heads/master
i:
  318017: 2f70688
  318015: 811d1be
v: v3
  • Loading branch information
Anton Vorontsov authored and Greg Kroah-Hartman committed Jul 17, 2012
1 parent 6096c19 commit 148e46b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21f679404a0c28bd5b1b3aff2a7218bbff4cb43d
refs/heads/master: c2b7113261c5bb49031a15b833e59ea2d8ec4074
17 changes: 9 additions & 8 deletions trunk/fs/pstore/ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,12 @@ static size_t ramoops_write_kmsg_hdr(struct persistent_ram_zone *prz)
return len;
}

static int ramoops_pstore_write(enum pstore_type_id type,
enum kmsg_dump_reason reason,
u64 *id,
unsigned int part,
size_t size, struct pstore_info *psi)

static int ramoops_pstore_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)
{
struct ramoops_context *cxt = psi->data;
struct persistent_ram_zone *prz = cxt->przs[cxt->dump_write_cnt];
Expand All @@ -183,7 +184,7 @@ static int ramoops_pstore_write(enum pstore_type_id type,
if (type == PSTORE_TYPE_CONSOLE) {
if (!cxt->cprz)
return -ENOMEM;
persistent_ram_write(cxt->cprz, cxt->pstore.buf, size);
persistent_ram_write(cxt->cprz, buf, size);
return 0;
}

Expand Down Expand Up @@ -212,7 +213,7 @@ static int ramoops_pstore_write(enum pstore_type_id type,
hlen = ramoops_write_kmsg_hdr(prz);
if (size + hlen > prz->buffer_size)
size = prz->buffer_size - hlen;
persistent_ram_write(prz, cxt->pstore.buf, size);
persistent_ram_write(prz, buf, size);

cxt->dump_write_cnt = (cxt->dump_write_cnt + 1) % cxt->max_dump_cnt;

Expand Down Expand Up @@ -250,7 +251,7 @@ static struct ramoops_context oops_cxt = {
.name = "ramoops",
.open = ramoops_pstore_open,
.read = ramoops_pstore_read,
.write = ramoops_pstore_write,
.write_buf = ramoops_pstore_write_buf,
.erase = ramoops_pstore_erase,
},
};
Expand Down

0 comments on commit 148e46b

Please sign in to comment.