diff options
author | Erik Troan <ewt@redhat.com> | 2000-07-15 15:13:53 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-07-15 15:13:53 +0000 |
commit | d3f28aa8be3bbdd65b71444c750dc5015026b519 (patch) | |
tree | e767ea1ae48ccacb751344d277c3a516887c2934 /loader | |
parent | 1a4908067e420a05f8d751d728ce8ebbb3e18ef7 (diff) | |
download | anaconda-d3f28aa8be3bbdd65b71444c750dc5015026b519.tar.gz anaconda-d3f28aa8be3bbdd65b71444c750dc5015026b519.tar.xz anaconda-d3f28aa8be3bbdd65b71444c750dc5015026b519.zip |
sort the list of keyboards (so we match stage2's order)
Diffstat (limited to 'loader')
-rw-r--r-- | loader/lang.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/loader/lang.c b/loader/lang.c index 074e7e99b..c1b3cba5c 100644 --- a/loader/lang.c +++ b/loader/lang.c @@ -47,6 +47,13 @@ static int aStringCmp(const void * a, const void * b) { return 1; } +static int simpleStringCmp(const void * a, const void * b) { + const char * first = *((const char **) a); + const char * second = *((const char **) b); + + return strcmp(first, second); +} + char * translateString(char * str) { unsigned int sum = 0, xor = 0; int len = 0; @@ -563,6 +570,7 @@ int chooseKeyboard(char ** keymap, char ** kbdtypep, int flags) { #endif kbds[i] = NULL; + qsort(kbds, i, sizeof(*kbds), simpleStringCmp); rc = newtWinMenu(_("Keyboard Type"), _("What type of keyboard do you have?"), |