Rev 3306 | Rev 3462 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3306 | Rev 3447 | ||
---|---|---|---|
Line 131... | Line 131... | ||
131 | int rc; |
131 | int rc; |
132 | ipcarg_t retval; |
132 | ipcarg_t retval; |
133 | 133 | ||
134 | char *pa; |
134 | char *pa; |
135 | size_t pa_len; |
135 | size_t pa_len; |
- | 136 | task_id_t task_id; |
|
136 | 137 | ||
137 | pa = absolutize(path, &pa_len); |
138 | pa = absolutize(path, &pa_len); |
138 | if (!pa) |
139 | if (!pa) |
139 | return 0; |
140 | return 0; |
140 | 141 | ||
Line 149... | Line 150... | ||
149 | */ |
150 | */ |
150 | rc = async_req_0_0(phone_id, LOADER_HELLO); |
151 | rc = async_req_0_0(phone_id, LOADER_HELLO); |
151 | if (rc != EOK) |
152 | if (rc != EOK) |
152 | return 0; |
153 | return 0; |
153 | 154 | ||
- | 155 | /* Get task ID. */ |
|
- | 156 | req = async_send_0(phone_id, LOADER_GET_TASKID, &answer); |
|
- | 157 | rc = ipc_data_read_start(phone_id, &task_id, sizeof(task_id)); |
|
- | 158 | if (rc != EOK) { |
|
- | 159 | async_wait_for(req, NULL); |
|
- | 160 | goto error; |
|
- | 161 | } |
|
- | 162 | ||
- | 163 | async_wait_for(req, &retval); |
|
- | 164 | if (retval != EOK) |
|
- | 165 | goto error; |
|
- | 166 | ||
154 | /* Send program pathname */ |
167 | /* Send program pathname */ |
155 | req = async_send_0(phone_id, LOADER_SET_PATHNAME, &answer); |
168 | req = async_send_0(phone_id, LOADER_SET_PATHNAME, &answer); |
156 | rc = ipc_data_write_start(phone_id, (void *)pa, pa_len); |
169 | rc = ipc_data_write_start(phone_id, (void *)pa, pa_len); |
157 | if (rc != EOK) { |
170 | if (rc != EOK) { |
158 | async_wait_for(req, NULL); |
171 | async_wait_for(req, NULL); |
Line 173... | Line 186... | ||
173 | if (rc != EOK) |
186 | if (rc != EOK) |
174 | goto error; |
187 | goto error; |
175 | 188 | ||
176 | /* Success */ |
189 | /* Success */ |
177 | ipc_hangup(phone_id); |
190 | ipc_hangup(phone_id); |
178 | return 1; |
191 | return task_id; |
179 | 192 | ||
180 | /* Error exit */ |
193 | /* Error exit */ |
181 | error: |
194 | error: |
182 | ipc_hangup(phone_id); |
195 | ipc_hangup(phone_id); |
183 | return 0; |
196 | return 0; |