Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
43b16820
Commit
43b16820
authored
Jan 19, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make sure that /linuxrc has std{in,out,err}
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
b2ddedcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
init/do_mounts_initrd.c
init/do_mounts_initrd.c
+4
-0
No files found.
init/do_mounts_initrd.c
View file @
43b16820
...
@@ -36,6 +36,10 @@ __setup("noinitrd", no_initrd);
...
@@ -36,6 +36,10 @@ __setup("noinitrd", no_initrd);
static
int
init_linuxrc
(
struct
subprocess_info
*
info
,
struct
cred
*
new
)
static
int
init_linuxrc
(
struct
subprocess_info
*
info
,
struct
cred
*
new
)
{
{
sys_unshare
(
CLONE_FS
|
CLONE_FILES
);
sys_unshare
(
CLONE_FS
|
CLONE_FILES
);
/* stdin/stdout/stderr for /linuxrc */
sys_open
(
"/dev/console"
,
O_RDWR
,
0
);
sys_dup
(
0
);
sys_dup
(
0
);
/* move initrd over / and chdir/chroot in initrd root */
/* move initrd over / and chdir/chroot in initrd root */
sys_chdir
(
"/root"
);
sys_chdir
(
"/root"
);
sys_mount
(
"."
,
"/"
,
NULL
,
MS_MOVE
,
NULL
);
sys_mount
(
"."
,
"/"
,
NULL
,
MS_MOVE
,
NULL
);
...
...
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