Lines Matching refs:rc

22 	int rc;  in transport_dbus_property_update()  local
40 rc = sd_bus_emit_properties_changed_strv(context->bus, in transport_dbus_property_update()
46 return (rc < 0) ? rc : 0; in transport_dbus_property_update()
78 int rc; in transport_dbus_reset() local
85 rc = context->protocol->reset(context); in transport_dbus_reset()
86 if (rc < 0) { in transport_dbus_reset()
87 return rc; in transport_dbus_reset()
90 rc = sd_bus_message_new_method_return(m, &n); in transport_dbus_reset()
91 if (rc < 0) { in transport_dbus_reset()
92 MSG_ERR("sd_bus_message_new_method_return failed: %d\n", rc); in transport_dbus_reset()
93 return rc; in transport_dbus_reset()
96 rc = sd_bus_send(NULL, n, NULL); in transport_dbus_reset()
98 return rc; in transport_dbus_reset()
107 int rc; in transport_dbus_get_info() local
114 rc = sd_bus_message_read_basic(m, 'y', &io.req.api_version); in transport_dbus_get_info()
115 if (rc < 0) { in transport_dbus_get_info()
116 MSG_ERR("DBUS error reading message: %s\n", strerror(-rc)); in transport_dbus_get_info()
117 return rc; in transport_dbus_get_info()
120 rc = context->protocol->get_info(context, &io); in transport_dbus_get_info()
121 if (rc < 0) { in transport_dbus_get_info()
122 return rc; in transport_dbus_get_info()
130 rc = sd_bus_message_new_method_return(m, &n); in transport_dbus_get_info()
131 if (rc < 0) { in transport_dbus_get_info()
132 MSG_ERR("sd_bus_message_new_method_return failed: %d\n", rc); in transport_dbus_get_info()
133 return rc; in transport_dbus_get_info()
139 return rc; in transport_dbus_get_info()
142 rc = sd_bus_message_append(n, "yyq", in transport_dbus_get_info()
146 if (rc < 0) { in transport_dbus_get_info()
148 return rc; in transport_dbus_get_info()
151 rc = sd_bus_send(NULL, n, NULL); in transport_dbus_get_info()
153 return rc; in transport_dbus_get_info()
162 int rc; in transport_dbus_get_flash_info() local
169 rc = context->protocol->get_flash_info(context, &io); in transport_dbus_get_flash_info()
170 if (rc < 0) { in transport_dbus_get_flash_info()
171 return rc; in transport_dbus_get_flash_info()
174 rc = sd_bus_message_new_method_return(m, &n); in transport_dbus_get_flash_info()
175 if (rc < 0) { in transport_dbus_get_flash_info()
176 MSG_ERR("sd_bus_message_new_method_return failed: %d\n", rc); in transport_dbus_get_flash_info()
177 return rc; in transport_dbus_get_flash_info()
180 rc = sd_bus_message_append(n, "qq", in transport_dbus_get_flash_info()
183 if (rc < 0) { in transport_dbus_get_flash_info()
185 return rc; in transport_dbus_get_flash_info()
188 rc = sd_bus_send(NULL, n, NULL); in transport_dbus_get_flash_info()
190 return rc; in transport_dbus_get_flash_info()
200 int rc; in transport_dbus_create_window() local
207 rc = sd_bus_message_read(m, "qq", &io.req.offset, &io.req.size); in transport_dbus_create_window()
208 if (rc < 0) { in transport_dbus_create_window()
209 MSG_ERR("DBUS error reading message: %s\n", strerror(-rc)); in transport_dbus_create_window()
210 return rc; in transport_dbus_create_window()
214 rc = context->protocol->create_window(context, &io); in transport_dbus_create_window()
215 if (rc < 0) { in transport_dbus_create_window()
216 return rc; in transport_dbus_create_window()
219 rc = sd_bus_message_new_method_return(m, &n); in transport_dbus_create_window()
220 if (rc < 0) { in transport_dbus_create_window()
221 MSG_ERR("sd_bus_message_new_method_return failed: %d\n", rc); in transport_dbus_create_window()
222 return rc; in transport_dbus_create_window()
225 rc = sd_bus_message_append(n, "qqq", in transport_dbus_create_window()
229 if (rc < 0) { in transport_dbus_create_window()
231 return rc; in transport_dbus_create_window()
234 rc = sd_bus_send(NULL, n, NULL); in transport_dbus_create_window()
236 return rc; in transport_dbus_create_window()
261 int rc; in transport_dbus_close_window() local
268 rc = sd_bus_message_read(m, "y", &io.req.flags); in transport_dbus_close_window()
269 if (rc < 0) { in transport_dbus_close_window()
270 MSG_ERR("DBUS error reading message: %s\n", strerror(-rc)); in transport_dbus_close_window()
271 return rc; in transport_dbus_close_window()
274 rc = context->protocol->close(context, &io); in transport_dbus_close_window()
275 if (rc < 0) { in transport_dbus_close_window()
276 return rc; in transport_dbus_close_window()
279 rc = sd_bus_message_new_method_return(m, &n); in transport_dbus_close_window()
280 if (rc < 0) { in transport_dbus_close_window()
281 MSG_ERR("sd_bus_message_new_method_return failed: %d\n", rc); in transport_dbus_close_window()
282 return rc; in transport_dbus_close_window()
285 rc = sd_bus_send(NULL, n, NULL); in transport_dbus_close_window()
287 return rc; in transport_dbus_close_window()
297 int rc; in transport_dbus_mark_dirty() local
304 rc = sd_bus_message_read(m, "qq", &io.req.v2.offset, &io.req.v2.size); in transport_dbus_mark_dirty()
305 if (rc < 0) { in transport_dbus_mark_dirty()
306 MSG_ERR("DBUS error reading message: %s\n", strerror(-rc)); in transport_dbus_mark_dirty()
307 return rc; in transport_dbus_mark_dirty()
310 rc = context->protocol->mark_dirty(context, &io); in transport_dbus_mark_dirty()
311 if (rc < 0) { in transport_dbus_mark_dirty()
312 return rc; in transport_dbus_mark_dirty()
315 rc = sd_bus_message_new_method_return(m, &n); in transport_dbus_mark_dirty()
316 if (rc < 0) { in transport_dbus_mark_dirty()
317 MSG_ERR("sd_bus_message_new_method_return failed: %d\n", rc); in transport_dbus_mark_dirty()
318 return rc; in transport_dbus_mark_dirty()
321 rc = sd_bus_send(NULL, n, NULL); in transport_dbus_mark_dirty()
323 return rc; in transport_dbus_mark_dirty()
331 int rc; in transport_dbus_write_flush() local
338 rc = context->protocol->flush(context, NULL /* No args in v2 */); in transport_dbus_write_flush()
339 if (rc < 0) { in transport_dbus_write_flush()
340 return rc; in transport_dbus_write_flush()
343 rc = sd_bus_message_new_method_return(m, &n); in transport_dbus_write_flush()
344 if (rc < 0) { in transport_dbus_write_flush()
345 MSG_ERR("sd_bus_message_new_method_return failed: %d\n", rc); in transport_dbus_write_flush()
346 return rc; in transport_dbus_write_flush()
349 rc = sd_bus_send(NULL, n, NULL); in transport_dbus_write_flush()
351 return rc; in transport_dbus_write_flush()
360 int rc; in transport_dbus_ack() local
367 rc = sd_bus_message_read_basic(m, 'y', &io.req.flags); in transport_dbus_ack()
368 if (rc < 0) { in transport_dbus_ack()
369 MSG_ERR("DBUS error reading message: %s\n", strerror(-rc)); in transport_dbus_ack()
370 return rc; in transport_dbus_ack()
373 rc = context->protocol->ack(context, &io); in transport_dbus_ack()
374 if (rc < 0) { in transport_dbus_ack()
375 return rc; in transport_dbus_ack()
378 rc = sd_bus_message_new_method_return(m, &n); in transport_dbus_ack()
379 if (rc < 0) { in transport_dbus_ack()
380 MSG_ERR("sd_bus_message_new_method_return failed: %d\n", rc); in transport_dbus_ack()
381 return rc; in transport_dbus_ack()
384 rc = sd_bus_send(NULL, n, NULL); in transport_dbus_ack()
386 return rc; in transport_dbus_ack()
395 int rc; in transport_dbus_erase() local
402 rc = sd_bus_message_read(m, "qq", &io.req.offset, &io.req.size); in transport_dbus_erase()
403 if (rc < 0) { in transport_dbus_erase()
404 MSG_ERR("DBUS error reading message: %s\n", strerror(-rc)); in transport_dbus_erase()
405 return rc; in transport_dbus_erase()
408 rc = context->protocol->erase(context, &io); in transport_dbus_erase()
409 if (rc < 0) { in transport_dbus_erase()
410 return rc; in transport_dbus_erase()
413 rc = sd_bus_message_new_method_return(m, &n); in transport_dbus_erase()
414 if (rc < 0) { in transport_dbus_erase()
415 MSG_ERR("sd_bus_message_new_method_return failed: %d\n", rc); in transport_dbus_erase()
416 return rc; in transport_dbus_erase()
419 rc = sd_bus_send(NULL, n, NULL); in transport_dbus_erase()
421 return rc; in transport_dbus_erase()
510 int rc; in transport_dbus_init() local
512 rc = sd_bus_add_object_vtable(context->bus, NULL, in transport_dbus_init()
517 if (rc < 0) { in transport_dbus_init()
518 return rc; in transport_dbus_init()
521 rc = sd_bus_add_object_vtable(context->bus, NULL, in transport_dbus_init()
525 if (rc < 0) { in transport_dbus_init()
526 return rc; in transport_dbus_init()