Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
steam-runtime-tools
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
steamrt
steam-runtime-tools
Commits
f25c2a5d
Commit
f25c2a5d
authored
5 years ago
by
Simon McVittie
Browse files
Options
Downloads
Patches
Plain Diff
pv_bwrap_add_api_filesystems: Factor out
Signed-off-by:
Simon McVittie
<
smcv@collabora.com
>
parent
77f3e3d7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/bwrap.c
+26
-0
26 additions, 0 deletions
src/bwrap.c
src/bwrap.h
+1
-0
1 addition, 0 deletions
src/bwrap.h
src/wrap.c
+1
-16
1 addition, 16 deletions
src/wrap.c
with
28 additions
and
16 deletions
src/bwrap.c
+
26
−
0
View file @
f25c2a5d
...
...
@@ -379,3 +379,29 @@ pv_bwrap_copy_tree (FlatpakBwrap *bwrap,
nftw_data
.
source
=
NULL
;
nftw_data
.
dest
=
NULL
;
}
/**
* pv_bwrap_add_api_filesystems:
* @bwrap: The #FlatpakBwrap
*
* Make basic API filesystems available.
*/
void
pv_bwrap_add_api_filesystems
(
FlatpakBwrap
*
bwrap
)
{
flatpak_bwrap_add_args
(
bwrap
,
"--dev-bind"
,
"/dev"
,
"/dev"
,
"--proc"
,
"/proc"
,
"--ro-bind"
,
"/sys"
,
"/sys"
,
NULL
);
if
(
g_file_test
(
"/dev/pts"
,
G_FILE_TEST_EXISTS
))
flatpak_bwrap_add_args
(
bwrap
,
"--dev-bind"
,
"/dev/pts"
,
"/dev/pts"
,
NULL
);
if
(
g_file_test
(
"/dev/shm"
,
G_FILE_TEST_EXISTS
))
flatpak_bwrap_add_args
(
bwrap
,
"--dev-bind"
,
"/dev/shm"
,
"/dev/shm"
,
NULL
);
}
This diff is collapsed.
Click to expand it.
src/bwrap.h
+
1
−
0
View file @
f25c2a5d
...
...
@@ -39,6 +39,7 @@ gboolean pv_bwrap_bind_usr (FlatpakBwrap *bwrap,
void
pv_bwrap_copy_tree
(
FlatpakBwrap
*
bwrap
,
const
char
*
source
,
const
char
*
dest
);
void
pv_bwrap_add_api_filesystems
(
FlatpakBwrap
*
bwrap
);
static
inline
gboolean
pv_bwrap_was_finished
(
FlatpakBwrap
*
bwrap
)
...
...
This diff is collapsed.
Click to expand it.
src/wrap.c
+
1
−
16
View file @
f25c2a5d
...
...
@@ -1605,22 +1605,7 @@ main (int argc,
if
(
opt_terminal
!=
PV_TERMINAL_TTY
)
flatpak_bwrap_add_arg
(
bwrap
,
"--new-session"
);
/* Make basic API filesystems available */
flatpak_bwrap_add_args
(
bwrap
,
"--dev-bind"
,
"/dev"
,
"/dev"
,
"--proc"
,
"/proc"
,
"--ro-bind"
,
"/sys"
,
"/sys"
,
NULL
);
if
(
g_file_test
(
"/dev/pts"
,
G_FILE_TEST_EXISTS
))
flatpak_bwrap_add_args
(
bwrap
,
"--dev-bind"
,
"/dev/pts"
,
"/dev/pts"
,
NULL
);
if
(
g_file_test
(
"/dev/shm"
,
G_FILE_TEST_EXISTS
))
flatpak_bwrap_add_args
(
bwrap
,
"--dev-bind"
,
"/dev/shm"
,
"/dev/shm"
,
NULL
);
pv_bwrap_add_api_filesystems
(
bwrap
);
if
(
opt_runtime
!=
NULL
&&
opt_runtime
[
0
]
!=
'\0'
)
{
...
...
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