]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: support IEC suffixes for RLIMIT stuff 1794/head
authorKarel Zak <kzak@redhat.com>
Fri, 6 Nov 2015 10:06:52 +0000 (11:06 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 6 Nov 2015 10:06:52 +0000 (11:06 +0100)
commit412ea7a936ebaa5342a4c2abf48b9e408e6ba5dc
tree1e28a600b8ac77f74528411153ad4c6a39d2ca02
parenta6bff4a7428b9539d85618e3c91fcb60be93f3fa
core: support IEC suffixes for RLIMIT stuff

Let's make things more user-friendly and support for example

  LimitAS=16G

rather than force users to always use LimitAS=16106127360.

The change is relevant for options:

  [Default]Limit{FSIZE,DATA,STACK,CORE,RSS,AS,MEMLOCK,MSGQUEUE}

The patch introduces config_parse_bytes_limit(), it's the same as
config_parse_limit() but uses parse_size() tu support the suffixes.

Addresses: https://github.com/systemd/systemd/issues/1772
man/systemd-system.conf.xml
man/systemd.exec.xml
src/core/load-fragment-gperf.gperf.m4
src/core/load-fragment.c
src/core/load-fragment.h
src/core/main.c