From 97d27ecbdf486f64bc8d378183684fbf267ad4e5 Mon Sep 17 00:00:00 2001 From: DaiYoung Kim Date: Thu, 25 Jul 2013 20:36:06 +0900 Subject: [PATCH] ecp: improve socket receiving method Signed-off-by: DaiYoung, Kim --- tizen/src/ecs.c | 291 ++++++++++---------------------- tizen/src/ecs.h | 28 ++- tizen/src/ecs_msg.c | 269 +++++++++++++++++++++++++++++ tizen/src/genmsg/ecs.pb-c.c | 25 ++- tizen/src/genmsg/ecs.pb-c.h | 4 +- tizen/src/hw/maru_virtio_evdi.c | 2 +- tizen/src/msg/ecs.proto | 2 +- tizen/src/msg/gen.sh | 4 + 8 files changed, 416 insertions(+), 209 deletions(-) create mode 100755 tizen/src/msg/gen.sh diff --git a/tizen/src/ecs.c b/tizen/src/ecs.c index 3a825c9ba5..cec64603e4 100644 --- a/tizen/src/ecs.c +++ b/tizen/src/ecs.c @@ -1,5 +1,6 @@ #include #include +#include #include "hw/qdev.h" #include "net/net.h" @@ -39,6 +40,10 @@ struct mon_fd_t { next; }; +#ifndef min +#define min(a,b) ((a)<(b)?(a):(b)) +#endif + typedef struct mon_cmd_t { const char *name; const char *args_type; @@ -127,20 +132,29 @@ bool send_to_all_client(const char* data, const int len) { QTAILQ_FOREACH(clii, &clients, next) { - send_to_client(clii->client_fd, data); + send_to_client(clii->client_fd, data, len); } pthread_mutex_unlock(&mutex_clilist); return true; } -void send_to_client(int fd, const char *str) { + +void send_to_client(int fd, const char* data, const int len) +{ + + ecs_write(fd, (const uint8_t*) data, len); +} + +/* +void send_to_client(int fd, const char* data, const int len) +{ char c; uint8_t outbuf[OUT_BUF_SIZE]; int outbuf_index = 0; for (;;) { - c = *str++; + c = *data++; if (outbuf_index >= OUT_BUF_SIZE - 1) { LOG("string is too long: overflow buffer."); return; @@ -157,6 +171,7 @@ void send_to_client(int fd, const char *str) { } ecs_write(fd, outbuf, outbuf_index); } +*/ #define QMP_ACCEPT_UNKNOWNS 1 static void ecs_monitor_flush(ECS_Client *clii, Monitor *mon) { @@ -685,124 +700,7 @@ void make_header(QDict* obj, type_length length, type_group group, qdict_put(obj, "action", qint_from_int((int64_t )action)); } -bool ntf_to_injector(const char* data, const int len) { - type_length length = 0; - type_group group = 0; - type_action action = 0; - - const int catsize = 10; - char cat[catsize + 1]; - memset(cat, 0, catsize + 1); - - read_val_str(data, cat, catsize); - read_val_short(data + catsize, &length); - read_val_char(data + catsize + 2, &group); - read_val_char(data + catsize + 2 + 1, &action); - - - const char* ijdata = (data + catsize + 2 + 1 + 1); - - char *encoded_ijdata = NULL; - LOG("<< header cat = %s, length = %d, action=%d, group=%d", cat, length, - action, group); - - if(!strcmp(cat, "telephony")) { - base64_encode(ijdata, length, &encoded_ijdata); - } - - QDict* obj_header = qdict_new(); - make_header(obj_header, length, group, action); - - QDict* objData = qdict_new(); - qobject_incref(QOBJECT(obj_header)); - - qdict_put(objData, "cat", qstring_from_str(cat)); - qdict_put(objData, "header", obj_header); - if(!strcmp(cat, "telephony")) { - qdict_put(objData, "ijdata", qstring_from_str(encoded_ijdata)); - } else { - qdict_put(objData, "ijdata", qstring_from_str(ijdata)); - } - - QDict* objMsg = qdict_new(); - qobject_incref(QOBJECT(objData)); - - qdict_put(objMsg, "type", qstring_from_str("injector")); - qdict_put(objMsg, "result", qstring_from_str("success")); - qdict_put(objMsg, "data", objData); - - QString *json; - json = qobject_to_json(QOBJECT(objMsg)); - - assert(json != NULL); - - qstring_append_chr(json, '\n'); - const char* snddata = qstring_get_str(json); - - LOG("<< json str = %s", snddata); - - send_to_all_client(snddata, strlen(snddata)); - - QDECREF(json); - - QDECREF(obj_header); - QDECREF(objData); - QDECREF(objMsg); - - return true; -} - -bool send_injector_ntf(const char* data, const int len) -{ - type_length length = 0; - type_group group = 0; - type_action action = 0; - - const int catsize = 10; - char cat[catsize + 1]; - memset(cat, 0, catsize + 1); - - read_val_str(data, cat, catsize); - read_val_short(data + catsize, &length); - read_val_char(data + catsize + 2, &group); - read_val_char(data + catsize + 2 + 1, &action); - - - const char* ijdata = (data + catsize + 2 + 1 + 1); - char *encoded_ijdata = NULL; - LOG("<< header cat = %s, length = %d, action=%d, group=%d", cat, length, - action, group); - - //if(!strcmp(cat, "telephony")) { - // base64_encode(ijdata, length, &encoded_ijdata); - //} - - ECS__Master master = ECS__MASTER__INIT; - ECS__InjectorNtf ntf = ECS__INJECTOR_NTF__INIT; - - strncpy(ntf.category, cat, 10); - ntf.length = length; - ntf.group = group; - ntf.action = action; - - memcpy(ntf.data.data, ijdata, length); - - master.injector_ntf = &ntf; - - int len_pack = ecs__master__get_packed_size(&master); - void* buf = malloc(len_pack); - ecs__master__pack(&master, buf); - - send_to_all_client(buf, len_pack); - - if (buf) - { - free(buf); - } -// - return true; -} bool ntf_to_control(const char* data, const int len) { return true; @@ -814,68 +712,6 @@ bool ntf_to_monitor(const char* data, const int len) { static int ijcount = 0; -static bool msgproc_start_req(ECS_Client* ccli, ECS__StartReq* msg) -{ - - return true; -} - -static bool msgproc_injector_req(ECS_Client* ccli, ECS__InjectorReq* msg) -{ - char cmd[10]; - memset(cmd, 0, 10); - strcpy(cmd, msg->category); - type_length length = (type_length) msg->length; - type_group group = (type_group) (msg->group & 0xff); - type_action action = (type_action) (msg->action & 0xff); - - const char* data = msg->data.data; - //LOG(">> count= %d", ++ijcount); - LOG(">> print len = %d, data\" %s\"", strlen(data), data); - LOG(">> header = cmd = %s, length = %d, action=%d, group=%d", cmd, length, - action, group); - - //int datalen = strlen(data); - int datalen = msg->data.len; - int sndlen = datalen + 14; - char* sndbuf = (char*) malloc(sndlen + 1); - if (!sndbuf) { - return false; - } - - memset(sndbuf, 0, sndlen + 1); - - // set data - memcpy(sndbuf, cmd, 10); - memcpy(sndbuf + 10, &length, 2); - memcpy(sndbuf + 12, &group, 1); - memcpy(sndbuf + 13, &action, 1); - memcpy(sndbuf + 14, data, datalen); - - send_to_evdi(route_ij, sndbuf, sndlen); - - free(sndbuf); - - return true; -} - -static bool msgproc_control_req(ECS_Client *ccli, ECS__ControlReq* msg) -{ - - return true; -} - -static bool msgproc_monitor_req(ECS_Client *ccli, ECS__MonitorReq* msg) -{ - - return true; -} - -static bool msgproc_screen_dump_req(ECS_Client *ccli, ECS__ScreenDumpReq* msg) -{ - - return true; -} static bool injector_command_proc(ECS_Client *clii, QObject *obj) { QDict* header = qdict_get_qdict(qobject_to_qdict(obj), "header"); @@ -1072,7 +908,7 @@ static void handle_ecs_command(JSONMessageParser *parser, QList *tokens, } else if (!strcmp(type_name, COMMAND_TYPE_DEVICE)) { device_command_proc(clii, obj); } else if (!strcmp(type_name, ECS_MSG_STARTINFO_REQ)) { - ecs_startinfo_req(clii); + //ecs_startinfo_req(clii); } else { LOG("handler not found"); } @@ -1168,27 +1004,78 @@ static ssize_t ecs_recv(int fd, char *buf, size_t len) } #endif -static void ecs_read(ECS_Client *clii) { - uint8_t buf[READ_BUF_LEN]; - int len, size; - len = sizeof(buf); - memset(buf, 0, READ_BUF_LEN); - if (!clii || 0 > clii->client_fd) { - LOG("read client info is NULL."); +static void reset_sbuf(sbuf* sbuf) +{ + memset(sbuf->_buf, 0, 4096); + sbuf->_use = 0; + sbuf->_netlen = 0; +} + +static void ecs_read(ECS_Client *cli) { + + int read = 0; + int to_read_bytes = 0; + if (ioctl(cli->client_fd, FIONREAD, &to_read_bytes) < 0) + { + LOG("ioctl failed"); return; } - size = ecs_recv(clii->client_fd, (char*) buf, len); - if (0 == size) { - ecs_client_close(clii); - } else if (0 < size) { - LOG("read data: %s, len: %d, size: %d\n", buf, len, size); - - handle_protobuf_msg(clii, (char*)buf, size); - - //ecs_json_message_parser_feed(&clii->parser, (const char *) buf, size); + LOG("ioctl FIONREAD: %d\n", to_read_bytes); + if (to_read_bytes == 0) + goto fail; + + + if (cli->sbuf._netlen == 0) + { + if (to_read_bytes < 4) + { + LOG("insufficient data size to read"); + return; + } + + long payloadsize = 0; + read = ecs_recv(cli->client_fd, (char*) &payloadsize, 4); + + if (read < 4) + { + LOG("insufficient header size"); + goto fail; + } + + payloadsize = ntohl(payloadsize); + + cli->sbuf._netlen = payloadsize; + + LOG("payload size: %ld\n", payloadsize); + + to_read_bytes -= 4; } + + if (to_read_bytes == 0) + return; + + + to_read_bytes = min(to_read_bytes, cli->sbuf._netlen - cli->sbuf._use); + + read = ecs_recv(cli->client_fd, (char*)(cli->sbuf._buf + cli->sbuf._use), to_read_bytes); + if (read == 0) + goto fail; + + + cli->sbuf._use += read; + + + if (cli->sbuf._netlen == cli->sbuf._use) + { + handle_protobuf_msg(cli, (char*)cli->sbuf._buf, cli->sbuf._use); + reset_sbuf(&cli->sbuf); + } + + return; +fail: + ecs_client_close(cli); } #ifndef _WIN32 @@ -1225,6 +1112,8 @@ static int ecs_add_client(ECS_State *cs, int fd) { return -1; } + reset_sbuf(&clii->sbuf); + qemu_set_nonblock(fd); clii->client_fd = fd; @@ -1245,7 +1134,7 @@ static int ecs_add_client(ECS_State *cs, int fd) { welcome = WELCOME_MESSAGE; - send_to_client(fd, welcome); + //send_to_client(fd, welcome); pthread_mutex_unlock(&mutex_clilist); @@ -1314,6 +1203,7 @@ static void alive_checker(void *opaque) { return; } + /* QTAILQ_FOREACH(clii, &clients, next) { if (1 == clii->keep_alive) { @@ -1328,6 +1218,7 @@ static void alive_checker(void *opaque) { qemu_mod_timer(cs->alive_timer, qemu_get_clock_ns(vm_clock) + get_ticks_per_sec() * TIMER_ALIVE_S); + */ } static int socket_initialize(ECS_State *cs, QemuOpts *opts) { diff --git a/tizen/src/ecs.h b/tizen/src/ecs.h index a31b66059d..cff0657bc6 100644 --- a/tizen/src/ecs.h +++ b/tizen/src/ecs.h @@ -8,6 +8,7 @@ #include "qapi/qmp/qerror.h" #include "qemu-common.h" #include "ecs-json-streamer.h" +#include "genmsg/ecs.pb-c.h" #define ECS_DEBUG 1 @@ -78,6 +79,15 @@ typedef unsigned char type_action; #define READ_BUF_LEN 4096 + +typedef struct sbuf +{ + int _netlen; + int _use; + char _buf[4096]; +}sbuf; + + struct Monitor { int suspend_cnt; uint8_t outbuf[OUT_BUF_SIZE]; @@ -109,6 +119,9 @@ typedef struct ECS_Client { int client_id; int keep_alive; const char* type; + + sbuf sbuf; + ECS_State *cs; JSONMessageParser parser; QTAILQ_ENTRY(ECS_Client) next; @@ -123,16 +136,21 @@ void ecs_printf(const char *type, const char *fmt, ...) GCC_FMT_ATTR(2, 3); bool handle_protobuf_msg(ECS_Client* cli, char* data, const int len); + bool ntf_to_injector(const char* data, const int len); bool ntf_to_control(const char* data, const int len); bool ntf_to_monitor(const char* data, const int len); + +bool send_to_ecp(ECS__Master* master); + +bool send_start_ans(int host_keyboard_onff); bool send_injector_ntf(const char* data, const int len); bool send_control_ntf(const char* data, const int len); bool send_monitor_ntf(const char* data, const int len); bool send_to_all_client(const char* data, const int len); -void send_to_client(int fd, const char *str); +void send_to_client(int fd, const char* data, const int len) ; void make_header(QDict* obj, type_length length, type_group group, type_action action); @@ -142,6 +160,12 @@ void read_val_char(const char* data, unsigned char* ret_val); void read_val_str(const char* data, char* ret_val, int len); +bool msgproc_start_req(ECS_Client* ccli, ECS__StartReq* msg); +bool msgproc_injector_req(ECS_Client* ccli, ECS__InjectorReq* msg); +bool msgproc_control_req(ECS_Client *ccli, ECS__ControlReq* msg); +bool msgproc_monitor_req(ECS_Client *ccli, ECS__MonitorReq* msg); +bool msgproc_screen_dump_req(ECS_Client *ccli, ECS__ScreenDumpReq* msg); + enum{ CONTROL_COMMAND_HOST_KEYBOARD_ONOFF_REQ = 1, @@ -149,7 +173,7 @@ enum{ }; // messages -void ecs_startinfo_req(ECS_Client *clii); +//void ecs_startinfo_req(ECS_Client *clii); void control_host_keyboard_onoff_req(ECS_Client *clii, QDict* data); void set_sensor_data(int length, const char* data); diff --git a/tizen/src/ecs_msg.c b/tizen/src/ecs_msg.c index 3feaa65468..98a15b68ca 100644 --- a/tizen/src/ecs_msg.c +++ b/tizen/src/ecs_msg.c @@ -29,6 +29,136 @@ #include "hw/maru_virtio_evdi.h" #include "skin/maruskin_operation.h" +// utility functions + +void* build_master(ECS__Master* master, int* payloadsize) +{ + int len_pack = ecs__master__get_packed_size(master); + *payloadsize = len_pack + 4; + LOG("pack size=%d", len_pack); + void* buf = g_malloc(len_pack + 4); + if (!buf) + return NULL; + + ecs__master__pack(master, buf + 4); + + len_pack = htonl(len_pack); + memcpy(buf, &len_pack, 4); + + return buf; +} + +bool send_to_ecp(ECS__Master* master) +{ + int payloadsize = 0; + void* buf = build_master(master, &payloadsize); + if (!buf) + { + LOG("invalid buf"); + return false; + } + + if (!send_to_all_client(buf, payloadsize)) + return false; + + if (buf) + { + g_free(buf); + } + return true; +} + + +// message handlers + + +bool msgproc_start_req(ECS_Client* ccli, ECS__StartReq* msg) +{ + LOG("ecs_startinfo_req"); + + + int hostkbd_status = mloop_evcmd_get_hostkbd_status(); + + LOG("hostkbd_status = %d", hostkbd_status); + + send_start_ans(hostkbd_status); + + return true; +} + +bool msgproc_injector_req(ECS_Client* ccli, ECS__InjectorReq* msg) +{ + char cmd[10]; + memset(cmd, 0, 10); + strcpy(cmd, msg->category); + type_length length = (type_length) msg->length; + type_group group = (type_group) (msg->group & 0xff); + type_action action = (type_action) (msg->action & 0xff); + + + int datalen = 0; + if (msg->has_data) + { + datalen = msg->data.len; + } + //LOG(">> count= %d", ++ijcount); + + LOG(">> header = cmd = %s, length = %d, action=%d, group=%d", cmd, length, + action, group); + + + int sndlen = datalen + 14; + char* sndbuf = (char*) g_malloc(sndlen + 1); + if (!sndbuf) { + return false; + } + + memset(sndbuf, 0, sndlen + 1); + + // set data + memcpy(sndbuf, cmd, 10); + memcpy(sndbuf + 10, &length, 2); + memcpy(sndbuf + 12, &group, 1); + memcpy(sndbuf + 13, &action, 1); + + + if (msg->has_data) + { + if (msg->data.data && msg->data.len > 0) + { + const char* data = msg->data.data; + memcpy(sndbuf + 14, data, datalen); + LOG(">> print len = %d, data\" %s\"", strlen(data), data); + } + } + + + send_to_evdi(route_ij, sndbuf, sndlen); + + g_free(sndbuf); + + return true; +} + +bool msgproc_control_req(ECS_Client *ccli, ECS__ControlReq* msg) +{ + + return true; +} + +bool msgproc_monitor_req(ECS_Client *ccli, ECS__MonitorReq* msg) +{ + + return true; +} + +bool msgproc_screen_dump_req(ECS_Client *ccli, ECS__ScreenDumpReq* msg) +{ + + return true; +} + +/* void ecs_startinfo_req(ECS_Client *clii) { LOG("ecs_startinfo_req"); @@ -65,6 +195,7 @@ void ecs_startinfo_req(ECS_Client *clii) QDECREF(objData); QDECREF(objMsg); } +*/ void control_host_keyboard_onoff_req(ECS_Client *clii, QDict* data) { @@ -95,3 +226,141 @@ void host_keyboard_onoff_ntf(int is_on) QDECREF(objMsg); } + + +// + +bool ntf_to_injector(const char* data, const int len) { + type_length length = 0; + type_group group = 0; + type_action action = 0; + + const int catsize = 10; + char cat[catsize + 1]; + memset(cat, 0, catsize + 1); + + read_val_str(data, cat, catsize); + read_val_short(data + catsize, &length); + read_val_char(data + catsize + 2, &group); + read_val_char(data + catsize + 2 + 1, &action); + + + const char* ijdata = (data + catsize + 2 + 1 + 1); + + char *encoded_ijdata = NULL; + LOG("<< header cat = %s, length = %d, action=%d, group=%d", cat, length, + action, group); + + if(!strcmp(cat, "telephony")) { + base64_encode(ijdata, length, &encoded_ijdata); + } + + QDict* obj_header = qdict_new(); + make_header(obj_header, length, group, action); + + QDict* objData = qdict_new(); + qobject_incref(QOBJECT(obj_header)); + + qdict_put(objData, "cat", qstring_from_str(cat)); + qdict_put(objData, "header", obj_header); + if(!strcmp(cat, "telephony")) { + qdict_put(objData, "ijdata", qstring_from_str(encoded_ijdata)); + } else { + qdict_put(objData, "ijdata", qstring_from_str(ijdata)); + } + + QDict* objMsg = qdict_new(); + qobject_incref(QOBJECT(objData)); + + qdict_put(objMsg, "type", qstring_from_str("injector")); + qdict_put(objMsg, "result", qstring_from_str("success")); + qdict_put(objMsg, "data", objData); + + QString *json; + json = qobject_to_json(QOBJECT(objMsg)); + + assert(json != NULL); + + qstring_append_chr(json, '\n'); + const char* snddata = qstring_get_str(json); + + LOG("<< json str = %s", snddata); + + send_to_all_client(snddata, strlen(snddata)); + + QDECREF(json); + + QDECREF(obj_header); + QDECREF(objData); + QDECREF(objMsg); + + return true; +} + +bool send_start_ans(int host_keyboard_onff) +{ + ECS__Master master = ECS__MASTER__INIT; + ECS__StartAns ans = ECS__START_ANS__INIT; + + ans.host_keyboard_onoff = host_keyboard_onff; + + master.start_ans = &ans; + + return send_to_ecp(&master); +} + +bool send_injector_ntf(const char* data, const int len) +{ + type_length length = 0; + type_group group = 0; + type_action action = 0; + + const int catsize = 10; + char cat[catsize + 1]; + memset(cat, 0, catsize + 1); + + read_val_str(data, cat, catsize); + read_val_short(data + catsize, &length); + read_val_char(data + catsize + 2, &group); + read_val_char(data + catsize + 2 + 1, &action); + + + const char* ijdata = (data + catsize + 2 + 1 + 1); + + LOG("<< header cat = %s, length = %d, action=%d, group=%d", cat, length,action, group); + + ECS__Master master = ECS__MASTER__INIT; + ECS__InjectorNtf ntf = ECS__INJECTOR_NTF__INIT; + + ntf.category = (char*) g_malloc(catsize + 1); + strncpy(ntf.category, cat, 10); + + + ntf.length = length; + ntf.group = group; + ntf.action = action; + + if (length > 0) + { + ntf.has_data = 1; + + ntf.data.data = g_malloc(length); + ntf.data.len = length; + memcpy(ntf.data.data, ijdata, length); + } + + master.type = ECS__MASTER__TYPE__INJECTOR_NTF; + master.injector_ntf = &ntf; + + send_to_ecp(&master); + + if (ntf.data.data && ntf.data.len > 0) + { + g_free(ntf.data.data); + } + + if (ntf.category) + g_free(ntf.category); + + return true; +} diff --git a/tizen/src/genmsg/ecs.pb-c.c b/tizen/src/genmsg/ecs.pb-c.c index b5067c756d..03fb14b400 100644 --- a/tizen/src/genmsg/ecs.pb-c.c +++ b/tizen/src/genmsg/ecs.pb-c.c @@ -1333,12 +1333,29 @@ const ProtobufCMessageDescriptor ecs__start_req__descriptor = (ProtobufCMessageInit) ecs__start_req__init, NULL,NULL,NULL /* reserved[123] */ }; -static const ProtobufCFieldDescriptor ecs__start_ans__field_descriptors[0] = +static const ProtobufCFieldDescriptor ecs__start_ans__field_descriptors[1] = { + { + "host_keyboard_onoff", + 1, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_INT32, + PROTOBUF_C_OFFSETOF(ECS__StartAns, has_host_keyboard_onoff), + PROTOBUF_C_OFFSETOF(ECS__StartAns, host_keyboard_onoff), + NULL, + NULL, + 0, /* packed */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned ecs__start_ans__field_indices_by_name[] = { + 0, /* field[0] = host_keyboard_onoff */ +}; +static const ProtobufCIntRange ecs__start_ans__number_ranges[1 + 1] = +{ + { 1, 0 }, + { 0, 1 } }; -#define ecs__start_ans__number_ranges NULL const ProtobufCMessageDescriptor ecs__start_ans__descriptor = { PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, @@ -1347,10 +1364,10 @@ const ProtobufCMessageDescriptor ecs__start_ans__descriptor = "ECS__StartAns", "ECS", sizeof(ECS__StartAns), - 0, + 1, ecs__start_ans__field_descriptors, ecs__start_ans__field_indices_by_name, - 0, ecs__start_ans__number_ranges, + 1, ecs__start_ans__number_ranges, (ProtobufCMessageInit) ecs__start_ans__init, NULL,NULL,NULL /* reserved[123] */ }; diff --git a/tizen/src/genmsg/ecs.pb-c.h b/tizen/src/genmsg/ecs.pb-c.h index 7b0888ec4a..48ab98aa0d 100644 --- a/tizen/src/genmsg/ecs.pb-c.h +++ b/tizen/src/genmsg/ecs.pb-c.h @@ -194,10 +194,12 @@ struct _ECS__StartReq struct _ECS__StartAns { ProtobufCMessage base; + protobuf_c_boolean has_host_keyboard_onoff; + int32_t host_keyboard_onoff; }; #define ECS__START_ANS__INIT \ { PROTOBUF_C_MESSAGE_INIT (&ecs__start_ans__descriptor) \ - } + , 0,0 } struct _ECS__Master diff --git a/tizen/src/hw/maru_virtio_evdi.c b/tizen/src/hw/maru_virtio_evdi.c index 44856b62c7..8b919b507d 100644 --- a/tizen/src/hw/maru_virtio_evdi.c +++ b/tizen/src/hw/maru_virtio_evdi.c @@ -224,7 +224,7 @@ static int virtio_evdi_init(VirtIODevice *vdev) vio_evdi = VIRTIO_EVDI(vdev); - virtio_init(vdev, EVDI_DEVICE_NAME, VIRTIO_ID_EVDI, 0); + virtio_init(vdev, TYPE_VIRTIO_EVDI, VIRTIO_ID_EVDI, 0); //EVDI_DEVICE_NAME if (vio_evdi == NULL) { ERR("failed to initialize evdi device\n"); diff --git a/tizen/src/msg/ecs.proto b/tizen/src/msg/ecs.proto index ae9d49b402..4683bdb043 100644 --- a/tizen/src/msg/ecs.proto +++ b/tizen/src/msg/ecs.proto @@ -74,7 +74,7 @@ message StartReq { } message StartAns { - + optional int32 host_keyboard_onoff = 1; } message Master { diff --git a/tizen/src/msg/gen.sh b/tizen/src/msg/gen.sh new file mode 100755 index 0000000000..e73de5d43d --- /dev/null +++ b/tizen/src/msg/gen.sh @@ -0,0 +1,4 @@ +#!/bin/sh + + +protoc-c --c_out=../genmsg ecs.proto -- 2.34.1