mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
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! Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: svn://coreboot.org/repository/coreboot-v3@740 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
7eee4907a1
commit
dbdfc77314
1 changed files with 10 additions and 2 deletions
|
@ -139,9 +139,17 @@ config: DT_CONFIG '('
|
|||
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
|
||||
}
|
||||
|
|
||||
|
|
Loading…
Add table
Reference in a new issue