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
6f16ac1f
Unverified
Commit
6f16ac1f
authored
Jan 18, 2019
by
Christian Brauner
Committed by
GitHub
Jan 18, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2791 from kubiko/handle-android-loop
Handle alternative loop device location on Android
parents
8d832e7b
b11738d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
utils.c
src/lxc/utils.c
+10
-2
No files found.
src/lxc/utils.c
View file @
6f16ac1f
...
@@ -1485,8 +1485,16 @@ static int lxc_get_unused_loop_dev(char *name_loop)
...
@@ -1485,8 +1485,16 @@ static int lxc_get_unused_loop_dev(char *name_loop)
goto
on_error
;
goto
on_error
;
fd_tmp
=
open
(
name_loop
,
O_RDWR
|
O_CLOEXEC
);
fd_tmp
=
open
(
name_loop
,
O_RDWR
|
O_CLOEXEC
);
if
(
fd_tmp
<
0
)
if
(
fd_tmp
<
0
)
{
SYSERROR
(
"Failed to open loop
\"
%s
\"
"
,
name_loop
);
/* on Android loop devices are moved under /dev/block, give it a shot */
ret
=
snprintf
(
name_loop
,
LO_NAME_SIZE
,
"/dev/block/loop%d"
,
loop_nr
);
if
(
ret
<
0
||
ret
>=
LO_NAME_SIZE
)
goto
on_error
;
fd_tmp
=
open
(
name_loop
,
O_RDWR
|
O_CLOEXEC
);
if
(
fd_tmp
<
0
)
SYSERROR
(
"Failed to open loop
\"
%s
\"
"
,
name_loop
);
}
on_error
:
on_error
:
close
(
fd_ctl
);
close
(
fd_ctl
);
...
...
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