On Mon, Aug 11, 2008 at 06:05:53PM +0200, [EMAIL PROTECTED] wrote:
> Author: rminnich
> Date: 2008-08-11 18:05:53 +0200 (Mon, 11 Aug 2008)
> New Revision: 740
> 
> Modified:
>    coreboot-v3/util/dtc/dtc-parser.y
> Log:
> Add support for dtc files that end in .dtc, e.g. ide.dtc.
> This is managed by stripping the .dtc from the name when it
> is used to label the node in the tree.
> This one's for you Peter!

s/dtc/dts/ I think (wrong checkin message, but the code looks correct).

 
> Signed-off-by: Ronald G. Minnich <[EMAIL PROTECTED]>
> 
> Acked-by: Carl-Daniel Hailfinger <[EMAIL PROTECTED]>
> 
> 
> Modified: coreboot-v3/util/dtc/dtc-parser.y
> ===================================================================
> --- coreboot-v3/util/dtc/dtc-parser.y 2008-08-11 16:04:38 UTC (rev 739)
> +++ coreboot-v3/util/dtc/dtc-parser.y 2008-08-11 16:05:53 UTC (rev 740)
> @@ -139,9 +139,17 @@
>                       switchback();
>                       
>               }
> -             ')' ';' { 
> +             ')' ';' {
> +                             int namelen;
> +                             char *name = strdup((char *)$3.val);
>                               /* convention: first property is labeled with 
> path */
> -                             $6->label = strdup((char *)$3.val);
> +                             $6->label = name;
> +
> +                             /* convention: if it ends in .dts, strip that 
> off       */
> +                             namelen = strlen($6->label);
> +                             if ((namelen > 4) && (! 
> strncmp(&name[namelen-4], ".dts", 4)))
> +                                     $6->label[namelen-4] = '\0';
> +
>                               $$ = $6
>                       }
>       |


Uwe.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org

--
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to