]> git.ipfire.org Git - thirdparty/systemd.git/commit
systemctl-show: make show_memory_available cover memory_available itself main
authorMike Yuan <me@yhndnzj.com>
Wed, 8 May 2024 17:12:17 +0000 (01:12 +0800)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 8 May 2024 19:20:05 +0000 (21:20 +0200)
commit8f9acf8e10e398c982d3372b686f5bcdc1ca966a
tree59797348b863789b72a4897e8596283a5b8c9c4f
parentd2fa7f1310ad82af8024bc61d17eeb761499cc6f
systemctl-show: make show_memory_available cover memory_available itself

Follow-up for f380473edfa899706d630bb64750ab50c5c04961

This cleans up the code a bit. Also, before this commit,
if MemoryAvailable is set but show_memory_available
is false, and we have nothing else to output, empty
parenthesis is shown. This can be easily reproduced
on -.slice:

> systemctl status -- -.slice
> ...
> Memory: 1.8G ()
> ...
src/systemctl/systemctl-show.c