Changes in uspace/srv/hid/display/main.c [ca48672:4c6fd56] in mainline
- File:
-
- 1 edited
-
uspace/srv/hid/display/main.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/main.c
rca48672 r4c6fd56 1 1 /* 2 * Copyright (c) 202 5Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 54 54 #include "display.h" 55 55 #include "dsops.h" 56 #include "ievent.h"57 56 #include "input.h" 58 57 #include "main.h" … … 63 62 #include "wmops.h" 64 63 65 const char *cfg_file_path = "/w/cfg/display.sif";66 67 64 static void display_client_conn(ipc_call_t *, void *); 68 65 static void display_client_ev_pending(void *); … … 126 123 ds_output_t *output = NULL; 127 124 gfx_context_t *gc = NULL; 128 port_id_t port = 0; 125 port_id_t disp_port; 126 port_id_t gc_port; 127 port_id_t wm_port; 128 port_id_t dc_port; 129 129 loc_srv_t *srv = NULL; 130 130 service_id_t sid = 0; … … 137 137 goto error; 138 138 139 rc = ds_display_load_cfg(disp, cfg_file_path); 140 if (rc != EOK) { 141 log_msg(LOG_DEFAULT, LVL_NOTE, 142 "Starting with fresh configuration."); 143 144 /* Create first seat */ 145 rc = ds_seat_create(disp, "Alice", &seat); 146 if (rc != EOK) 147 goto error; 148 } 139 rc = ds_seat_create(disp, "Alice", &seat); 140 if (rc != EOK) 141 goto error; 149 142 150 143 rc = ds_output_create(&output); … … 157 150 goto error; 158 151 159 rc = ds_ievent_init(disp);160 if (rc != EOK)161 goto error;162 163 152 rc = ds_input_open(disp); 164 153 if (rc != EOK) … … 166 155 167 156 rc = async_create_port(INTERFACE_DISPLAY, display_client_conn, disp, 168 &port); 169 if (rc != EOK) 170 goto error; 171 172 rc = async_port_create_interface(port, INTERFACE_GC, display_gc_conn, 173 disp); 174 if (rc != EOK) 175 goto error; 176 177 rc = async_port_create_interface(port, INTERFACE_WNDMGT, 178 display_wndmgt_conn, disp); 179 if (rc != EOK) 180 goto error; 181 182 rc = async_port_create_interface(port, INTERFACE_DISPCFG, 183 display_dispcfg_conn, disp); 157 &disp_port); 158 if (rc != EOK) 159 goto error; 160 161 rc = async_create_port(INTERFACE_GC, display_gc_conn, disp, &gc_port); 162 if (rc != EOK) 163 goto error; 164 165 rc = async_create_port(INTERFACE_WNDMGT, display_wndmgt_conn, disp, 166 &wm_port); 167 if (rc != EOK) 168 goto error; 169 170 rc = async_create_port(INTERFACE_DISPCFG, display_dispcfg_conn, disp, 171 &dc_port); 184 172 if (rc != EOK) 185 173 goto error; … … 192 180 } 193 181 194 rc = loc_service_register(srv, SERVICE_NAME_DISPLAY, port,&sid);182 rc = loc_service_register(srv, SERVICE_NAME_DISPLAY, &sid); 195 183 if (rc != EOK) { 196 184 log_msg(LOG_DEFAULT, LVL_ERROR, "Failed registering service: %s.", str_error(rc)); … … 206 194 if (srv != NULL) 207 195 loc_server_unregister(srv); 208 if (port != 0) 209 async_port_destroy(port); 196 // XXX destroy disp_port 197 // XXX destroy gc_port 198 // XXX destroy wm_port 199 // XXX destroy dc_port 210 200 #if 0 211 201 if (disp->input != NULL) 212 202 ds_input_close(disp); 213 203 #endif 214 ds_ievent_fini(disp);215 204 if (output != NULL) 216 205 ds_output_destroy(output);
Note:
See TracChangeset
for help on using the changeset viewer.
