]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: ensure varlink Unit.List() can query inactive units
authorLuca Boccassi <luca.boccassi@gmail.com>
Fri, 9 Jan 2026 18:15:06 +0000 (19:15 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 13 Feb 2026 19:16:13 +0000 (19:16 +0000)
commitcb7c0950b3fa93379e3ebdbf756f12f4d723cc5d
treec6e44b2c40ba7addffdcc76b3c3babb16ee96a50
parentb5f87259891334fb0946a8641a8b7d6a3b1767fe
core: ensure varlink Unit.List() can query inactive units

manager_get_unit() only returns loaded units, if a unit is
stopped and not referenced by anything it will be GCed, so
this method will return nothing. Use manager_load_unit()
instead so that a stopped unit gets loaded and we can
return its state to the caller, after checking that it
actually exists.

Follow-up for d2a8dbabf5e2676f436515cc821040bd24eb6003
src/core/varlink-unit.c
src/shared/varlink-io.systemd.Unit.c