summaryrefslogtreecommitdiff
path: root/src/locale/localed.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-07 11:49:48 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-07 15:25:55 +0200
commit7568345034f2890af745747783c5abfbf6eccf0f (patch)
tree711cb1a32730435553d00fe2b1fcc222d5bcc803 /src/locale/localed.c
parenta940778fb1dd16479f455bab3ac6cbdbc5b06165 (diff)
shared: make timezone and locale enumeration and validation generic
This way we can reuse it other code thatn just localectl/localed + timedatectl/timedated.
Diffstat (limited to 'src/locale/localed.c')
-rw-r--r--src/locale/localed.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/locale/localed.c b/src/locale/localed.c
index 23da149b0e..d6ffe67520 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -38,6 +38,7 @@
#include "bus-error.h"
#include "bus-message.h"
#include "event-util.h"
+#include "locale-util.h"
enum {
/* We don't list LC_ALL here on purpose. People should be
@@ -848,7 +849,7 @@ static int method_set_locale(sd_bus *bus, sd_bus_message *m, void *userdata, sd_
k = strlen(names[p]);
if (startswith(*i, names[p]) &&
(*i)[k] == '=' &&
- string_is_safe((*i) + k + 1)) {
+ locale_is_valid((*i) + k + 1)) {
valid = true;
passed[p] = true;