platform.c (b0aad7a99c1df90c23ff4bac76eea9cf25049e9e) platform.c (9a4e1398208d147a9240731a1f8cfe7d8cc4c553)
1/*
2 * Persistent Storage - platform driver interface parts.
3 *
4 * Copyright (C) 2007-2008 Google, Inc.
5 * Copyright (C) 2010 Intel Corporation <tony.luck@intel.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 414 unchanged lines hidden (view full) ---

423 struct pstore_info *psi = psinfo;
424 char *buf = NULL;
425 ssize_t size;
426 u64 id;
427 int count;
428 enum pstore_type_id type;
429 struct timespec time;
430 int failed = 0, rc;
1/*
2 * Persistent Storage - platform driver interface parts.
3 *
4 * Copyright (C) 2007-2008 Google, Inc.
5 * Copyright (C) 2010 Intel Corporation <tony.luck@intel.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 414 unchanged lines hidden (view full) ---

423 struct pstore_info *psi = psinfo;
424 char *buf = NULL;
425 ssize_t size;
426 u64 id;
427 int count;
428 enum pstore_type_id type;
429 struct timespec time;
430 int failed = 0, rc;
431 bool compressed;
431
432 if (!psi)
433 return;
434
435 mutex_lock(&psi->read_mutex);
436 if (psi->open && psi->open(psi))
437 goto out;
438
432
433 if (!psi)
434 return;
435
436 mutex_lock(&psi->read_mutex);
437 if (psi->open && psi->open(psi))
438 goto out;
439
439 while ((size = psi->read(&id, &type, &count, &time, &buf, psi)) > 0) {
440 while ((size = psi->read(&id, &type, &count, &time, &buf, &compressed,
441 psi)) > 0) {
440 rc = pstore_mkfile(type, psi->name, id, count, buf,
441 (size_t)size, time, psi);
442 kfree(buf);
443 buf = NULL;
444 if (rc && (rc != -EEXIST || !quiet))
445 failed++;
446 }
447 if (psi->close)

--- 26 unchanged lines hidden ---
442 rc = pstore_mkfile(type, psi->name, id, count, buf,
443 (size_t)size, time, psi);
444 kfree(buf);
445 buf = NULL;
446 if (rc && (rc != -EEXIST || !quiet))
447 failed++;
448 }
449 if (psi->close)

--- 26 unchanged lines hidden ---