While ramoops writes to ram, accessing the dump requires using /dev/mem
and knowing the memory location (or a similar solution). This patch
provides a debugfs interface through which the respective memory area can
be easily accessed.
The entry added is /sys/kernel/debug/ramoops/next
The entry returns a dump of size record_size each time, skipping invalid
dumps. When it reaches the end of the memory area reserved for dumps it
returns an empty record and resets the current record count.
Signed-off-by: Sergiu Iordache <sergiu@chromium.org> Acked-by: Marco Stornelli <marco.stornelli@gmail.com> Cc: "Ahmed S. Darwish" <darwish.07@gmail.com> Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>