Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
368f7486
Unverified
Commit
368f7486
authored
Oct 23, 2018
by
2xsec
Committed by
Christian Brauner
Nov 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage_utils: use _exit() instead of exit() in child process
Signed-off-by:
2xsec
<
dh48.jeong@samsung.com
>
parent
ae9870d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
storage_utils.c
src/lxc/storage/storage_utils.c
+10
-10
No files found.
src/lxc/storage/storage_utils.c
View file @
368f7486
...
...
@@ -243,7 +243,7 @@ int detect_fs(struct lxc_storage *bdev, char *type, int len)
}
if
(
unshare
(
CLONE_NEWNS
)
<
0
)
exit
(
1
);
_exit
(
EXIT_FAILURE
);
if
(
detect_shared_rootfs
())
if
(
mount
(
NULL
,
"/"
,
NULL
,
MS_SLAVE
|
MS_REC
,
NULL
))
{
...
...
@@ -255,21 +255,21 @@ int detect_fs(struct lxc_storage *bdev, char *type, int len)
if
(
ret
<
0
)
{
ERROR
(
"Failed to mount
\"
%s
\"
onto
\"
%s
\"
to detect FSType"
,
srcdev
,
bdev
->
dest
);
exit
(
1
);
_exit
(
EXIT_FAILURE
);
}
l
=
linkderef
(
srcdev
,
devpath
);
if
(
!
l
)
exit
(
1
);
_exit
(
EXIT_FAILURE
);
f
=
fopen
(
"/proc/self/mounts"
,
"r"
);
if
(
!
f
)
exit
(
1
);
_exit
(
EXIT_FAILURE
);
while
(
getline
(
&
line
,
&
linelen
,
f
)
!=
-
1
)
{
sp1
=
strchr
(
line
,
' '
);
if
(
!
sp1
)
exit
(
1
);
_exit
(
EXIT_FAILURE
);
*
sp1
=
'\0'
;
if
(
strcmp
(
line
,
l
))
...
...
@@ -277,22 +277,22 @@ int detect_fs(struct lxc_storage *bdev, char *type, int len)
sp2
=
strchr
(
sp1
+
1
,
' '
);
if
(
!
sp2
)
exit
(
1
);
_exit
(
EXIT_FAILURE
);
*
sp2
=
'\0'
;
sp3
=
strchr
(
sp2
+
1
,
' '
);
if
(
!
sp3
)
exit
(
1
);
_exit
(
EXIT_FAILURE
);
*
sp3
=
'\0'
;
sp2
++
;
if
(
write
(
p
[
1
],
sp2
,
strlen
(
sp2
))
!=
strlen
(
sp2
))
exit
(
1
);
_exit
(
EXIT_FAILURE
);
exit
(
0
);
_exit
(
EXIT_SUCCESS
);
}
exit
(
1
);
_exit
(
EXIT_FAILURE
);
}
int
do_mkfs_exec_wrapper
(
void
*
args
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment