diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-05 17:21:11 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-05 17:21:11 +0100 |
commit | 64c5d35aebc38f93ce5c086c15c15de5acb21b2f (patch) | |
tree | 51113a991ff0111cddcf65bca90ac995e2173c1b /lib/Utils/xfuncs.cpp | |
parent | 01f36609ba1631751e492784d95b0e6b0706cf45 (diff) | |
download | abrt-64c5d35aebc38f93ce5c086c15c15de5acb21b2f.tar.gz abrt-64c5d35aebc38f93ce5c086c15c15de5acb21b2f.tar.xz abrt-64c5d35aebc38f93ce5c086c15c15de5acb21b2f.zip |
InformAllUsers support. enabled by default for Kerneloops. Tested wuth CCpp.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Utils/xfuncs.cpp')
-rw-r--r-- | lib/Utils/xfuncs.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp index 533fbfa..97c2f76 100644 --- a/lib/Utils/xfuncs.cpp +++ b/lib/Utils/xfuncs.cpp @@ -355,3 +355,16 @@ std::string concat_path_file(const char *path, const char *filename) lc = last_char_is(path, '/'); return ssprintf("%s%s%s", path, (lc==NULL ? "/" : ""), filename); } + +bool string_to_bool(const char *s) +{ + if (s[0] == '1' && s[1] == '\0') + return true; + if (strcasecmp(s, "on") == 0) + return true; + if (strcasecmp(s, "yes") == 0) + return true; + if (strcasecmp(s, "true") == 0) + return true; + return false; +} |