summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/dmenu.c
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1996-11-09 16:47:08 +0000
committerjoerg <joerg@FreeBSD.org>1996-11-09 16:47:08 +0000
commit88d8c0377cc50df0ced7209f9f342e7c3af67066 (patch)
tree165a15c614d5bc396edc74dfd09ab06aea48e074 /usr.sbin/sysinstall/dmenu.c
parentce411f960dcde291410b04a762525490f419123b (diff)
downloadFreeBSD-src-88d8c0377cc50df0ced7209f9f342e7c3af67066.zip
FreeBSD-src-88d8c0377cc50df0ced7209f9f342e7c3af67066.tar.gz
Sysinstall now offers the installation of a keymap early in the game!
Not all mappings are supported, most languages come only with one encoding since this should be sufficient to get up & running in using sysinstall, and we are already pretty tight on space. (My previous commit has already bumped the boot MFS size by another 50 KB for this.) This feature requires the `kbdcontrol -L' i've just committed. Plain text keymaps and the entire scanner are overkill for sysinstall. Also updated the list of available keymaps while i was at it. Reviewed by: jkh
Diffstat (limited to 'usr.sbin/sysinstall/dmenu.c')
-rw-r--r--usr.sbin/sysinstall/dmenu.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/usr.sbin/sysinstall/dmenu.c b/usr.sbin/sysinstall/dmenu.c
index ee17880..410bd0b 100644
--- a/usr.sbin/sysinstall/dmenu.c
+++ b/usr.sbin/sysinstall/dmenu.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
- * $Id: dmenu.c,v 1.25 1996/08/03 10:10:52 jkh Exp $
+ * $Id: dmenu.c,v 1.26 1996/11/07 08:03:21 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -35,6 +35,7 @@
*/
#include "sysinstall.h"
+#include <errno.h>
#include <sys/types.h>
#define MAX_MENU 15
@@ -109,6 +110,25 @@ dmenuSetVariables(dialogMenuItem *tmp)
}
int
+dmenuSetKmapVariable(dialogMenuItem *tmp)
+{
+ char *lang;
+ int err;
+
+ variable_set((char *)tmp->data);
+ lang = variable_get("keymap");
+ if (lang != NULL)
+ {
+ err = loadKeymap(lang);
+ if (err == -1)
+ msgConfirm("No appropriate keyboard map found, sorry.");
+ else if (err == -2)
+ msgConfirm("Error installing keyboard map, errno = %d.", errno);
+ }
+ return DITEM_SUCCESS;
+}
+
+int
dmenuToggleVariable(dialogMenuItem *tmp)
{
if (!variable_get((char *)tmp->data))
OpenPOWER on IntegriCloud