Changeset 8d74fdd in mainline for uspace/srv/sysman/connection_ctl.c
- Timestamp:
- 2019-08-17T13:57:05Z (6 years ago)
- Children:
- f92b315
- Parents:
- be07995
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2016-01-27 00:01:13)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-17 13:57:05)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/connection_ctl.c
rbe07995 r8d74fdd 36 36 #include "connection_ctl.h" 37 37 #include "job.h" 38 #include "job_closure.h" 38 39 #include "log.h" 40 #include "shutdown.h" 39 41 #include "sysman.h" 40 42 … … 114 116 115 117 if (!(flags & IPC_FLAG_BLOCKING)) { 116 retval = sysman_run_job(unit, STATE_STARTED, NULL, NULL);118 retval = sysman_run_job(unit, STATE_STARTED, 0, NULL, NULL); 117 119 goto answer; 118 120 } … … 123 125 goto answer; 124 126 } 125 retval = sysman_run_job(unit, STATE_STARTED, &answer_callback,127 retval = sysman_run_job(unit, STATE_STARTED, 0, &answer_callback, 126 128 iid_ptr); 127 129 if (retval != EOK) { … … 154 156 155 157 if (!(flags & IPC_FLAG_BLOCKING)) { 156 retval = sysman_run_job(unit, state, NULL, NULL);158 retval = sysman_run_job(unit, state, 0, NULL, NULL); 157 159 goto answer; 158 160 } … … 163 165 goto answer; 164 166 } 165 retval = sysman_run_job(unit, state, &answer_callback,167 retval = sysman_run_job(unit, state, 0, &answer_callback, 166 168 iid_ptr); 167 169 if (retval != EOK) { … … 278 280 } 279 281 282 static void sysman_shutdown(ipc_callid_t iid, ipc_call_t *icall) 283 { 284 int retval; 285 unit_t *u = repo_find_unit_by_name(TARGET_SHUTDOWN); 286 if (u == NULL) { 287 retval = ENOENT; 288 goto finish; 289 } 290 291 retval = sysman_run_job(u, STATE_STARTED, CLOSURE_ISOLATE, 292 shutdown_cb, NULL); 293 294 finish: 295 async_answer_0(iid, retval); 296 } 297 280 298 void sysman_connection_ctl(ipc_callid_t iid, ipc_call_t *icall) 281 299 { … … 315 333 sysman_unit_get_state(callid, &call); 316 334 break; 335 case SYSMAN_CTL_SHUTDOWN: 336 sysman_shutdown(callid, &call); 337 break; 317 338 default: 318 339 async_answer_0(callid, ENOENT);
Note:
See TracChangeset
for help on using the changeset viewer.