Re: [PATCH 1/2] fdtdump: add grub_fdt_prop_to_string() for safe string conversion

2024-08-14 Thread Daniel Kiper
On Thu, Aug 08, 2024 at 05:37:46PM +0200, Tobias Heider wrote: > Device tree properties are not explicitly typed but values can take > multiple forms from strings to arrays and byte-strings. > grub_fdt_prop_to_string() adds a heuristic to determine the type and > convert it to a string for printing

Re: [PATCH 1/2] fdtdump: add grub_fdt_prop_to_string() for safe string conversion

2024-08-10 Thread Tobias Heider
On Sat, Aug 10, 2024 at 3:38 AM Andrew Hamilton wrote: > > Hello, > > I'm not an expert in GRUB, but was trying to learn more. I took this > chance to learn about this new feature a bit and just had a couple > thoughts / questions. Otherwise, thank you! > > > +char * > > +grub_fdt_prop_to_string (

Re: [PATCH 1/2] fdtdump: add grub_fdt_prop_to_string() for safe string conversion

2024-08-09 Thread Andrew Hamilton
Hello, I'm not an expert in GRUB, but was trying to learn more. I took this chance to learn about this new feature a bit and just had a couple thoughts / questions. Otherwise, thank you! > +char * > +grub_fdt_prop_to_string (const unsigned char *val, grub_uint32_t len) > +{ > + char *str; > + i

[PATCH 1/2] fdtdump: add grub_fdt_prop_to_string() for safe string conversion

2024-08-08 Thread Tobias Heider
Device tree properties are not explicitly typed but values can take multiple forms from strings to arrays and byte-strings. grub_fdt_prop_to_string() adds a heuristic to determine the type and convert it to a string for printing. Signed-off-by: Tobias Heider --- grub-core/lib/fdt.c| 87 +