Re: [PATCH v3] libfdt: Add support for using aliases in fdt_path_offset()

2008-08-16 Thread Segher Boessenkool
Hmm.. my reading of 1275 says that an alias pointing to another alias is not permitted, but I'm not terribly confident I'm not misreading it. Segher, do you know whether this is allowed? My reading is the same: if after expanding an alias the path does not start with /, the search starts at

[PATCH v3] libfdt: Add support for using aliases in fdt_path_offset()

2008-08-14 Thread Kumar Gala
If the path doesn't start with '/' check to see if it matches some alias under /aliases and substitute the matching alias value in the path and retry the lookup. Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- Simplify down the aliases.dts to only whats needed for the test. - k

Re: [PATCH v3] libfdt: Add support for using aliases in fdt_path_offset()

2008-08-14 Thread David Gibson
On Thu, Aug 14, 2008 at 08:28:19AM -0500, Kumar Gala wrote: If the path doesn't start with '/' check to see if it matches some alias under /aliases and substitute the matching alias value in the path and retry the lookup. Signed-off-by: Kumar Gala [EMAIL PROTECTED] Acked-by: David Gibson

Re: [PATCH v3] libfdt: Add support for using aliases in fdt_path_offset()

2008-08-14 Thread Jon Loeliger
If the path doesn't start with '/' check to see if it matches some alias under /aliases and substitute the matching alias value in the path and retry the lookup. Signed-off-by: Kumar Gala [EMAIL PROTECTED] Applied. jdl ___ Linuxppc-dev mailing

Re: [PATCH v3] libfdt: Add support for using aliases in fdt_path_offset()

2008-08-14 Thread Scott Wood
On Thu, Aug 14, 2008 at 08:28:19AM -0500, Kumar Gala wrote: - if (*path != '/') - return -FDT_ERR_BADPATH; + /* see if we have an alias */ + if (*path != '/') { + const char *q; + int aliasoffset = fdt_path_offset(fdt, /aliases); + +

Re: [PATCH v3] libfdt: Add support for using aliases in fdt_path_offset()

2008-08-14 Thread David Gibson
On Thu, Aug 14, 2008 at 12:43:48PM -0500, Scott Wood wrote: On Thu, Aug 14, 2008 at 08:28:19AM -0500, Kumar Gala wrote: - if (*path != '/') - return -FDT_ERR_BADPATH; + /* see if we have an alias */ + if (*path != '/') { + const char *q; + int

Re: [PATCH v3] libfdt: Add support for using aliases in fdt_path_offset()

2008-08-14 Thread Mitch Bradley
David Gibson wrote: On Thu, Aug 14, 2008 at 12:43:48PM -0500, Scott Wood wrote: On Thu, Aug 14, 2008 at 08:28:19AM -0500, Kumar Gala wrote: - if (*path != '/') - return -FDT_ERR_BADPATH; + /* see if we have an alias */ + if (*path != '/') { +