Skip to content

Commit c6f51f8

Browse files
author
Luca Bruno
authored
Merge pull request #292 from miono/update-doc-for-listunits
docs: Add more detail to Conn.ListUnits-doc
2 parents b14d3eb + 36e9ad3 commit c6f51f8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dbus/methods.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,8 @@ func (c *Conn) listUnitsInternal(f storeFunc) ([]UnitStatus, error) {
291291
// ListUnits returns an array with all currently loaded units. Note that
292292
// units may be known by multiple names at the same time, and hence there might
293293
// be more unit names loaded than actual units behind them.
294+
// Also note that a unit is only loaded if it is active and/or enabled.
295+
// Units that are both disabled and inactive will thus not be returned.
294296
func (c *Conn) ListUnits() ([]UnitStatus, error) {
295297
return c.listUnitsInternal(c.sysobj.Call("org.freedesktop.systemd1.Manager.ListUnits", 0).Store)
296298
}

0 commit comments

Comments
 (0)