From: Lionel Sambuc Date: Mon, 19 May 2014 07:39:57 +0000 (+0200) Subject: Message type for INPUT_CONF X-Git-Tag: v3.3.0~241 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/sign.html?a=commitdiff_plain;h=bcd669222a0978db69c4dd76a2bb68e87090f9c7;p=minix.git Message type for INPUT_CONF Change-Id: Ib25bd7e9717f203316e303d4f5a411d314ce46ed --- diff --git a/include/minix/com.h b/include/minix/com.h index 84e5816b9..daf95b79c 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -1082,10 +1082,6 @@ #define INPUT_RS_BASE 0x1580 /* from input driver to input server */ #define INPUT_CONF (INPUT_RQ_BASE + 0) /* configure driver */ -# define INPUT_KBD_ID m7_i1 /* keyboard device ID */ -# define INPUT_MOUSE_ID m7_i2 /* mouse device ID */ -# define INPUT_RSVD1_ID m7_i3 /* ID for as yet unallocated type */ -# define INPUT_RSVD2_ID m7_i4 /* ID for as yet unallocated type */ #define INPUT_SETLEDS (INPUT_RQ_BASE + 1) /* set keyboard LEDs */ # define INPUT_LED_MASK m7_i1 /* status mask of LEDs */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 12bc0f460..0c9a7f662 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -630,6 +630,16 @@ typedef struct { } mess_i2c_li2cdriver_busc_i2c_reserve; _ASSERT_MSG_SIZE(mess_i2c_li2cdriver_busc_i2c_reserve); +typedef struct { + int kbd_id; + int mouse_id; + int rsvd1_id; + int rsvd2_id; + + uint8_t padding[40]; +} mess_input_linputdriver_input_conf; +_ASSERT_MSG_SIZE(mess_input_linputdriver_input_conf); + typedef struct { uint32_t flags; endpoint_t endpoint; @@ -1249,6 +1259,8 @@ typedef struct { mess_i2c_li2cdriver_busc_i2c_exec m_i2c_li2cdriver_busc_i2c_exec; mess_i2c_li2cdriver_busc_i2c_reserve m_i2c_li2cdriver_busc_i2c_reserve; + mess_input_linputdriver_input_conf m_input_linputdriver_input_conf; + mess_lc_pm_exec m_lc_pm_exec; mess_lc_pm_exit m_lc_pm_exit; mess_lc_pm_getsid m_lc_pm_getsid; diff --git a/lib/libinputdriver/inputdriver.c b/lib/libinputdriver/inputdriver.c index fd0ef1b9a..74c1f38da 100644 --- a/lib/libinputdriver/inputdriver.c +++ b/lib/libinputdriver/inputdriver.c @@ -102,8 +102,8 @@ do_conf(message *m_ptr) /* Save the new state. */ input_endpt = m_ptr->m_source; - kbd_id = m_ptr->INPUT_KBD_ID; - mouse_id = m_ptr->INPUT_MOUSE_ID; + kbd_id = m_ptr->m_input_linputdriver_input_conf.kbd_id; + mouse_id = m_ptr->m_input_linputdriver_input_conf.mouse_id; /* If the input server is "full" there's nothing for us to do. */ if (kbd_id == INVALID_INPUT_ID && mouse_id == INVALID_INPUT_ID) diff --git a/servers/input/input.c b/servers/input/input.c index b35cd4dbb..1b06edaef 100644 --- a/servers/input/input.c +++ b/servers/input/input.c @@ -506,10 +506,10 @@ input_connect(endpoint_t owner, char *labelp, int typemask) memset(&m, 0, sizeof(m)); m.m_type = INPUT_CONF; - m.INPUT_KBD_ID = kbd_id; - m.INPUT_MOUSE_ID = mouse_id; - m.INPUT_RSVD1_ID = INVALID_INPUT_ID; /* reserved (joystick?) */ - m.INPUT_RSVD2_ID = INVALID_INPUT_ID; /* reserved for future use */ + m.m_input_linputdriver_input_conf.kbd_id = kbd_id; + m.m_input_linputdriver_input_conf.mouse_id = mouse_id; + m.m_input_linputdriver_input_conf.rsvd1_id = INVALID_INPUT_ID; /* reserved (joystick?) */ + m.m_input_linputdriver_input_conf.rsvd2_id = INVALID_INPUT_ID; /* reserved for future use */ if ((r = asynsend3(owner, &m, AMF_NOREPLY)) != OK) printf("INPUT: asynsend to %u failed (%d)\n", owner, r);