From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Waychison Subject: [PATCH v2 17/23] kmsg_dumper: Introduce a new 'SOFT' dump reason Date: Mon, 08 Nov 2010 12:33:17 -0800 Message-ID: <20101108203316.22479.86025.stgit@crlf.mtv.corp.google.com> References: <20101108203120.22479.19708.stgit@crlf.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20101108203120.22479.19708.stgit-+dUuAhMFdFN6FDdRrpk8kO4/NqBCd+6Q@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: simon.kagstrom-vI6UBbBVNY+JA8cjQkG2/g@public.gmane.org, davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org, nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org, Matt Mackall Cc: adurbin-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, chavey-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, Greg KH , =?utf-8?q?Am=C3=A9rico?= Wang , akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-api@vger.kernel.org It is a useful to be able to exercise kmsg_dumper implementations without requiring a kernel oops or panic. This commit adds a new reason called KMSG_DUMP_SOFT, which signifies that the system isn't really going down. This logic is used in a later commit that introduces the netoops driver. Signed-off-by: Mike Waychison --- It is also possible that we not introduce KMSG_DUMP_SOFT, and simply overload the existing KMSG_DUMP_OOPS reason, but I figured that this would be cleaner. TODO: Make sure mtdoops and ramoops do something useful with this flag? --- include/linux/kmsg_dump.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/kmsg_dump.h b/include/linux/kmsg_dump.h index a229acc..0abc2d7 100644 --- a/include/linux/kmsg_dump.h +++ b/include/linux/kmsg_dump.h @@ -20,6 +20,7 @@ enum kmsg_dump_reason { KMSG_DUMP_OOPS, KMSG_DUMP_PANIC, KMSG_DUMP_KEXEC, + KMSG_DUMP_SOFT, }; /**