Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gekkofs
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
David Auer
gekkofs
Commits
d998b6fc
Unverified
Commit
d998b6fc
authored
6 years ago
by
Tommaso Tocci
Browse files
Options
Downloads
Patches
Plain Diff
Canonicalize input paths
Paths passed as parameter to the daemon needs to be canonicalized
parent
2eb4de2e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ifs/src/daemon/adafs_daemon.cpp
+18
-15
18 additions, 15 deletions
ifs/src/daemon/adafs_daemon.cpp
with
18 additions
and
15 deletions
ifs/src/daemon/adafs_daemon.cpp
+
18
−
15
View file @
d998b6fc
...
...
@@ -348,18 +348,6 @@ int main(int argc, const char* argv[]) {
return
1
;
}
if
(
vm
.
count
(
"mountdir"
))
{
ADAFS_DATA
->
mountdir
(
vm
[
"mountdir"
].
as
<
string
>
());
}
if
(
vm
.
count
(
"rootdir"
))
{
ADAFS_DATA
->
rootdir
(
vm
[
"rootdir"
].
as
<
string
>
());
}
if
(
vm
.
count
(
"metadir"
))
{
ADAFS_DATA
->
metadir
(
vm
[
"metadir"
].
as
<
string
>
());
}
else
if
(
vm
.
count
(
"rootdir"
))
{
ADAFS_DATA
->
metadir
(
vm
[
"rootdir"
].
as
<
string
>
());
}
// parse host parameters
vector
<
string
>
hosts
{};
if
(
vm
.
count
(
"hostfile"
))
{
...
...
@@ -427,10 +415,25 @@ int main(int argc, const char* argv[]) {
ADAFS_DATA
->
spdlogger
()
->
info
(
"{}() Initializing environment. Hold on ..."
,
__func__
);
// Make sure directory structure exists
bfs
::
create_directories
(
ADAFS_DATA
->
metadir
()
);
assert
(
vm
.
count
(
"mountdir"
));
auto
mountdir
=
vm
[
"mountdir"
].
as
<
string
>
(
);
// Create mountdir. We use this dir to get some information on the underlying fs with statfs in adafs_statfs
bfs
::
create_directories
(
ADAFS_DATA
->
mountdir
());
bfs
::
create_directories
(
mountdir
);
ADAFS_DATA
->
mountdir
(
bfs
::
canonical
(
mountdir
).
native
());
assert
(
vm
.
count
(
"rootdir"
));
auto
rootdir
=
vm
[
"rootdir"
].
as
<
string
>
();
bfs
::
create_directories
(
rootdir
);
ADAFS_DATA
->
rootdir
(
bfs
::
canonical
(
rootdir
).
native
());
if
(
vm
.
count
(
"metadir"
))
{
auto
metadir
=
vm
[
"metadir"
].
as
<
string
>
();
bfs
::
create_directories
(
metadir
);
ADAFS_DATA
->
metadir
(
bfs
::
canonical
(
metadir
).
native
());
}
else
{
// use rootdir as metadata dir
ADAFS_DATA
->
metadir
(
ADAFS_DATA
->
rootdir
());
}
if
(
init_environment
())
{
signal
(
SIGINT
,
shutdown_handler
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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