diff options
author | Matt Wilson <msw@redhat.com> | 2000-02-03 22:40:57 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-02-03 22:40:57 +0000 |
commit | 5c5b1b415985055f11b68675c43abcedd13bf1aa (patch) | |
tree | c39c3a5a13f728f5541fe6142b1b4b533b8ea8f5 /loader/lang.c | |
parent | c94f4433a97f28922e24196d977ade03ff9dc328 (diff) | |
download | anaconda-5c5b1b415985055f11b68675c43abcedd13bf1aa.tar.gz anaconda-5c5b1b415985055f11b68675c43abcedd13bf1aa.tar.xz anaconda-5c5b1b415985055f11b68675c43abcedd13bf1aa.zip |
don't crash on missing lang-table
Diffstat (limited to 'loader/lang.c')
-rw-r--r-- | loader/lang.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/loader/lang.c b/loader/lang.c index 281b921e0..306c2ae82 100644 --- a/loader/lang.c +++ b/loader/lang.c @@ -85,6 +85,11 @@ static void loadLanguageList(int flags) { int lineNum = 0; f = fopen(file, "r"); + if (!f) { + newtWinMessage(_("Error"), _("OK"), "cannot open %s: %s", + file, strerror (errno)); + return; + } while (fgets(line, sizeof(line), f)) { lineNum++; @@ -406,7 +411,7 @@ int chooseKeyboard(char ** keymap, char ** kbdtypep, int flags) { int j; #endif - if (FL_SERIAL (flags)) return 0; + if (FL_SERIAL (flags)) return LOADER_NOOP; /*if (testing) return 0;*/ |