summaryrefslogtreecommitdiff
path: root/src/shared/locale-util.c
diff options
context:
space:
mode:
authorMichal Sekletar <msekleta@redhat.com>2014-09-24 13:17:43 +0200
committerMichal Sekletar <msekleta@redhat.com>2014-09-25 09:19:56 +0200
commita34286684ebb78dd3db0d7f34feb2c121c9d00cc (patch)
treef94a3b5256d39af5b5a342a15ad8b9f44deeb2ce /src/shared/locale-util.c
parenta5f6c30da3ac58081108221bf8a0f6f1d84b33a9 (diff)
localectl: print warning when there are options given on kernel cmdline
Diffstat (limited to 'src/shared/locale-util.c')
-rw-r--r--src/shared/locale-util.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/shared/locale-util.c b/src/shared/locale-util.c
index 68851ae13d..d5eaff3d9e 100644
--- a/src/shared/locale-util.c
+++ b/src/shared/locale-util.c
@@ -25,6 +25,7 @@
#include "util.h"
#include "utf8.h"
#include "strv.h"
+#include "util.h"
#include "locale-util.h"
@@ -203,3 +204,22 @@ bool locale_is_valid(const char *name) {
return true;
}
+
+static const char * const locale_variable_table[_VARIABLE_LC_MAX] = {
+ [VARIABLE_LANG] = "LANG",
+ [VARIABLE_LANGUAGE] = "LANGUAGE",
+ [VARIABLE_LC_CTYPE] = "LC_CTYPE",
+ [VARIABLE_LC_NUMERIC] = "LC_NUMERIC",
+ [VARIABLE_LC_TIME] = "LC_TIME",
+ [VARIABLE_LC_COLLATE] = "LC_COLLATE",
+ [VARIABLE_LC_MONETARY] = "LC_MONETARY",
+ [VARIABLE_LC_MESSAGES] = "LC_MESSAGES",
+ [VARIABLE_LC_PAPER] = "LC_PAPER",
+ [VARIABLE_LC_NAME] = "LC_NAME",
+ [VARIABLE_LC_ADDRESS] = "LC_ADDRESS",
+ [VARIABLE_LC_TELEPHONE] = "LC_TELEPHONE",
+ [VARIABLE_LC_MEASUREMENT] = "LC_MEASUREMENT",
+ [VARIABLE_LC_IDENTIFICATION] = "LC_IDENTIFICATION"
+};
+
+DEFINE_STRING_TABLE_LOOKUP(locale_variable, LocaleVariable);