From 7bfe79c44d44a193289df90719e821ce8dc7e06b Mon Sep 17 00:00:00 2001 From: Aaron Nyholm Date: Tue, 7 May 2024 15:44:31 +1000 Subject: [PATCH] libmisc/shell: Improve print messages for flashdev command --- cpukit/libmisc/shell/main_flashdev.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cpukit/libmisc/shell/main_flashdev.c b/cpukit/libmisc/shell/main_flashdev.c index ca2454b33c..dd7c12317d 100644 --- a/cpukit/libmisc/shell/main_flashdev.c +++ b/cpukit/libmisc/shell/main_flashdev.c @@ -199,7 +199,7 @@ int flashdev_shell_read( } /* Print buffer out in 32bit blocks */ - printf("Reading %s at 0x%08x for %d bytes\n", dev_path, address, bytes); + printf("Reading %s at 0x%08x for 0x%x bytes\n", dev_path, address, bytes); for (int i = 0; i < (bytes/4); i++) { printf("%08x ", ((uint32_t*)buffer)[i]); if ((i+1)%4 == 0) { @@ -281,6 +281,14 @@ int flashdev_shell_write( return -1; } + printf( + "Writing %s to %s at 0x%08x for 0x%jx bytes\n", + file_path, + dev_path, + address, + length + ); + /* Create buffer */ buffer = calloc(1, 0x1000); @@ -358,7 +366,7 @@ int flashdev_shell_erase( return -1; } - printf("Erasing at %08x for %x bytes\n", address, bytes); + printf("Erasing at 0x%08x for 0x%x bytes\n", address, bytes); /* Erase flash */ args.offset = address;