summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
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)