Lines Matching refs:ret

21 	int ret;  in state_ensure_space()  local
34 ret = fdt_open_into(blob, buf, size); in state_ensure_space()
35 if (ret) { in state_ensure_space()
48 int ret; in state_read_file() local
51 ret = os_get_filesize(fname, &size); in state_read_file()
52 if (ret < 0) { in state_read_file()
64 ret = -EPERM; in state_read_file()
69 ret = -EIO; in state_read_file()
81 return ret; in state_read_file()
103 int ret; in sandbox_read_state_nodes() local
116 ret = io->read(blob, node); in sandbox_read_state_nodes()
117 if (ret) { in sandbox_read_state_nodes()
130 ret = io->read(NULL, -1); in sandbox_read_state_nodes()
131 if (ret) { in sandbox_read_state_nodes()
146 int ret; in sandbox_read_state() local
149 ret = state_read_file(state, fname); in sandbox_read_state()
150 if (ret == -ENOENT && state->ignore_missing_state_on_read) in sandbox_read_state()
151 ret = 0; in sandbox_read_state()
152 if (ret) in sandbox_read_state()
153 return ret; in sandbox_read_state()
161 ret = sandbox_read_state_nodes(state, io, blob); in sandbox_read_state()
162 if (ret < 0) in sandbox_read_state()
193 int ret; in sandbox_write_state_node() local
198 ret = state_ensure_space(SANDBOX_STATE_MIN_SPACE); in sandbox_write_state_node()
199 if (ret) { in sandbox_write_state_node()
225 ret = io->write(blob, node); in sandbox_write_state_node()
226 if (ret) { in sandbox_write_state_node()
239 int ret; in sandbox_write_state() local
250 ret = fdt_create_empty_tree(state->state_fdt, size); in sandbox_write_state()
251 if (ret < 0) { in sandbox_write_state()
253 fdt_strerror(ret)); in sandbox_write_state()
254 ret = -EIO; in sandbox_write_state()
262 ret = 0; in sandbox_write_state()
264 ret = sandbox_write_state_node(state, io); in sandbox_write_state()
265 if (ret == -EIO) in sandbox_write_state()
267 else if (ret) in sandbox_write_state()
271 if (ret == -EIO) { in sandbox_write_state()
276 ret = fdt_pack(state->state_fdt); in sandbox_write_state()
277 if (ret < 0) { in sandbox_write_state()
278 printf("Cannot pack state FDT: %s\n", fdt_strerror(ret)); in sandbox_write_state()
279 ret = -EINVAL; in sandbox_write_state()
286 ret = -EIO; in sandbox_write_state()
291 ret = -EIO; in sandbox_write_state()
305 return ret; in sandbox_write_state()
312 int ret; in state_setprop() local
317 ret = state_ensure_space(size - len + strlen(prop_name) + 32); in state_setprop()
318 if (ret) in state_setprop()
319 return ret; in state_setprop()
323 ret = fdt_setprop(blob, node, prop_name, data, size); in state_setprop()
324 if (ret) { in state_setprop()
327 fdt_strerror(ret)); in state_setprop()