Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
86e6f7ea
Commit
86e6f7ea
authored
9 years ago
by
Tom Rini
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
git://git.denx.de/u-boot-fdt
parents
08442ec7
77d7fff8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/libfdt/fdt_ro.c
+22
-3
22 additions, 3 deletions
lib/libfdt/fdt_ro.c
with
22 additions
and
3 deletions
lib/libfdt/fdt_ro.c
+
22
−
3
View file @
86e6f7ea
...
...
@@ -113,6 +113,25 @@ int fdt_subnode_offset(const void *fdt, int parentoffset,
return
fdt_subnode_offset_namelen
(
fdt
,
parentoffset
,
name
,
strlen
(
name
));
}
/*
* Find the next of path seperator, note we need to search for both '/' and ':'
* and then take the first one so that we do the rigth thing for e.g.
* "foo/bar:option" and "bar:option/otheroption", both of which happen, so
* first searching for either ':' or '/' does not work.
*/
static
const
char
*
fdt_path_next_seperator
(
const
char
*
path
)
{
const
char
*
sep1
=
strchr
(
path
,
'/'
);
const
char
*
sep2
=
strchr
(
path
,
':'
);
if
(
sep1
&&
sep2
)
return
(
sep1
<
sep2
)
?
sep1
:
sep2
;
else
if
(
sep1
)
return
sep1
;
else
return
sep2
;
}
int
fdt_path_offset
(
const
void
*
fdt
,
const
char
*
path
)
{
const
char
*
end
=
path
+
strlen
(
path
);
...
...
@@ -123,7 +142,7 @@ int fdt_path_offset(const void *fdt, const char *path)
/* see if we have an alias */
if
(
*
path
!=
'/'
)
{
const
char
*
q
=
strch
r
(
path
,
'/'
);
const
char
*
q
=
fdt_path_next_seperato
r
(
path
);
if
(
!
q
)
q
=
end
;
...
...
@@ -141,9 +160,9 @@ int fdt_path_offset(const void *fdt, const char *path)
while
(
*
p
==
'/'
)
p
++
;
if
(
!
*
p
)
if
(
*
p
==
'\0'
||
*
p
==
':'
)
return
offset
;
q
=
strchr
(
p
,
'/'
);
q
=
fdt_path_next_seperator
(
p
);
if
(
!
q
)
q
=
end
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment