Re: [systemd-devel] [PATCH] WIP: conf-parser: allow config_parse_iec_off to parse percentages

2015-05-22 Thread Lennart Poettering
On Fri, 22.05.15 12:30, Jan Synacek (jsyna...@redhat.com) wrote: What about this: introduce a new type: typedef struct SizeParameter { uint64_t value; bool relative; } SizeParameter; When .relative is false, then .value is an

Re: [systemd-devel] [PATCH] WIP: conf-parser: allow config_parse_iec_off to parse percentages

2015-05-22 Thread Jan Synacek
Lennart Poettering lenn...@poettering.net writes: On Wed, 20.05.15 10:37, jsyna...@redhat.com (jsyna...@redhat.com) wrote: From: Jan Synacek jsyna...@redhat.com Allow certain configuration options to be specified as percentages. For example, in journald.conf, SystemMaxUse= can now also be

Re: [systemd-devel] [PATCH] WIP: conf-parser: allow config_parse_iec_off to parse percentages

2015-05-20 Thread Lennart Poettering
On Wed, 20.05.15 10:37, jsyna...@redhat.com (jsyna...@redhat.com) wrote: From: Jan Synacek jsyna...@redhat.com Allow certain configuration options to be specified as percentages. For example, in journald.conf, SystemMaxUse= can now also be specified as 33%. There is a slight problem with

Re: [systemd-devel] [PATCH] WIP: conf-parser: allow config_parse_iec_off to parse percentages

2015-05-20 Thread systemd github import bot
Patchset imported to github. Pull request: https://github.com/systemd-devs/systemd/compare/master...systemd-mailing-devs:1432111062-22923-2-git-send-email-jsynacek%40redhat.com -- Generated by https://github.com/haraldh/mail2git ___ systemd-devel

[systemd-devel] [PATCH] WIP: conf-parser: allow config_parse_iec_off to parse percentages

2015-05-20 Thread jsynacek
From: Jan Synacek jsyna...@redhat.com Allow certain configuration options to be specified as percentages. For example, in journald.conf, SystemMaxUse= can now also be specified as 33%. There is a slight problem with the patch. It parses option names to determine what filesystem it should use to

[systemd-devel] [PATCH] WIP: conf-parser: allow config_parse_iec_off to parse percentages

2015-05-20 Thread jsynacek
From: Jan Synacek jsyna...@redhat.com --- src/shared/conf-parser.c | 42 ++ 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index 2c85515..d7d9aa4 100644 --- a/src/shared/conf-parser.c +++