Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
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
zhul
criu
Commits
f560ddea
Commit
f560ddea
authored
Apr 09, 2012
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
files: Use open_reg_by_id helper where appropriate
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
447f369b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
19 deletions
+2
-19
files.c
files.c
+2
-19
No files found.
files.c
View file @
f560ddea
...
...
@@ -501,7 +501,6 @@ int prepare_fs(int pid)
{
int
ifd
,
cwd
;
struct
fs_entry
fe
;
struct
file_desc
*
fd
;
ifd
=
open_image_ro
(
CR_FD_FS
,
pid
);
if
(
ifd
<
0
)
...
...
@@ -510,14 +509,7 @@ int prepare_fs(int pid)
if
(
read_img
(
ifd
,
&
fe
)
<
0
)
return
-
1
;
fd
=
find_file_desc_raw
(
FDINFO_REG
,
fe
.
cwd_id
);
if
(
fd
==
NULL
)
{
pr_err
(
"Can't find file for %d's cwd (%x)
\n
"
,
pid
,
fe
.
cwd_id
);
return
-
1
;
}
cwd
=
open_fe_fd
(
fd
);
cwd
=
open_reg_by_id
(
fe
.
cwd_id
);
if
(
cwd
<
0
)
return
-
1
;
...
...
@@ -543,14 +535,5 @@ int prepare_fs(int pid)
int
get_filemap_fd
(
int
pid
,
struct
vma_entry
*
vma_entry
)
{
struct
file_desc
*
fd
;
fd
=
find_file_desc_raw
(
FDINFO_REG
,
vma_entry
->
shmid
);
if
(
fd
==
NULL
)
{
pr_err
(
"Can't find file for mapping %lx-%lx
\n
"
,
vma_entry
->
start
,
vma_entry
->
end
);
return
-
1
;
}
return
open_fe_fd
(
fd
);
return
open_reg_by_id
(
vma_entry
->
shmid
);
}
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