driverd: sort list of names returned by ListNames
This commit is contained in:
parent
0358b3f95d
commit
76252ffbde
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue