| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * MTD Oops/Panic logger |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright © 2007 Nokia Corporation. All rights reserved. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Author: Richard Purdie <rpurdie@openedhand.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or |
|---|
| 9 | | - * modify it under the terms of the GNU General Public License |
|---|
| 10 | | - * version 2 as published by the Free Software Foundation. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope that it will be useful, but |
|---|
| 13 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 15 | | - * General Public License for more details. |
|---|
| 16 | | - * |
|---|
| 17 | | - * You should have received a copy of the GNU General Public License |
|---|
| 18 | | - * along with this program; if not, write to the Free Software |
|---|
| 19 | | - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
|---|
| 20 | | - * 02110-1301 USA |
|---|
| 21 | | - * |
|---|
| 22 | 8 | */ |
|---|
| 23 | 9 | |
|---|
| 24 | 10 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 281 | 267 | } |
|---|
| 282 | 268 | |
|---|
| 283 | 269 | static void mtdoops_do_dump(struct kmsg_dumper *dumper, |
|---|
| 284 | | - enum kmsg_dump_reason reason) |
|---|
| 270 | + enum kmsg_dump_reason reason, |
|---|
| 271 | + struct kmsg_dumper_iter *iter) |
|---|
| 285 | 272 | { |
|---|
| 286 | 273 | struct mtdoops_context *cxt = container_of(dumper, |
|---|
| 287 | 274 | struct mtdoops_context, dump); |
|---|
| .. | .. |
|---|
| 290 | 277 | if (reason == KMSG_DUMP_OOPS && !dump_oops) |
|---|
| 291 | 278 | return; |
|---|
| 292 | 279 | |
|---|
| 293 | | - kmsg_dump_get_buffer(dumper, true, cxt->oops_buf + MTDOOPS_HEADER_SIZE, |
|---|
| 280 | + kmsg_dump_get_buffer(iter, true, cxt->oops_buf + MTDOOPS_HEADER_SIZE, |
|---|
| 294 | 281 | record_size - MTDOOPS_HEADER_SIZE, NULL); |
|---|
| 295 | 282 | |
|---|
| 296 | 283 | if (reason != KMSG_DUMP_OOPS) { |
|---|