Lines Matching refs:result

78 	int result;  in cmd_erase()  local
81 result = parse_helper(sh, &argc, &argv, &flash_dev, &page_addr); in cmd_erase()
82 if (result) { in cmd_erase()
83 return result; in cmd_erase()
90 result = flash_get_page_info_by_offs(flash_dev, page_addr, in cmd_erase()
93 if (result != 0) { in cmd_erase()
95 "code %d.", result); in cmd_erase()
102 result = flash_erase(flash_dev, page_addr, size); in cmd_erase()
104 if (result) { in cmd_erase()
105 shell_error(sh, "Erase Failed, code %d.", result); in cmd_erase()
110 return result; in cmd_erase()
207 int result; in cmd_test() local
213 result = parse_helper(sh, &argc, &argv, &flash_dev, &addr); in cmd_test()
214 if (result) { in cmd_test()
215 return result; in cmd_test()
234 result = 0; in cmd_test()
237 result = flash_erase(flash_dev, addr, size); in cmd_test()
239 if (result) { in cmd_test()
240 shell_error(sh, "Erase Failed, code %d.", result); in cmd_test()
246 result = flash_write(flash_dev, addr, test_arr, size); in cmd_test()
248 if (result) { in cmd_test()
249 shell_error(sh, "Write failed, code %d", result); in cmd_test()
255 result = flash_read(flash_dev, addr, check_arr, size); in cmd_test()
257 if (result < 0) { in cmd_test()
258 shell_print(sh, "Verification read failed, code: %d", result); in cmd_test()
270 if (result == 0) { in cmd_test()
274 return result; in cmd_test()
330 int result; in cmd_read_test() local
338 result = parse_helper(sh, &argc, &argv, &flash_dev, &addr); in cmd_read_test()
339 if (result) { in cmd_read_test()
340 return result; in cmd_read_test()
343 result = read_write_erase_validate(sh, argc, argv, &size, &repeat); in cmd_read_test()
344 if (result) { in cmd_read_test()
345 return result; in cmd_read_test()
350 result = flash_read(flash_dev, addr, test_arr, size); in cmd_read_test()
353 if (result) { in cmd_read_test()
354 shell_error(sh, "Read failed: %d", result); in cmd_read_test()
363 if (result == 0) { in cmd_read_test()
367 return result; in cmd_read_test()
374 int result; in cmd_write_test() local
382 result = parse_helper(sh, &argc, &argv, &flash_dev, &addr); in cmd_write_test()
383 if (result) { in cmd_write_test()
384 return result; in cmd_write_test()
387 result = read_write_erase_validate(sh, argc, argv, &size, &repeat); in cmd_write_test()
388 if (result) { in cmd_write_test()
389 return result; in cmd_write_test()
398 result = flash_write(flash_dev, addr, test_arr, size); in cmd_write_test()
401 if (result) { in cmd_write_test()
402 shell_error(sh, "Write failed: %d", result); in cmd_write_test()
411 if (result == 0) { in cmd_write_test()
415 return result; in cmd_write_test()
422 int result; in cmd_erase_test() local
430 result = parse_helper(sh, &argc, &argv, &flash_dev, &addr); in cmd_erase_test()
431 if (result) { in cmd_erase_test()
432 return result; in cmd_erase_test()
435 result = read_write_erase_validate(sh, argc, argv, &size, &repeat); in cmd_erase_test()
436 if (result) { in cmd_erase_test()
437 return result; in cmd_erase_test()
446 result = flash_erase(flash_dev, addr, size); in cmd_erase_test()
449 if (result) { in cmd_erase_test()
450 shell_error(sh, "Erase failed: %d", result); in cmd_erase_test()
459 if (result == 0) { in cmd_erase_test()
463 return result; in cmd_erase_test()
620 int result; in cmd_load() local
625 result = parse_helper(sh, &argc, &argv, &flash_dev, &addr); in cmd_load()
626 if (result) { in cmd_load()
627 return result; in cmd_load()
676 int result; in cmd_page_info() local
679 result = parse_helper(sh, &argc, &argv, &flash_dev, &addr); in cmd_page_info()
680 if (result) { in cmd_page_info()
681 return result; in cmd_page_info()
684 result = flash_get_page_info_by_offs(flash_dev, addr, &info); in cmd_page_info()
686 if (result != 0) { in cmd_page_info()
687 shell_error(sh, "Could not determine page size, error code %d.", result); in cmd_page_info()