From: Lennart Poettering Date: Sat, 21 Dec 2013 03:06:11 +0000 (+0100) Subject: driverd: sort list of names returned by ListNames X-Git-Tag: v209~775 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=76252ffbde7e8163c67d847db2445d8c49e32457 driverd: sort list of names returned by ListNames --- diff --git a/src/bus-driverd/bus-driverd.c b/src/bus-driverd/bus-driverd.c index 46ee3492b..de2344503 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); }