diff options
author | Thomas Blume <Thomas.Blume@suse.com> | 2021-11-15 10:11:44 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-11-19 09:23:52 +0100 |
commit | 6e8791a04225d85720d045dcc87c076fec5eee7f (patch) | |
tree | df3f70a149d71dab5ffe70d795b5cbb464f6466d /src/shared/conf-parser.c | |
parent | Merge pull request #21420 from DaanDeMeyer/journal-enumerate-skip (diff) | |
download | systemd-6e8791a04225d85720d045dcc87c076fec5eee7f.tar.xz systemd-6e8791a04225d85720d045dcc87c076fec5eee7f.zip |
systemd-coredump: allow setting external core size to infinity
Make it compatible to the ulimit setting: unlimited
Diffstat (limited to 'src/shared/conf-parser.c')
-rw-r--r-- | src/shared/conf-parser.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 7eda2da1c0..1e1967d7ea 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -677,6 +677,31 @@ int config_parse_iec_uint64( return 0; } +int config_parse_iec_uint64_infinity( + const char* unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { + + uint64_t *bytes = data; + + assert(rvalue); + assert(data); + + if (streq(rvalue, "infinity")) { + *bytes = UINT64_MAX; + return 0; + } + + return config_parse_iec_uint64(unit, filename, line, section, section_line, lvalue, ltype, rvalue, data, userdata); +} + int config_parse_bool( const char* unit, const char *filename, |