kdump/kdump-format-list

28 lines
1.0 KiB
Plaintext
Raw Normal View History

From: Jeff Mahoney <jeffm@suse.com>
Subject: kdump: Allow format to be a list
/etc/sysconfig/kdump specifies that the KDUMP_FORMAT variable is a comma
separated list of options. The kdumptool itself doesn't treat it as a list
and will ignore all options if more than one is specified.
This patch searches for the option and uses it if it is present.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
kdumptool/savedump.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kdumptool/savedump.cc
+++ b/kdumptool/savedump.cc
@@ -275,8 +275,8 @@ void SaveDump::saveDump()
string dumpformat = config->getDumpFormat();
DataProvider *provider;
- bool useElf = strcasecmp(dumpformat.c_str(), "elf") == 0;
- bool useCompressed = strcasecmp(dumpformat.c_str(), "compressed") == 0;
+ bool useElf = strcasestr(dumpformat.c_str(), "elf") != NULL;
+ bool useCompressed = strcasestr(dumpformat.c_str(), "compressed") != NULL;
if (useElf && dumplevel == 0) {
// use file source?