API: Only output test data when reading was successful.
Signed-off-by: Rafal Czubak <rcz@semihalf.com>
This commit is contained in:
parent
7fb6c4f9b0
commit
44a94e596b
|
@ -135,9 +135,10 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
else if ((rv = ub_dev_read(i, buf, 1, 0)) != 0)
|
else if ((rv = ub_dev_read(i, buf, 1, 0)) != 0)
|
||||||
errf("could not read from device %d, error %d\n", i, rv);
|
errf("could not read from device %d, error %d\n", i, rv);
|
||||||
|
else {
|
||||||
printf("Sector 0 dump (512B):\n");
|
printf("Sector 0 dump (512B):\n");
|
||||||
test_dump_buf(buf, 512);
|
test_dump_buf(buf, 512);
|
||||||
|
}
|
||||||
|
|
||||||
ub_dev_close(i);
|
ub_dev_close(i);
|
||||||
}
|
}
|
||||||
|
@ -178,6 +179,7 @@ int main(int argc, char *argv[])
|
||||||
printf("%s = %s\n", env, ub_env_get(env));
|
printf("%s = %s\n", env, ub_env_get(env));
|
||||||
|
|
||||||
/* reset */
|
/* reset */
|
||||||
|
printf("\n*** Resetting board ***\n");
|
||||||
ub_reset();
|
ub_reset();
|
||||||
printf("\nHmm, reset returned...?!\n");
|
printf("\nHmm, reset returned...?!\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue