Changeset aeb3037 in mainline for uspace/lib/display/src/disp_srv.c
- Timestamp:
- 2020-03-18T17:27:18Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0680854
- Parents:
- 1a1271d
- git-author:
- Jiri Svoboda <jiri@…> (2020-03-18 16:57:15)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-03-18 17:27:18)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/display/src/disp_srv.c
r1a1271d raeb3037 37 37 #include <disp_srv.h> 38 38 #include <display/event.h> 39 #include <display/info.h> 39 40 #include <display/wndresize.h> 40 41 #include <errno.h> … … 268 269 } 269 270 271 static void display_get_info_srv(display_srv_t *srv, ipc_call_t *icall) 272 { 273 display_info_t info; 274 ipc_call_t call; 275 size_t size; 276 errno_t rc; 277 278 if (srv->ops->get_info == NULL) { 279 async_answer_0(icall, ENOTSUP); 280 return; 281 } 282 283 /* Transfer information */ 284 if (!async_data_read_receive(&call, &size)) { 285 async_answer_0(icall, EREFUSED); 286 return; 287 } 288 289 if (size != sizeof(info)) { 290 async_answer_0(icall, EREFUSED); 291 async_answer_0(&call, EREFUSED); 292 return; 293 } 294 295 rc = srv->ops->get_info(srv->arg, &info); 296 if (rc != EOK) { 297 async_answer_0(icall, rc); 298 async_answer_0(&call, rc); 299 return; 300 } 301 302 rc = async_data_read_finalize(&call, &info, sizeof(info)); 303 if (rc != EOK) { 304 async_answer_0(icall, rc); 305 async_answer_0(&call, rc); 306 return; 307 } 308 309 async_answer_0(icall, EOK); 310 } 311 270 312 void display_conn(ipc_call_t *icall, display_srv_t *srv) 271 313 { … … 306 348 case DISPLAY_GET_EVENT: 307 349 display_get_event_srv(srv, &call); 350 break; 351 case DISPLAY_GET_INFO: 352 display_get_info_srv(srv, &call); 308 353 break; 309 354 default:
Note:
See TracChangeset
for help on using the changeset viewer.