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
f999b8cf
Commit
f999b8cf
authored
Apr 10, 2012
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dump: Rename fd dumping functions
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
adca8809
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
cr-dump.c
cr-dump.c
+9
-9
No files found.
cr-dump.c
View file @
f999b8cf
...
...
@@ -296,7 +296,7 @@ err:
return
ret
;
}
static
int
do_dump_
one_fdinfo
(
const
struct
fd_parms
*
p
,
int
lfd
,
static
int
do_dump_
gen_file
(
const
struct
fd_parms
*
p
,
int
lfd
,
const
struct
cr_fdset
*
cr_fdset
)
{
struct
fdinfo_entry
e
;
...
...
@@ -331,7 +331,7 @@ err:
return
ret
;
}
static
int
dump_
one_fdinfo
(
struct
fd_parms
*
p
,
int
lfd
,
static
int
dump_
gen_file
(
struct
fd_parms
*
p
,
int
lfd
,
const
struct
cr_fdset
*
cr_fdset
)
{
p
->
id
=
MAKE_FD_GENID
(
p
->
stat
.
st_dev
,
p
->
stat
.
st_ino
,
p
->
pos
);
...
...
@@ -340,7 +340,7 @@ static int dump_one_fdinfo(struct fd_parms *p, int lfd,
else
p
->
type
=
FDINFO_REG
;
return
do_dump_
one_fdinfo
(
p
,
lfd
,
cr_fdset
);
return
do_dump_
gen_file
(
p
,
lfd
,
cr_fdset
);
}
static
int
dump_task_exe_link
(
pid_t
pid
,
struct
mm_entry
*
mm
)
...
...
@@ -394,13 +394,13 @@ static int dump_unsupp_fd(const struct fd_parms *p)
return
-
1
;
}
static
int
dump_
one_
chrdev
(
struct
fd_parms
*
p
,
int
lfd
,
const
struct
cr_fdset
*
set
)
static
int
dump_chrdev
(
struct
fd_parms
*
p
,
int
lfd
,
const
struct
cr_fdset
*
set
)
{
int
maj
;
maj
=
major
(
p
->
stat
.
st_rdev
);
if
(
maj
==
MEM_MAJOR
)
return
dump_
one_fdinfo
(
p
,
lfd
,
set
);
return
dump_
gen_file
(
p
,
lfd
,
set
);
if
(
p
->
fd
<
3
&&
(
maj
==
TTY_MAJOR
||
maj
==
UNIX98_PTY_SLAVE_MAJOR
))
{
...
...
@@ -411,7 +411,7 @@ static int dump_one_chrdev(struct fd_parms *p, int lfd, const struct cr_fdset *s
return
dump_unsupp_fd
(
p
);
}
static
int
dump_one_f
d
(
pid_t
pid
,
int
fd
,
int
lfd
,
static
int
dump_one_f
ile
(
pid_t
pid
,
int
fd
,
int
lfd
,
const
struct
cr_fdset
*
cr_fdset
)
{
struct
fd_parms
p
;
...
...
@@ -425,12 +425,12 @@ static int dump_one_fd(pid_t pid, int fd, int lfd,
return
dump_socket
(
&
p
,
lfd
,
cr_fdset
);
if
(
S_ISCHR
(
p
.
stat
.
st_mode
))
return
dump_
one_
chrdev
(
&
p
,
lfd
,
cr_fdset
);
return
dump_chrdev
(
&
p
,
lfd
,
cr_fdset
);
if
(
S_ISREG
(
p
.
stat
.
st_mode
)
||
S_ISDIR
(
p
.
stat
.
st_mode
)
||
S_ISFIFO
(
p
.
stat
.
st_mode
))
return
dump_
one_fdinfo
(
&
p
,
lfd
,
cr_fdset
);
return
dump_
gen_file
(
&
p
,
lfd
,
cr_fdset
);
return
dump_unsupp_fd
(
&
p
);
}
...
...
@@ -454,7 +454,7 @@ static int dump_task_files_seized(struct parasite_ctl *ctl, const struct cr_fdse
goto
err
;
for
(
i
=
0
;
i
<
nr_fds
;
i
++
)
{
ret
=
dump_one_f
d
(
ctl
->
pid
,
fds
[
i
],
lfds
[
i
],
cr_fdset
);
ret
=
dump_one_f
ile
(
ctl
->
pid
,
fds
[
i
],
lfds
[
i
],
cr_fdset
);
close
(
lfds
[
i
]);
if
(
ret
)
goto
err
;
...
...
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