diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-06-14 23:52:29 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-06-14 17:52:29 -0400 |
commit | 69281c49eb824b2cc854fdb5b97f134b1371be8d (patch) | |
tree | 27049e3af27d4d8ab79440aabdaea4fc61df4ddb /src/nss-myhostname | |
parent | 8dd57192bcee3c23625247ac8f11ef2043fcb36b (diff) |
util-lib: rework get_process_cmdline() (#3529)
This reworks get_process_cmdline() quite substantially, fixing the following:
- Fixes:
https://github.com/systemd/systemd/pull/3512/commits/a4e3bf4d7ac2de51191ce136ee9361ba319e106c#r66837630
- The passed max_length is also applied to the "comm" name, if comm_fallback is
set.
- The right thing happens if max_length == 1 is specified
- when the cmdline "foobar" is abbreviated to 6 characters the result is not
"foobar" instead of "foo...".
- trailing whitespace are removed before the ... suffix is appended. The 7
character abbreviation of "foo barz" is hence "foo..." instead of "foo ...".
- leading whitespace are suppressed from the cmdline
- a comprehensive test case is added
Diffstat (limited to 'src/nss-myhostname')
0 files changed, 0 insertions, 0 deletions