Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemCore
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemCore
Commits
5639d9ad
Commit
5639d9ad
authored
Oct 10, 2016
by
Glenn Kasten
Committed by
Android (Google) Code Review
Oct 10, 2016
Browse files
Options
Downloads
Plain Diff
Merge "Traverse /etc/init in a well-defined order" into nyc-mr1-dev
parents
ae8cebf5
89579f24
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
init/init_parser.cpp
+11
-5
11 additions, 5 deletions
init/init_parser.cpp
with
11 additions
and
5 deletions
init/init_parser.cpp
+
11
−
5
View file @
5639d9ad
...
...
@@ -122,14 +122,20 @@ bool Parser::ParseConfigDir(const std::string& path) {
return
false
;
}
dirent
*
current_file
;
std
::
vector
<
std
::
string
>
files
;
while
((
current_file
=
readdir
(
config_dir
.
get
())))
{
std
::
string
current_path
=
android
::
base
::
StringPrintf
(
"%s/%s"
,
path
.
c_str
(),
current_file
->
d_name
);
// Ignore directories and only process regular files.
if
(
current_file
->
d_type
==
DT_REG
)
{
if
(
!
ParseConfigFile
(
current_path
))
{
ERROR
(
"could not import file '%s'
\n
"
,
current_path
.
c_str
());
std
::
string
current_path
=
android
::
base
::
StringPrintf
(
"%s/%s"
,
path
.
c_str
(),
current_file
->
d_name
);
files
.
emplace_back
(
current_path
);
}
}
// Sort first so we load files in a consistent order (bug 31996208)
std
::
sort
(
files
.
begin
(),
files
.
end
());
for
(
const
auto
&
file
:
files
)
{
if
(
!
ParseConfigFile
(
file
))
{
ERROR
(
"Could not import file '%s'
\n
"
,
file
.
c_str
());
}
}
return
true
;
...
...
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