Lines Matching refs:ret
46 int ret; in script_fill_info() local
50 ret = image_locate_script(bflow->buf, bflow->size, NULL, NULL, &data, &len); in script_fill_info()
51 if (!ret) { in script_fill_info()
71 int ret, i; in script_read_bootflow_file() local
73 ret = uclass_first_device_err(UCLASS_BOOTSTD, &bootstd); in script_read_bootflow_file()
74 if (ret) in script_read_bootflow_file()
75 return log_msg_ret("std", ret); in script_read_bootflow_file()
89 ret = bootmeth_try_file(bflow, desc, prefix, SCRIPT_FNAME1); in script_read_bootflow_file()
90 if (ret) in script_read_bootflow_file()
91 ret = bootmeth_try_file(bflow, desc, prefix, in script_read_bootflow_file()
93 } while (ret && prefixes && prefixes[++i]); in script_read_bootflow_file()
94 if (ret) in script_read_bootflow_file()
95 return log_msg_ret("try", ret); in script_read_bootflow_file()
101 ret = bootmeth_alloc_file(bflow, 0x10000, ARCH_DMA_MINALIGN, in script_read_bootflow_file()
103 if (ret) in script_read_bootflow_file()
104 return log_msg_ret("read", ret); in script_read_bootflow_file()
106 ret = script_fill_info(bflow); in script_read_bootflow_file()
107 if (ret) in script_read_bootflow_file()
108 return log_msg_ret("inf", ret); in script_read_bootflow_file()
110 ret = bootmeth_alloc_other(bflow, "boot.bmp", BFI_LOGO, in script_read_bootflow_file()
120 int size, ret; in script_read_bootflow_net() local
132 ret = dhcp_run(addr, fname, true); in script_read_bootflow_net()
133 if (ret) in script_read_bootflow_net()
134 return log_msg_ret("dhc", ret); in script_read_bootflow_net()
155 int ret; in script_read_bootflow() local
157 ret = uclass_first_device_err(UCLASS_BOOTSTD, &bootstd); in script_read_bootflow()
158 if (ret) in script_read_bootflow()
159 return log_msg_ret("std", ret); in script_read_bootflow()
164 ret = script_read_bootflow_net(bflow); in script_read_bootflow()
165 if (ret) in script_read_bootflow()
166 return log_msg_ret("net", ret); in script_read_bootflow()
168 ret = script_read_bootflow_file(bootstd, bflow); in script_read_bootflow()
169 if (ret) in script_read_bootflow()
170 return log_msg_ret("blk", ret); in script_read_bootflow()
191 int ret = 0; in script_boot() local
196 ret = env_set("devtype", "usb"); in script_boot()
204 ret = env_set("devtype", "sata"); in script_boot()
206 ret = env_set("devtype", blk_get_devtype(bflow->blk)); in script_boot()
208 if (!ret) in script_boot()
209 ret = env_set_hex("devnum", desc->devnum); in script_boot()
210 if (!ret) in script_boot()
211 ret = env_set_hex("distro_bootpart", bflow->part); in script_boot()
212 if (!ret) in script_boot()
213 ret = env_set("prefix", bflow->subdir); in script_boot()
214 if (!ret && IS_ENABLED(CONFIG_ARCH_SUNXI) && in script_boot()
216 ret = env_set_hex("mmc_bootdev", desc->devnum); in script_boot()
220 ret = env_set("devtype", in script_boot()
222 if (!ret) in script_boot()
223 ret = env_set_hex("devnum", dev_seq(media)); in script_boot()
225 if (ret) in script_boot()
226 return log_msg_ret("env", ret); in script_boot()
235 ret = cmd_source_script(addr, NULL, NULL); in script_boot()
236 if (ret) in script_boot()
237 return log_msg_ret("boot", ret); in script_boot()