diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-21 04:06:11 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-21 04:06:11 +0100 |
commit | 76252ffbde7e8163c67d847db2445d8c49e32457 (patch) | |
tree | 365ffc46d7eae14362cda107016105a67629df4c /src/bus-driverd/bus-driverd.c | |
parent | 0358b3f95d7cfdd05e7cb8394cfdb6b3b4b14ffc (diff) |
driverd: sort list of names returned by ListNames
Diffstat (limited to 'src/bus-driverd/bus-driverd.c')
-rw-r--r-- | src/bus-driverd/bus-driverd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bus-driverd/bus-driverd.c b/src/bus-driverd/bus-driverd.c index 46ee3492ba..de2344503f 100644 --- a/src/bus-driverd/bus-driverd.c +++ b/src/bus-driverd/bus-driverd.c @@ -484,6 +484,9 @@ static int driver_list_names(sd_bus *bus, sd_bus_message *m, void *userdata, sd_ if (r < 0) return r; + /* Let's sort the names list to make it stable */ + strv_sort(names); + return return_strv(bus, m, names); } @@ -495,6 +498,9 @@ static int driver_list_activatable_names(sd_bus *bus, sd_bus_message *m, void *u if (r < 0) return r; + /* Let's sort the names list to make it stable */ + strv_sort(names); + return return_strv(bus, m, names); } |