summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-10-09 12:00:43 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-10-09 12:00:43 +0200
commit51b6c199f3d26a027249724c11b4c15e848c3adb (patch)
tree4cf58847337ce7e5cd169388531b18823562be0d /commands
parent8a8f9455e2120910b0f97cd7487f8b46ea714ac1 (diff)
parentdd2132e72bceb57ad1781668dc7d9c87dc1f826d (diff)
downloadbarebox-51b6c199f3d26a027249724c11b4c15e848c3adb.tar.gz
Merge branch 'for-next/misc'
Diffstat (limited to 'commands')
-rw-r--r--commands/loadenv.c4
-rw-r--r--commands/memtest.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/commands/loadenv.c b/commands/loadenv.c
index 6469aff..bf01072 100644
--- a/commands/loadenv.c
+++ b/commands/loadenv.c
@@ -61,6 +61,10 @@ static int do_loadenv(int argc, char *argv[])
if (argc - optind < 1) {
filename = default_environment_path_get();
+ if (!filename) {
+ printf("Default environment path not set\n");
+ return 1;
+ }
} else {
/*
* /dev/defaultenv use to contain the defaultenvironment.
diff --git a/commands/memtest.c b/commands/memtest.c
index 99d4864..dc8f7db 100644
--- a/commands/memtest.c
+++ b/commands/memtest.c
@@ -33,12 +33,10 @@ static int do_test_one_area(struct mem_test_resource *r, int bus_only,
{
int ret;
- printf("Testing memory space: "
- "0x%08x -> 0x%08x:\n",
- r->r->start, r->r->end);
+ printf("Testing memory space: %pa -> %pa:\n",
+ &r->r->start, &r->r->end);
- remap_range((void *)r->r->start, r->r->end -
- r->r->start + 1, cache_flag);
+ remap_range((void *)r->r->start, resource_size(r->r), cache_flag);
ret = mem_test_bus_integrity(r->r->start, r->r->end);
if (ret < 0)