File: atari-kbd.c

package info (click to toggle)
kbd-chooser 1.68
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 896 kB
  • ctags: 281
  • sloc: ansic: 4,360; yacc: 777; lex: 131; makefile: 118; sh: 33
file content (44 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* @file  atari-kbd.c
 *
 * @brief Report keyboards present on Atari
 *
 * Copyright (C) 2003 Alastair McKinstry, <mckinstry@debian.org>
 * Released under the GPL
 */

#include "config.h"
#include <string.h>
#include <debian-installer.h>
#include "xmalloc.h"
#include "kbd-chooser.h"


/**
 * @brief list of keyboards present
 */
kbd_t *atari_kbd_get (kbd_t *keyboards, const char *subarch)
{
	kbd_t *k = xmalloc (sizeof (kbd_t));

	if (strstr (subarch, "atari") == NULL)
		return keyboards;

	k->name = "atari"; // This must match the name "atari" in console-keymaps-atari
	k->deflt = NULL;
	k->data = NULL;
	k->present = UNKNOWN;
	k->next = keyboards;
	keyboards = k;

		
#if defined (KERNEL_2_6)
	// In 2.6 series, we can detect keyboard via /proc/bus/input
	// FIXME Write this

#endif // KERNEL_2_6

	/* ***  Only reached if KERNEL_2_6 not present *** 
	 * For 2.4, assume a keyboard is present
	 */	
	return keyboards;
}