Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | bace3d0 | 2011-10-03 19:26:45 +0000 | [diff] [blame] | 2 | /* |
Simon Glass | 6fb6207 | 2012-02-15 15:51:15 -0800 | [diff] [blame] | 3 | * Copyright (c) 2011-2012 The Chromium OS Authors. |
Simon Glass | bace3d0 | 2011-10-03 19:26:45 +0000 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
Simon Glass | 3806882 | 2015-05-04 11:31:08 -0600 | [diff] [blame] | 7 | #include <errno.h> |
Simon Glass | 5c2859c | 2013-11-10 10:27:03 -0700 | [diff] [blame] | 8 | #include <os.h> |
Rabin Vincent | 7dbcb76 | 2014-10-29 23:21:38 +0100 | [diff] [blame] | 9 | #include <cli.h> |
Simon Glass | 1f32ae9 | 2015-01-19 20:21:34 -0700 | [diff] [blame] | 10 | #include <malloc.h> |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 11 | #include <asm/getopt.h> |
Simon Glass | 4d94dfa | 2014-07-10 22:23:27 -0600 | [diff] [blame] | 12 | #include <asm/io.h> |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 13 | #include <asm/sections.h> |
Simon Glass | 6fb6207 | 2012-02-15 15:51:15 -0800 | [diff] [blame] | 14 | #include <asm/state.h> |
Simon Glass | bace3d0 | 2011-10-03 19:26:45 +0000 | [diff] [blame] | 15 | |
Simon Glass | 808434c | 2013-11-10 10:26:59 -0700 | [diff] [blame] | 16 | DECLARE_GLOBAL_DATA_PTR; |
| 17 | |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 18 | int sandbox_early_getopt_check(void) |
| 19 | { |
| 20 | struct sandbox_state *state = state_get_current(); |
Simon Glass | 7b3efc6 | 2013-12-03 16:43:23 -0700 | [diff] [blame] | 21 | struct sandbox_cmdline_option **sb_opt = __u_boot_sandbox_option_start; |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 22 | size_t num_options = __u_boot_sandbox_option_count(); |
| 23 | size_t i; |
| 24 | int max_arg_len, max_noarg_len; |
| 25 | |
| 26 | /* parse_err will be a string of the faulting option */ |
| 27 | if (!state->parse_err) |
| 28 | return 0; |
| 29 | |
| 30 | if (strcmp(state->parse_err, "help")) { |
| 31 | printf("u-boot: error: failed while parsing option: %s\n" |
| 32 | "\ttry running with --help for more information.\n", |
| 33 | state->parse_err); |
| 34 | os_exit(1); |
| 35 | } |
| 36 | |
| 37 | printf( |
| 38 | "u-boot, a command line test interface to U-Boot\n\n" |
| 39 | "Usage: u-boot [options]\n" |
| 40 | "Options:\n"); |
| 41 | |
| 42 | max_arg_len = 0; |
| 43 | for (i = 0; i < num_options; ++i) |
Masahiro Yamada | b414119 | 2014-11-07 03:03:31 +0900 | [diff] [blame] | 44 | max_arg_len = max((int)strlen(sb_opt[i]->flag), max_arg_len); |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 45 | max_noarg_len = max_arg_len + 7; |
| 46 | |
| 47 | for (i = 0; i < num_options; ++i) { |
Simon Glass | 7b3efc6 | 2013-12-03 16:43:23 -0700 | [diff] [blame] | 48 | struct sandbox_cmdline_option *opt = sb_opt[i]; |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 49 | |
| 50 | /* first output the short flag if it has one */ |
| 51 | if (opt->flag_short >= 0x100) |
| 52 | printf(" "); |
| 53 | else |
| 54 | printf(" -%c, ", opt->flag_short); |
| 55 | |
| 56 | /* then the long flag */ |
| 57 | if (opt->has_arg) |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 58 | printf("--%-*s <arg> ", max_arg_len, opt->flag); |
Simon Glass | 6ebcab8 | 2013-11-10 10:26:58 -0700 | [diff] [blame] | 59 | else |
| 60 | printf("--%-*s", max_noarg_len, opt->flag); |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 61 | |
| 62 | /* finally the help text */ |
| 63 | printf(" %s\n", opt->help); |
| 64 | } |
| 65 | |
| 66 | os_exit(0); |
| 67 | } |
| 68 | |
Simon Glass | 6896977 | 2017-03-28 10:27:28 -0600 | [diff] [blame] | 69 | int misc_init_f(void) |
| 70 | { |
| 71 | return sandbox_early_getopt_check(); |
| 72 | } |
| 73 | |
Simon Glass | 7b3efc6 | 2013-12-03 16:43:23 -0700 | [diff] [blame] | 74 | static int sandbox_cmdline_cb_help(struct sandbox_state *state, const char *arg) |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 75 | { |
| 76 | /* just flag to sandbox_early_getopt_check to show usage */ |
| 77 | return 1; |
| 78 | } |
Simon Glass | 7b3efc6 | 2013-12-03 16:43:23 -0700 | [diff] [blame] | 79 | SANDBOX_CMDLINE_OPT_SHORT(help, 'h', 0, "Display help"); |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 80 | |
Simon Glass | d0d0746 | 2016-07-04 11:57:50 -0600 | [diff] [blame] | 81 | #ifndef CONFIG_SPL_BUILD |
Simon Glass | ab4e07e | 2012-02-26 17:38:50 -0500 | [diff] [blame] | 82 | int sandbox_main_loop_init(void) |
| 83 | { |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 84 | struct sandbox_state *state = state_get_current(); |
| 85 | |
| 86 | /* Execute command if required */ |
Sjoerd Simons | ebaa832 | 2015-04-30 22:16:09 +0200 | [diff] [blame] | 87 | if (state->cmd || state->run_distro_boot) { |
| 88 | int retval = 0; |
Joe Hershberger | 88539e4 | 2015-02-06 15:37:31 -0600 | [diff] [blame] | 89 | |
Rabin Vincent | 7dbcb76 | 2014-10-29 23:21:38 +0100 | [diff] [blame] | 90 | cli_init(); |
| 91 | |
Simon Glass | 2b6793d | 2016-03-13 19:07:30 -0600 | [diff] [blame] | 92 | #ifdef CONFIG_CMDLINE |
Sjoerd Simons | ebaa832 | 2015-04-30 22:16:09 +0200 | [diff] [blame] | 93 | if (state->cmd) |
| 94 | retval = run_command_list(state->cmd, -1, 0); |
| 95 | |
| 96 | if (state->run_distro_boot) |
| 97 | retval = cli_simple_run_command("run distro_bootcmd", |
| 98 | 0); |
Simon Glass | 2b6793d | 2016-03-13 19:07:30 -0600 | [diff] [blame] | 99 | #endif |
Simon Glass | c5a62d4 | 2013-11-10 10:27:02 -0700 | [diff] [blame] | 100 | if (!state->interactive) |
Joe Hershberger | 88539e4 | 2015-02-06 15:37:31 -0600 | [diff] [blame] | 101 | os_exit(retval); |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 102 | } |
| 103 | |
Simon Glass | ab4e07e | 2012-02-26 17:38:50 -0500 | [diff] [blame] | 104 | return 0; |
| 105 | } |
Simon Glass | d0d0746 | 2016-07-04 11:57:50 -0600 | [diff] [blame] | 106 | #endif |
Simon Glass | ab4e07e | 2012-02-26 17:38:50 -0500 | [diff] [blame] | 107 | |
Sjoerd Simons | ebaa832 | 2015-04-30 22:16:09 +0200 | [diff] [blame] | 108 | static int sandbox_cmdline_cb_boot(struct sandbox_state *state, |
| 109 | const char *arg) |
| 110 | { |
| 111 | state->run_distro_boot = true; |
| 112 | return 0; |
| 113 | } |
| 114 | SANDBOX_CMDLINE_OPT_SHORT(boot, 'b', 0, "Run distro boot commands"); |
| 115 | |
Simon Glass | 7b3efc6 | 2013-12-03 16:43:23 -0700 | [diff] [blame] | 116 | static int sandbox_cmdline_cb_command(struct sandbox_state *state, |
| 117 | const char *arg) |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 118 | { |
| 119 | state->cmd = arg; |
| 120 | return 0; |
| 121 | } |
Simon Glass | 7b3efc6 | 2013-12-03 16:43:23 -0700 | [diff] [blame] | 122 | SANDBOX_CMDLINE_OPT_SHORT(command, 'c', 1, "Execute U-Boot command"); |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 123 | |
Simon Glass | 7b3efc6 | 2013-12-03 16:43:23 -0700 | [diff] [blame] | 124 | static int sandbox_cmdline_cb_fdt(struct sandbox_state *state, const char *arg) |
Simon Glass | f828bf2 | 2013-04-20 08:42:41 +0000 | [diff] [blame] | 125 | { |
| 126 | state->fdt_fname = arg; |
| 127 | return 0; |
| 128 | } |
Simon Glass | 7b3efc6 | 2013-12-03 16:43:23 -0700 | [diff] [blame] | 129 | SANDBOX_CMDLINE_OPT_SHORT(fdt, 'd', 1, "Specify U-Boot's control FDT"); |
Simon Glass | f828bf2 | 2013-04-20 08:42:41 +0000 | [diff] [blame] | 130 | |
Simon Glass | 1f32ae9 | 2015-01-19 20:21:34 -0700 | [diff] [blame] | 131 | static int sandbox_cmdline_cb_default_fdt(struct sandbox_state *state, |
| 132 | const char *arg) |
| 133 | { |
| 134 | const char *fmt = "%s.dtb"; |
| 135 | char *fname; |
| 136 | int len; |
| 137 | |
| 138 | len = strlen(state->argv[0]) + strlen(fmt) + 1; |
| 139 | fname = os_malloc(len); |
| 140 | if (!fname) |
| 141 | return -ENOMEM; |
| 142 | snprintf(fname, len, fmt, state->argv[0]); |
| 143 | state->fdt_fname = fname; |
| 144 | |
| 145 | return 0; |
| 146 | } |
| 147 | SANDBOX_CMDLINE_OPT_SHORT(default_fdt, 'D', 0, |
| 148 | "Use the default u-boot.dtb control FDT in U-Boot directory"); |
| 149 | |
Simon Glass | c5a62d4 | 2013-11-10 10:27:02 -0700 | [diff] [blame] | 150 | static int sandbox_cmdline_cb_interactive(struct sandbox_state *state, |
| 151 | const char *arg) |
| 152 | { |
| 153 | state->interactive = true; |
| 154 | return 0; |
| 155 | } |
| 156 | |
| 157 | SANDBOX_CMDLINE_OPT_SHORT(interactive, 'i', 0, "Enter interactive mode"); |
| 158 | |
Simon Glass | bda7773 | 2014-02-27 13:26:16 -0700 | [diff] [blame] | 159 | static int sandbox_cmdline_cb_jump(struct sandbox_state *state, |
| 160 | const char *arg) |
| 161 | { |
Simon Glass | ab839dc | 2014-02-27 13:26:23 -0700 | [diff] [blame] | 162 | /* Remember to delete this U-Boot image later */ |
| 163 | state->jumped_fname = arg; |
Simon Glass | bda7773 | 2014-02-27 13:26:16 -0700 | [diff] [blame] | 164 | |
| 165 | return 0; |
| 166 | } |
| 167 | SANDBOX_CMDLINE_OPT_SHORT(jump, 'j', 1, "Jumped from previous U-Boot"); |
| 168 | |
Simon Glass | 5c2859c | 2013-11-10 10:27:03 -0700 | [diff] [blame] | 169 | static int sandbox_cmdline_cb_memory(struct sandbox_state *state, |
| 170 | const char *arg) |
| 171 | { |
| 172 | int err; |
| 173 | |
| 174 | /* For now assume we always want to write it */ |
| 175 | state->write_ram_buf = true; |
| 176 | state->ram_buf_fname = arg; |
| 177 | |
Simon Glass | f80a8bb | 2014-11-11 12:47:08 -0700 | [diff] [blame] | 178 | err = os_read_ram_buf(arg); |
| 179 | if (err) { |
Simon Glass | 1c5a81d | 2018-10-01 11:55:12 -0600 | [diff] [blame] | 180 | printf("Failed to read RAM buffer '%s': %d\n", arg, err); |
Simon Glass | 5c2859c | 2013-11-10 10:27:03 -0700 | [diff] [blame] | 181 | return err; |
| 182 | } |
Simon Glass | a65d1a0 | 2018-11-23 21:29:29 -0700 | [diff] [blame] | 183 | state->ram_buf_read = true; |
Simon Glass | 5c2859c | 2013-11-10 10:27:03 -0700 | [diff] [blame] | 184 | |
| 185 | return 0; |
| 186 | } |
| 187 | SANDBOX_CMDLINE_OPT_SHORT(memory, 'm', 1, |
| 188 | "Read/write ram_buf memory contents from file"); |
| 189 | |
Simon Glass | ab839dc | 2014-02-27 13:26:23 -0700 | [diff] [blame] | 190 | static int sandbox_cmdline_cb_rm_memory(struct sandbox_state *state, |
| 191 | const char *arg) |
| 192 | { |
| 193 | state->ram_buf_rm = true; |
| 194 | |
| 195 | return 0; |
| 196 | } |
| 197 | SANDBOX_CMDLINE_OPT(rm_memory, 0, "Remove memory file after reading"); |
| 198 | |
Simon Glass | 1209e27 | 2013-11-10 10:27:04 -0700 | [diff] [blame] | 199 | static int sandbox_cmdline_cb_state(struct sandbox_state *state, |
| 200 | const char *arg) |
| 201 | { |
| 202 | state->state_fname = arg; |
| 203 | return 0; |
| 204 | } |
| 205 | SANDBOX_CMDLINE_OPT_SHORT(state, 's', 1, "Specify the sandbox state FDT"); |
| 206 | |
| 207 | static int sandbox_cmdline_cb_read(struct sandbox_state *state, |
| 208 | const char *arg) |
| 209 | { |
| 210 | state->read_state = true; |
| 211 | return 0; |
| 212 | } |
| 213 | SANDBOX_CMDLINE_OPT_SHORT(read, 'r', 0, "Read the state FDT on startup"); |
| 214 | |
| 215 | static int sandbox_cmdline_cb_write(struct sandbox_state *state, |
| 216 | const char *arg) |
| 217 | { |
| 218 | state->write_state = true; |
| 219 | return 0; |
| 220 | } |
| 221 | SANDBOX_CMDLINE_OPT_SHORT(write, 'w', 0, "Write state FDT on exit"); |
| 222 | |
| 223 | static int sandbox_cmdline_cb_ignore_missing(struct sandbox_state *state, |
| 224 | const char *arg) |
| 225 | { |
| 226 | state->ignore_missing_state_on_read = true; |
| 227 | return 0; |
| 228 | } |
| 229 | SANDBOX_CMDLINE_OPT_SHORT(ignore_missing, 'n', 0, |
| 230 | "Ignore missing state on read"); |
| 231 | |
Simon Glass | 7d95f2a | 2014-02-27 13:26:19 -0700 | [diff] [blame] | 232 | static int sandbox_cmdline_cb_show_lcd(struct sandbox_state *state, |
| 233 | const char *arg) |
| 234 | { |
| 235 | state->show_lcd = true; |
| 236 | return 0; |
| 237 | } |
| 238 | SANDBOX_CMDLINE_OPT_SHORT(show_lcd, 'l', 0, |
| 239 | "Show the sandbox LCD display"); |
| 240 | |
Simon Glass | ffb8790 | 2014-02-27 13:26:22 -0700 | [diff] [blame] | 241 | static const char *term_args[STATE_TERM_COUNT] = { |
| 242 | "raw-with-sigs", |
| 243 | "raw", |
| 244 | "cooked", |
| 245 | }; |
| 246 | |
| 247 | static int sandbox_cmdline_cb_terminal(struct sandbox_state *state, |
| 248 | const char *arg) |
| 249 | { |
| 250 | int i; |
| 251 | |
| 252 | for (i = 0; i < STATE_TERM_COUNT; i++) { |
| 253 | if (!strcmp(arg, term_args[i])) { |
| 254 | state->term_raw = i; |
| 255 | return 0; |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | printf("Unknown terminal setting '%s' (", arg); |
| 260 | for (i = 0; i < STATE_TERM_COUNT; i++) |
| 261 | printf("%s%s", i ? ", " : "", term_args[i]); |
| 262 | puts(")\n"); |
| 263 | |
| 264 | return 1; |
| 265 | } |
| 266 | SANDBOX_CMDLINE_OPT_SHORT(terminal, 't', 1, |
| 267 | "Set terminal to raw/cooked mode"); |
| 268 | |
Simon Glass | 9ce8b40 | 2015-11-08 23:47:50 -0700 | [diff] [blame] | 269 | static int sandbox_cmdline_cb_verbose(struct sandbox_state *state, |
| 270 | const char *arg) |
| 271 | { |
| 272 | state->show_test_output = true; |
| 273 | return 0; |
| 274 | } |
| 275 | SANDBOX_CMDLINE_OPT_SHORT(verbose, 'v', 0, "Show test output"); |
| 276 | |
Simon Glass | 2b1dc29 | 2018-10-01 11:55:11 -0600 | [diff] [blame] | 277 | static int sandbox_cmdline_cb_log_level(struct sandbox_state *state, |
| 278 | const char *arg) |
| 279 | { |
| 280 | state->default_log_level = simple_strtol(arg, NULL, 10); |
| 281 | |
| 282 | return 0; |
| 283 | } |
| 284 | SANDBOX_CMDLINE_OPT_SHORT(log_level, 'L', 1, |
| 285 | "Set log level (0=panic, 7=debug)"); |
| 286 | |
Simon Glass | 1ca910b | 2018-11-15 18:44:01 -0700 | [diff] [blame] | 287 | static int sandbox_cmdline_cb_show_of_platdata(struct sandbox_state *state, |
| 288 | const char *arg) |
| 289 | { |
| 290 | state->show_of_platdata = true; |
| 291 | |
| 292 | return 0; |
| 293 | } |
| 294 | SANDBOX_CMDLINE_OPT(show_of_platdata, 0, "Show of-platdata in SPL"); |
| 295 | |
Simon Glass | 2b6793d | 2016-03-13 19:07:30 -0600 | [diff] [blame] | 296 | int board_run_command(const char *cmdline) |
| 297 | { |
| 298 | printf("## Commands are disabled. Please enable CONFIG_CMDLINE.\n"); |
| 299 | |
| 300 | return 1; |
| 301 | } |
| 302 | |
Simon Glass | bb96724 | 2017-03-28 10:27:16 -0600 | [diff] [blame] | 303 | static void setup_ram_buf(struct sandbox_state *state) |
| 304 | { |
Simon Glass | a65d1a0 | 2018-11-23 21:29:29 -0700 | [diff] [blame] | 305 | /* Zero the RAM buffer if we didn't read it, to keep valgrind happy */ |
| 306 | if (!state->ram_buf_read) { |
| 307 | memset(state->ram_buf, '\0', state->ram_size); |
| 308 | printf("clear %p %x\n", state->ram_buf, state->ram_size); |
| 309 | } |
| 310 | |
Simon Glass | bb96724 | 2017-03-28 10:27:16 -0600 | [diff] [blame] | 311 | gd->arch.ram_buf = state->ram_buf; |
| 312 | gd->ram_size = state->ram_size; |
| 313 | } |
| 314 | |
Simon Glass | d66ddaf | 2018-11-15 18:44:03 -0700 | [diff] [blame] | 315 | void state_show(struct sandbox_state *state) |
| 316 | { |
| 317 | char **p; |
| 318 | |
| 319 | printf("Arguments:\n"); |
| 320 | for (p = state->argv; *p; p++) |
| 321 | printf("%s ", *p); |
| 322 | printf("\n"); |
| 323 | } |
| 324 | |
Simon Glass | bace3d0 | 2011-10-03 19:26:45 +0000 | [diff] [blame] | 325 | int main(int argc, char *argv[]) |
| 326 | { |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 327 | struct sandbox_state *state; |
Simon Glass | 4d94dfa | 2014-07-10 22:23:27 -0600 | [diff] [blame] | 328 | gd_t data; |
Simon Glass | 1209e27 | 2013-11-10 10:27:04 -0700 | [diff] [blame] | 329 | int ret; |
Simon Glass | 6fb6207 | 2012-02-15 15:51:15 -0800 | [diff] [blame] | 330 | |
Simon Glass | 1209e27 | 2013-11-10 10:27:04 -0700 | [diff] [blame] | 331 | ret = state_init(); |
| 332 | if (ret) |
| 333 | goto err; |
Simon Glass | 6fb6207 | 2012-02-15 15:51:15 -0800 | [diff] [blame] | 334 | |
Simon Glass | 70db421 | 2012-02-15 15:51:16 -0800 | [diff] [blame] | 335 | state = state_get_current(); |
| 336 | if (os_parse_args(state, argc, argv)) |
| 337 | return 1; |
| 338 | |
Simon Glass | 1209e27 | 2013-11-10 10:27:04 -0700 | [diff] [blame] | 339 | ret = sandbox_read_state(state, state->state_fname); |
| 340 | if (ret) |
| 341 | goto err; |
| 342 | |
Simon Glass | 4d94dfa | 2014-07-10 22:23:27 -0600 | [diff] [blame] | 343 | memset(&data, '\0', sizeof(data)); |
| 344 | gd = &data; |
Andy Yan | 1fc50d7 | 2017-07-24 17:49:59 +0800 | [diff] [blame] | 345 | #if CONFIG_VAL(SYS_MALLOC_F_LEN) |
Simon Glass | 29afe9e | 2014-07-10 22:23:31 -0600 | [diff] [blame] | 346 | gd->malloc_base = CONFIG_MALLOC_F_ADDR; |
| 347 | #endif |
Simon Glass | 2b1dc29 | 2018-10-01 11:55:11 -0600 | [diff] [blame] | 348 | #if CONFIG_IS_ENABLED(LOG) |
| 349 | gd->default_log_level = state->default_log_level; |
| 350 | #endif |
Simon Glass | bb96724 | 2017-03-28 10:27:16 -0600 | [diff] [blame] | 351 | setup_ram_buf(state); |
Simon Glass | 4d94dfa | 2014-07-10 22:23:27 -0600 | [diff] [blame] | 352 | |
Simon Glass | 808434c | 2013-11-10 10:26:59 -0700 | [diff] [blame] | 353 | /* Do pre- and post-relocation init */ |
Simon Glass | bace3d0 | 2011-10-03 19:26:45 +0000 | [diff] [blame] | 354 | board_init_f(0); |
Allen Martin | 8ec21bb | 2013-01-22 13:11:21 +0000 | [diff] [blame] | 355 | |
Simon Glass | 808434c | 2013-11-10 10:26:59 -0700 | [diff] [blame] | 356 | board_init_r(gd->new_gd, 0); |
| 357 | |
| 358 | /* NOTREACHED - board_init_r() does not return */ |
Allen Martin | 8ec21bb | 2013-01-22 13:11:21 +0000 | [diff] [blame] | 359 | return 0; |
Simon Glass | 1209e27 | 2013-11-10 10:27:04 -0700 | [diff] [blame] | 360 | |
| 361 | err: |
| 362 | printf("Error %d\n", ret); |
| 363 | return 1; |
Simon Glass | bace3d0 | 2011-10-03 19:26:45 +0000 | [diff] [blame] | 364 | } |