On Thu, 15 Sep 2022, BALATON Zoltan wrote:
On Thu, 15 Sep 2022, Mark Cave-Ayland wrote:
On 11/09/2022 15:01, BALATON Zoltan wrote:
Some device trees can contain large chunks of binary data that result in .properties output to get lost in the dump of all binary bytes. Put an upper limit of the bytes dumped.
Signed-off-by: BALATON Zoltan firstname.lastname@example.org
forth/admin/devices.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/forth/admin/devices.fs b/forth/admin/devices.fs index 38f6ad6..b856f28 100644 --- a/forth/admin/devices.fs +++ b/forth/admin/devices.fs @@ -307,7 +307,7 @@ : .p-bytes? ( data len -- 1 | data len 0 ) ." -- " dup . ." : "
- swap >r 0
- swap >r 100 min 0 begin 2dup > while dup r@ + c@ ( len n ch )
This seems like a good idea, particularly when the VGA NDRV is enabled. One minor nit: would it be possible to mimic OpenBOOT by adding an extra " .." to the end of the truncated data so it is obvious when the truncation has occurred?
Probably, but I don't know Forth well enough to easily do that so it would take some time to figure out. The size is printed at the beginning though so you can see that it's partial data but I can try to think of a solution unless you can do it.
Sent a v2 which appears to work.
Regards, BALATON Zoltan