[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[f16-branch 1/2] LANG_DEFAULT lives in lang.c.



Related: rhbz#731356
---
 loader/lang.c   |    4 +++-
 loader/lang.h   |    4 +++-
 loader/loader.c |    3 +--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/loader/lang.c b/loader/lang.c
index 24878a7..6b1fa8e 100644
--- a/loader/lang.c
+++ b/loader/lang.c
@@ -47,6 +47,8 @@
 #include "../pyanaconda/isys/isys.h"
 #include "../pyanaconda/isys/log.h"
 
+const char *LANG_DEFAULT = "en_US.UTF-8";
+
 /* boot flags */
 extern uint64_t flags;
 
@@ -368,7 +370,7 @@ static char * getLangNick(char * oldLang) {
     return lang;
 }
 
-int setLanguage (char * key, int forced) {
+int setLanguage (const char * key, int forced) {
     int i;
 
     if (!languages) loadLanguageList();
diff --git a/loader/lang.h b/loader/lang.h
index d4b61dd..168ffa3 100644
--- a/loader/lang.h
+++ b/loader/lang.h
@@ -32,7 +32,9 @@ struct langInfo {
 
 int chooseLanguage(char ** lang);
 char * translateString(char * str);
-int setLanguage (char * key, int forced);
+int setLanguage (const char * key, int forced);
 int getLangInfo(struct langInfo **langs);
 
+extern const char *LANG_DEFAULT;
+
 #endif /* _LANG_H_ */
diff --git a/loader/loader.c b/loader/loader.c
index 2c5eb51..eedf439 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -128,7 +128,6 @@ int num_link_checks = 5;
 int post_link_sleep = 0;
 
 static int init_sig = SIGUSR1; /* default to shutdown=halt */
-static const char *LANG_DEFAULT = "en_US.UTF-8";
 
 static char *VIRTIO_PORT = "/dev/virtio-ports/org.fedoraproject.anaconda.log.0";
 
@@ -2059,7 +2058,7 @@ int main(int argc, char ** argv) {
     if (loaderData.lang && loaderData.lang_set == 1) {
         setLanguage(loaderData.lang, 1);
     } else {
-        setLanguage("en_US.UTF-8", 1);
+        setLanguage(LANG_DEFAULT, 1);
     }
 
     /* FIXME: this is a bit of a hack */
-- 
1.7.6.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]