Re: [PATCH v2 1/3] device_tree: Add a helper function for string arrays

2019-11-10 Thread David Gibson
On Sat, Nov 09, 2019 at 03:59:24PM +, Peter Maydell wrote: > On Fri, 8 Nov 2019 at 19:48, Palmer Dabbelt wrote: > > > > The device tree format allows for arrays of strings, which are encoded > > with '\0's inside regular strings. These are ugly to represent in C, so > > the helper function re

Re: [PATCH v2 1/3] device_tree: Add a helper function for string arrays

2019-11-09 Thread Peter Maydell
On Fri, 8 Nov 2019 at 19:48, Palmer Dabbelt wrote: > > The device tree format allows for arrays of strings, which are encoded > with '\0's inside regular strings. These are ugly to represent in C, so > the helper function represents them as strings with internal '\0's that > are terminated with a

[PATCH v2 1/3] device_tree: Add a helper function for string arrays

2019-11-08 Thread Palmer Dabbelt
The device tree format allows for arrays of strings, which are encoded with '\0's inside regular strings. These are ugly to represent in C, so the helper function represents them as strings with internal '\0's that are terminated with a double '\0'. In other words, the array ["string1", "string2"